Lines Matching refs:pfd
30 struct pollfd pfd = { .fd = 0, .events = 0, .revents = 0 }; variable
38 T_ASSERT_POSIX_SUCCESS(poll(&pfd, 0, POLL_TIMEOUT_MS),
56 struct pollfd pfd[] = { variable
69 pfd[0].fd = dir;
70 T_EXPECT_POSIX_SUCCESS(poll(pfd, 1, -1), "poll() with a directory");
71 T_QUIET; T_EXPECT_TRUE(pfd[0].revents & POLLNVAL,
75 pfd[0].fd = file; pfd[0].revents = 0;
76 pfd[1].fd = dir; pfd[1].revents = 0;
77 T_EXPECT_POSIX_SUCCESS(poll(pfd, 2, -1),
79 T_QUIET; T_EXPECT_TRUE(pfd[0].revents & POLLIN, "file should be readable");
80 T_QUIET; T_EXPECT_TRUE(pfd[1].revents & POLLNVAL,
84 pfd[0].fd = dir; pfd[0].revents = 0;
85 pfd[1].fd = file; pfd[1].revents = 0;
86 T_EXPECT_POSIX_SUCCESS(poll(pfd, 2, -1),
88 T_QUIET; T_EXPECT_TRUE(pfd[0].revents & POLLNVAL,
90 T_QUIET; T_EXPECT_TRUE(pfd[1].revents & POLLIN, "file should be readable");
93 pfd[0].fd = file; pfd[0].revents = 0;
94 pfd[1].fd = pipes[0]; pfd[0].revents = 0;
95 T_EXPECT_POSIX_SUCCESS(poll(pfd, 2, -1),
97 T_QUIET; T_EXPECT_TRUE(pfd[0].revents & POLLIN, "file should be readable");
98 T_QUIET; T_EXPECT_FALSE(pfd[1].revents & POLLIN,
102 pfd[0].fd = file; pfd[0].revents = 0;
103 pfd[1].fd = dir; pfd[1].revents = 0;
104 pfd[2].fd = pipes[0]; pfd[2].revents = 0;
105 T_EXPECT_POSIX_SUCCESS(poll(pfd, 3, -1),
107 T_QUIET; T_EXPECT_TRUE(pfd[0].revents & POLLIN, "file should be readable");
108 T_QUIET; T_EXPECT_TRUE(pfd[1].revents & POLLNVAL,
110 T_QUIET; T_EXPECT_FALSE(pfd[2].revents & POLLIN, "pipe should not be readable");
114 pfd[0].fd = dir; pfd[0].revents = 0;
115 pfd[1].fd = pipes[0]; pfd[1].revents = 0;
123 T_EXPECT_POSIX_SUCCESS(poll(pfd, 3, -1),
127 T_QUIET; T_EXPECT_TRUE(pfd[0].revents & POLLNVAL,
129 T_QUIET; T_EXPECT_FALSE(pfd[1].revents & POLLIN, "pipe should not be readable");