Lines Matching refs:pfd
125 adb_pollfd pfd[2] = {}; in TEST_F() local
126 pfd[0].fd = fds[0]; in TEST_F()
127 pfd[0].events = POLLRDNORM; in TEST_F()
128 pfd[1].fd = fds[1]; in TEST_F()
129 pfd[1].events = POLLWRNORM; in TEST_F()
131 pfd[0].revents = -1; in TEST_F()
132 pfd[1].revents = -1; in TEST_F()
133 EXPECT_EQ(1, adb_poll(pfd, 2, 0)); in TEST_F()
134 EXPECT_EQ(0, pfd[0].revents); in TEST_F()
135 EXPECT_EQ(POLLWRNORM, pfd[1].revents); in TEST_F()
140 pfd[0].revents = -1; in TEST_F()
141 EXPECT_EQ(1, adb_poll(pfd, 1, 100)); in TEST_F()
142 EXPECT_EQ(POLLRDNORM, pfd[0].revents); in TEST_F()
143 pfd[0].revents = -1; in TEST_F()
144 pfd[1].revents = -1; in TEST_F()
145 EXPECT_EQ(2, adb_poll(pfd, 2, 0)); in TEST_F()
146 EXPECT_EQ(POLLRDNORM, pfd[0].revents); in TEST_F()
147 EXPECT_EQ(POLLWRNORM, pfd[1].revents); in TEST_F()
151 adb_pollfd pfd = {}; in TEST_F() local
152 pfd.fd = fds[0]; in TEST_F()
153 pfd.events = POLLRDNORM; in TEST_F()
155 EXPECT_EQ(0, adb_poll(&pfd, 1, 100)); in TEST_F()
156 EXPECT_EQ(0, pfd.revents); in TEST_F()
160 EXPECT_EQ(1, adb_poll(&pfd, 1, 100)); in TEST_F()
161 EXPECT_EQ(POLLRDNORM, pfd.revents); in TEST_F()
165 adb_pollfd pfd[3] = {}; in TEST_F() local
166 pfd[0].fd = fds[0]; in TEST_F()
167 pfd[0].events = POLLRDNORM; in TEST_F()
168 pfd[1].fd = INT_MAX; in TEST_F()
169 pfd[1].events = POLLRDNORM; in TEST_F()
170 pfd[2].fd = fds[1]; in TEST_F()
171 pfd[2].events = POLLWRNORM; in TEST_F()
176 EXPECT_EQ(1, adb_poll(pfd, 1, 100)); in TEST_F()
177 EXPECT_EQ(POLLRDNORM, pfd[0].revents); in TEST_F()
179 EXPECT_EQ(3, adb_poll(pfd, 3, 0)); in TEST_F()
180 EXPECT_EQ(POLLRDNORM, pfd[0].revents); in TEST_F()
181 EXPECT_EQ(POLLNVAL, pfd[1].revents); in TEST_F()
182 EXPECT_EQ(POLLWRNORM, pfd[2].revents); in TEST_F()
186 adb_pollfd pfd[2] = {}; in TEST_F() local
187 pfd[0].fd = fds[0]; in TEST_F()
188 pfd[0].events = POLLRDNORM; in TEST_F()
189 pfd[1] = pfd[0]; in TEST_F()
191 EXPECT_EQ(0, adb_poll(pfd, 2, 0)); in TEST_F()
192 EXPECT_EQ(0, pfd[0].revents); in TEST_F()
193 EXPECT_EQ(0, pfd[1].revents); in TEST_F()
197 EXPECT_EQ(2, adb_poll(pfd, 2, 100)); in TEST_F()
198 EXPECT_EQ(POLLRDNORM, pfd[0].revents); in TEST_F()
199 EXPECT_EQ(POLLRDNORM, pfd[1].revents); in TEST_F()
203 adb_pollfd pfd = {}; in TEST_F() local
204 pfd.fd = fds[0]; in TEST_F()
205 pfd.events = POLLIN; in TEST_F()
207 EXPECT_EQ(0, adb_poll(&pfd, 1, 0)); in TEST_F()
208 EXPECT_EQ(0, pfd.revents); in TEST_F()
213 EXPECT_EQ(1, adb_poll(&pfd, 1, 100)); in TEST_F()
216 EXPECT_EQ(POLLHUP, pfd.revents & POLLHUP); in TEST_F()
228 adb_pollfd pfd; in TEST_F() local
229 pfd.events = POLLIN; in TEST_F()
230 pfd.fd = sockets[i * 2 + 1]; in TEST_F()
231 pfds.push_back(pfd); in TEST_F()