Lines Matching refs:fds
27 struct zsock_pollfd fds[1]; in test_socketpair_poll_timeout_common() local
29 memset(fds, 0, sizeof(fds)); in test_socketpair_poll_timeout_common()
30 fds[0].fd = fixture->sv[0]; in test_socketpair_poll_timeout_common()
31 fds[0].events |= ZSOCK_POLLIN; in test_socketpair_poll_timeout_common()
32 res = zsock_poll(fds, 1, 1); in test_socketpair_poll_timeout_common()
40 memset(fds, 0, sizeof(fds)); in test_socketpair_poll_timeout_common()
41 fds[0].fd = fixture->sv[0]; in test_socketpair_poll_timeout_common()
42 fds[0].events |= ZSOCK_POLLOUT; in test_socketpair_poll_timeout_common()
43 res = zsock_poll(fds, 1, 1); in test_socketpair_poll_timeout_common()
96 struct zsock_pollfd fds[1]; in ZTEST_F() local
103 memset(fds, 0, sizeof(fds)); in ZTEST_F()
104 fds[0].fd = fixture->sv[0]; in ZTEST_F()
105 fds[0].events |= ZSOCK_POLLIN; in ZTEST_F()
115 res = zsock_poll(fds, 1, -1); in ZTEST_F()
117 zassert_equal(fds[0].revents & ZSOCK_POLLIN, ZSOCK_POLLIN, "POLLIN not set"); in ZTEST_F()
126 struct zsock_pollfd fds[1]; in ZTEST_F() local
141 memset(fds, 0, sizeof(fds)); in ZTEST_F()
142 fds[0].fd = fixture->sv[0]; in ZTEST_F()
143 fds[0].events |= ZSOCK_POLLOUT; in ZTEST_F()
153 res = zsock_poll(fds, 1, -1); in ZTEST_F()
155 zassert_equal(fds[0].revents & ZSOCK_POLLHUP, ZSOCK_POLLHUP, "POLLHUP not set"); in ZTEST_F()
172 struct zsock_pollfd fds[2]; in ZTEST_USER_F() local
174 memset(fds, 0, sizeof(fds)); in ZTEST_USER_F()
175 fds[0].fd = fixture->sv[0]; in ZTEST_USER_F()
176 fds[0].events |= ZSOCK_POLLOUT; in ZTEST_USER_F()
177 res = zsock_poll(fds, 1, 0); in ZTEST_USER_F()
180 zassert_not_equal(fds[0].revents & ZSOCK_POLLOUT, 0, "POLLOUT not set"); in ZTEST_USER_F()
186 memset(fds, 0, sizeof(fds)); in ZTEST_USER_F()
187 fds[0].fd = fixture->sv[1]; in ZTEST_USER_F()
188 fds[0].events |= ZSOCK_POLLIN; in ZTEST_USER_F()
189 res = zsock_poll(fds, 1, 0); in ZTEST_USER_F()
192 zassert_not_equal(fds[0].revents & ZSOCK_POLLIN, 0, "POLLIN not set"); in ZTEST_USER_F()
194 memset(fds, 0, sizeof(fds)); in ZTEST_USER_F()
195 fds[0].fd = fixture->sv[0]; in ZTEST_USER_F()
196 fds[0].events |= ZSOCK_POLLOUT; in ZTEST_USER_F()
197 fds[1].fd = fixture->sv[1]; in ZTEST_USER_F()
198 fds[1].events |= ZSOCK_POLLIN; in ZTEST_USER_F()
199 res = zsock_poll(fds, 2, 0); in ZTEST_USER_F()
202 zassert_not_equal(fds[0].revents & ZSOCK_POLLOUT, 0, "POLLOUT not set"); in ZTEST_USER_F()
203 zassert_not_equal(fds[1].revents & ZSOCK_POLLIN, 0, "POLLIN not set"); in ZTEST_USER_F()
245 struct zsock_pollfd fds[1]; in ZTEST_F() local
247 memset(fds, 0, sizeof(fds)); in ZTEST_F()
248 fds[0].fd = fixture->sv[0]; in ZTEST_F()
249 fds[0].events |= ZSOCK_POLLIN; in ZTEST_F()
260 res = zsock_poll(fds, 1, 5000); in ZTEST_F()
263 zassert_not_equal(fds[0].revents & ZSOCK_POLLIN, 0, "POLLIN not set"); in ZTEST_F()
270 memset(fds, 0, sizeof(fds)); in ZTEST_F()
271 fds[0].fd = fixture->sv[0]; in ZTEST_F()
272 fds[0].events |= ZSOCK_POLLOUT; in ZTEST_F()
283 res = zsock_poll(fds, 1, 5000); in ZTEST_F()
286 zassert_not_equal(fds[0].revents & ZSOCK_POLLOUT, 0, "POLLOUT was not set"); in ZTEST_F()
301 struct zsock_pollfd fds[1]; in ZTEST_USER_F() local
303 memset(fds, 0, sizeof(fds)); in ZTEST_USER_F()
304 fds[0].fd = fixture->sv[1]; in ZTEST_USER_F()
305 fds[0].events |= ZSOCK_POLLIN; in ZTEST_USER_F()
306 res = zsock_poll(fds, 1, 0); in ZTEST_USER_F()
309 zassert_not_equal(fds[0].revents & ZSOCK_POLLIN, ZSOCK_POLLIN, "POLLIN set"); in ZTEST_USER_F()
316 memset(fds, 0, sizeof(fds)); in ZTEST_USER_F()
317 fds[0].fd = fixture->sv[1]; in ZTEST_USER_F()
318 fds[0].events |= ZSOCK_POLLIN; in ZTEST_USER_F()
319 res = zsock_poll(fds, 1, 1000); in ZTEST_USER_F()
322 zassert_not_equal(fds[0].revents & ZSOCK_POLLIN, 0, "POLLIN not set"); in ZTEST_USER_F()
330 memset(fds, 0, sizeof(fds)); in ZTEST_USER_F()
331 fds[0].fd = fixture->sv[1]; in ZTEST_USER_F()
332 fds[0].events |= ZSOCK_POLLIN; in ZTEST_USER_F()
333 res = zsock_poll(fds, 1, 0); in ZTEST_USER_F()
336 zassert_not_equal(fds[0].revents & ZSOCK_POLLIN, ZSOCK_POLLIN, "POLLIN set"); in ZTEST_USER_F()
351 struct zsock_pollfd fds[1]; in ZTEST_USER_F() local
355 memset(fds, 0, sizeof(fds)); in ZTEST_USER_F()
356 fds[0].fd = fixture->sv[0]; in ZTEST_USER_F()
357 fds[0].events |= ZSOCK_POLLOUT; in ZTEST_USER_F()
358 res = zsock_poll(fds, 1, 1000); in ZTEST_USER_F()
361 zassert_not_equal(fds[0].revents & ZSOCK_POLLOUT, 0, "POLLOUT not set"); in ZTEST_USER_F()
372 memset(fds, 0, sizeof(fds)); in ZTEST_USER_F()
373 fds[0].fd = fixture->sv[0]; in ZTEST_USER_F()
374 fds[0].events |= ZSOCK_POLLOUT; in ZTEST_USER_F()
375 res = zsock_poll(fds, 1, 0); in ZTEST_USER_F()
378 zassert_not_equal(fds[0].revents & ZSOCK_POLLOUT, ZSOCK_POLLOUT, "POLLOUT is set"); in ZTEST_USER_F()
385 memset(fds, 0, sizeof(fds)); in ZTEST_USER_F()
386 fds[0].fd = fixture->sv[0]; in ZTEST_USER_F()
387 fds[0].events |= ZSOCK_POLLOUT; in ZTEST_USER_F()
388 res = zsock_poll(fds, 1, 1000); in ZTEST_USER_F()
391 zassert_not_equal(fds[0].revents & ZSOCK_POLLOUT, 0, "POLLOUT not set"); in ZTEST_USER_F()