Lines Matching refs:res
26 int res; in test_socketpair_poll_timeout_common() local
32 res = zsock_poll(fds, 1, 1); in test_socketpair_poll_timeout_common()
33 zassert_equal(res, 0, "poll: expected: 0 actual: %d", res); in test_socketpair_poll_timeout_common()
36 res = zsock_send(fixture->sv[0], "x", 1, 0); in test_socketpair_poll_timeout_common()
37 zassert_equal(res, 1, "send() failed: %d", res); in test_socketpair_poll_timeout_common()
43 res = zsock_poll(fds, 1, 1); in test_socketpair_poll_timeout_common()
44 zassert_equal(res, 0, "poll: expected: 0 actual: %d", res); in test_socketpair_poll_timeout_common()
55 int res; in ZTEST_USER_F() local
57 res = zsock_fcntl(fixture->sv[0], F_GETFL, 0); in ZTEST_USER_F()
58 zassert_not_equal(res, -1, "fcntl failed: %d", errno); in ZTEST_USER_F()
60 int flags = res; in ZTEST_USER_F()
62 res = zsock_fcntl(fixture->sv[0], F_SETFL, O_NONBLOCK | flags); in ZTEST_USER_F()
63 zassert_not_equal(res, -1, "fcntl failed: %d", errno); in ZTEST_USER_F()
65 res = zsock_fcntl(fixture->sv[1], F_SETFL, O_NONBLOCK | flags); in ZTEST_USER_F()
66 zassert_not_equal(res, -1, "fcntl failed: %d", errno); in ZTEST_USER_F()
94 int res; in ZTEST_F() local
115 res = zsock_poll(fds, 1, -1); in ZTEST_F()
116 zassert_equal(res, 1, "poll() failed: %d", res); in ZTEST_F()
119 res = zsock_recv(fixture->sv[0], &c, 1, 0); in ZTEST_F()
120 zassert_equal(res, 0, "read did not return EOF"); in ZTEST_F()
125 int res; in ZTEST_F() local
133 res = zsock_socketpair(AF_UNIX, SOCK_STREAM, 0, fixture->sv); in ZTEST_F()
134 zassert_not_equal(res, -1, "socketpair() failed: %d", errno); in ZTEST_F()
137 res = zsock_send(fixture->sv[0], "x", 1, 0); in ZTEST_F()
138 zassert_equal(res, 1, "send failed: %d", res); in ZTEST_F()
153 res = zsock_poll(fds, 1, -1); in ZTEST_F()
154 zassert_equal(res, 1, "poll() failed: %d", res); in ZTEST_F()
157 res = zsock_send(fixture->sv[0], "x", 1, 0); in ZTEST_F()
158 zassert_equal(res, -1, "send(): expected: -1 actual: %d", res); in ZTEST_F()
171 int res; in ZTEST_USER_F() local
177 res = zsock_poll(fds, 1, 0); in ZTEST_USER_F()
178 zassert_not_equal(res, -1, "poll() failed: %d", errno); in ZTEST_USER_F()
179 zassert_equal(res, 1, "poll(): expected: 1 actual: %d", res); in ZTEST_USER_F()
182 res = zsock_send(fixture->sv[0], "x", 1, 0); in ZTEST_USER_F()
183 zassert_not_equal(res, -1, "send() failed: %d", errno); in ZTEST_USER_F()
184 zassert_equal(res, 1, "write(): expected: 1 actual: %d", res); in ZTEST_USER_F()
189 res = zsock_poll(fds, 1, 0); in ZTEST_USER_F()
190 zassert_not_equal(res, -1, "poll() failed: %d", errno); in ZTEST_USER_F()
191 zassert_equal(res, 1, "poll(): expected: 1 actual: %d", res); in ZTEST_USER_F()
199 res = zsock_poll(fds, 2, 0); in ZTEST_USER_F()
200 zassert_not_equal(res, -1, "poll() failed: %d", errno); in ZTEST_USER_F()
201 zassert_equal(res, 2, "poll(): expected: 1 actual: %d", res); in ZTEST_USER_F()
210 int res; in rw_fun() local
220 res = zsock_send(*ctx.fd, "x", 1, 0); in rw_fun()
221 if (-1 == res) { in rw_fun()
228 res = zsock_recv(*ctx.fd, &c, 1, 0); in rw_fun()
229 if (-1 == res) { in rw_fun()
244 int res; in ZTEST_F() local
260 res = zsock_poll(fds, 1, 5000); in ZTEST_F()
261 zassert_not_equal(res, -1, "poll() failed: %d", errno); in ZTEST_F()
262 zassert_equal(res, 1, "poll(): expected: 1 actual: %d", res); in ZTEST_F()
266 res = zsock_send(fixture->sv[0], "x", 1, 0); in ZTEST_F()
267 zassert_equal(res, 1, "send() failed: %d", res); in ZTEST_F()
283 res = zsock_poll(fds, 1, 5000); in ZTEST_F()
284 zassert_not_equal(res, -1, "poll() failed: %d", errno); in ZTEST_F()
285 zassert_equal(res, 1, "poll(): expected: 1 actual: %d", res); in ZTEST_F()
298 int res; in ZTEST_USER_F() local
306 res = zsock_poll(fds, 1, 0); in ZTEST_USER_F()
307 zassert_not_equal(res, -1, "poll failed: %d", errno); in ZTEST_USER_F()
308 zassert_equal(res, 0, "poll: expected: 0 actual: %d", res); in ZTEST_USER_F()
311 res = zsock_send(fixture->sv[0], "x", 1, 0); in ZTEST_USER_F()
312 zassert_equal(res, 1, "send failed: %d", res); in ZTEST_USER_F()
319 res = zsock_poll(fds, 1, 1000); in ZTEST_USER_F()
320 zassert_not_equal(res, -1, "poll failed: %d", errno); in ZTEST_USER_F()
321 zassert_equal(res, 1, "poll: expected: 1 actual: %d", res); in ZTEST_USER_F()
327 res = zsock_recv(fixture->sv[1], &c, 1, 0); in ZTEST_USER_F()
328 zassert_equal(res, 1, "recv failed: %d", res); in ZTEST_USER_F()
333 res = zsock_poll(fds, 1, 0); in ZTEST_USER_F()
334 zassert_not_equal(res, -1, "poll failed: %d", errno); in ZTEST_USER_F()
335 zassert_equal(res, 0, "poll: expected: 0 actual: %d", res); in ZTEST_USER_F()
348 int res; in ZTEST_USER_F() local
358 res = zsock_poll(fds, 1, 1000); in ZTEST_USER_F()
359 zassert_not_equal(res, -1, "poll failed: %d", errno); in ZTEST_USER_F()
360 zassert_equal(res, 1, "poll: expected: 1 actual: %d", res); in ZTEST_USER_F()
368 res = zsock_send(fixture->sv[0], "x", 1, 0); in ZTEST_USER_F()
369 zassert_equal(res, 1, "send() failed: %d", res); in ZTEST_USER_F()
375 res = zsock_poll(fds, 1, 0); in ZTEST_USER_F()
376 zassert_not_equal(res, -1, "poll failed: %d", errno); in ZTEST_USER_F()
377 zassert_equal(res, 0, "poll: expected: 0 actual: %d", res); in ZTEST_USER_F()
380 res = zsock_recv(fixture->sv[1], &c, 1, 0); in ZTEST_USER_F()
381 zassert_equal(res, 1, "recv() failed: %d", res); in ZTEST_USER_F()
388 res = zsock_poll(fds, 1, 1000); in ZTEST_USER_F()
389 zassert_not_equal(res, -1, "poll failed: %d", errno); in ZTEST_USER_F()
390 zassert_equal(res, 1, "poll: expected: 1 actual: %d", res); in ZTEST_USER_F()