Lines Matching refs:res
36 int res; in ZTEST() local
54 res = zsock_bind(s_sock, (struct sockaddr *)&s_addr, sizeof(s_addr)); in ZTEST()
55 zassert_equal(res, 0, "bind failed"); in ZTEST()
57 res = zsock_connect(c_sock, (struct sockaddr *)&s_addr, sizeof(s_addr)); in ZTEST()
58 zassert_equal(res, 0, "connect failed"); in ZTEST()
68 res = zsock_poll(pollfds, ARRAY_SIZE(pollfds), 0); in ZTEST()
70 zassert_equal(res, 0, ""); in ZTEST()
82 res = zsock_poll(pollfds, ARRAY_SIZE(pollfds), 30); in ZTEST()
86 zassert_equal(res, 0, ""); in ZTEST()
93 res = zsock_poll(pollfds, ARRAY_SIZE(pollfds), 30); in ZTEST()
96 zassert_equal(res, 1, ""); in ZTEST()
111 res = zsock_poll(pollfds, ARRAY_SIZE(pollfds), 0); in ZTEST()
113 zassert_equal(res, 0, ""); in ZTEST()
121 res = zsock_connect(c_sock, (const struct sockaddr *)&s_addr, in ZTEST()
123 zassert_equal(res, 0, ""); in ZTEST()
126 res = zsock_poll(pollout, ARRAY_SIZE(pollout), 200); in ZTEST()
128 zassert_equal(res, 1, ""); in ZTEST()
138 res = zsock_bind(s_sock_tcp, (struct sockaddr *)&s_addr, sizeof(s_addr)); in ZTEST()
139 zassert_equal(res, 0, ""); in ZTEST()
140 res = zsock_listen(s_sock_tcp, 0); in ZTEST()
141 zassert_equal(res, 0, ""); in ZTEST()
143 res = zsock_connect(c_sock_tcp, (const struct sockaddr *)&s_addr, in ZTEST()
145 zassert_equal(res, 0, ""); in ZTEST()
148 res = zsock_poll(pollout, ARRAY_SIZE(pollout), 200); in ZTEST()
150 zassert_equal(res, 1, ""); in ZTEST()
153 res = zsock_close(c_sock_tcp); in ZTEST()
154 zassert_equal(res, 0, "close failed"); in ZTEST()
156 res = zsock_close(s_sock_tcp); in ZTEST()
157 zassert_equal(res, 0, "close failed"); in ZTEST()
160 res = zsock_close(c_sock); in ZTEST()
161 zassert_equal(res, 0, "close failed"); in ZTEST()
164 res = zsock_poll(pollfds, ARRAY_SIZE(pollfds), 0); in ZTEST()
166 zassert_equal(res, 1, ""); in ZTEST()
170 res = zsock_close(s_sock); in ZTEST()
171 zassert_equal(res, 0, "close failed"); in ZTEST()
180 int res; in ZTEST() local
192 res = zsock_bind(s_sock, (struct sockaddr *)&s_addr, sizeof(s_addr)); in ZTEST()
193 zassert_equal(res, 0, ""); in ZTEST()
194 res = zsock_listen(s_sock, 0); in ZTEST()
195 zassert_equal(res, 0, ""); in ZTEST()
196 res = zsock_connect(c_sock, (const struct sockaddr *)&s_addr, in ZTEST()
198 zassert_equal(res, 0, ""); in ZTEST()
209 res = zsock_poll(pollout, ARRAY_SIZE(pollout), 10); in ZTEST()
210 zassert_equal(res, 1, ""); in ZTEST()
214 res = zsock_send(c_sock, buf, sizeof(buf), 0); in ZTEST()
215 zassert_equal(res, sizeof(buf), ""); in ZTEST()
221 res = zsock_poll(pollout, ARRAY_SIZE(pollout), 10); in ZTEST()
222 zassert_equal(res, 0, "%d", pollout[0].revents); in ZTEST()
228 res = zsock_recv(new_sock, buf, sizeof(buf), 0); in ZTEST()
229 zassert_equal(res, sizeof(buf), ""); in ZTEST()
236 res = zsock_poll(pollout, ARRAY_SIZE(pollout), 500); in ZTEST()
237 zassert_equal(res, 1, ""); in ZTEST()
243 res = zsock_close(c_sock); in ZTEST()
244 zassert_equal(res, 0, "close failed"); in ZTEST()
245 res = zsock_close(s_sock); in ZTEST()
246 zassert_equal(res, 0, "close failed"); in ZTEST()
247 res = zsock_close(new_sock); in ZTEST()
248 zassert_equal(res, 0, "close failed"); in ZTEST()