Lines Matching refs:r

83   int r;  in TEST_IMPL()  local
86 r = uv_tcp_init(uv_default_loop(), &server1); in TEST_IMPL()
87 ASSERT_OK(r); in TEST_IMPL()
88 r = uv_tcp_bind(&server1, (const struct sockaddr*) &addr, 0); in TEST_IMPL()
89 ASSERT_OK(r); in TEST_IMPL()
91 r = uv_tcp_init(uv_default_loop(), &server2); in TEST_IMPL()
92 ASSERT_OK(r); in TEST_IMPL()
93 r = uv_tcp_bind(&server2, (const struct sockaddr*) &addr, 0); in TEST_IMPL()
94 ASSERT_OK(r); in TEST_IMPL()
96 r = uv_listen((uv_stream_t*)&server1, 128, NULL); in TEST_IMPL()
97 ASSERT_OK(r); in TEST_IMPL()
98 r = uv_listen((uv_stream_t*)&server2, 128, NULL); in TEST_IMPL()
99 ASSERT_EQ(r, UV_EADDRINUSE); in TEST_IMPL()
116 int r; in TEST_IMPL() local
120 r = uv_tcp_init(uv_default_loop(), &server); in TEST_IMPL()
121 ASSERT_OK(r); in TEST_IMPL()
124 r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); in TEST_IMPL()
125 ASSERT(r == 0 || r == UV_EADDRNOTAVAIL); in TEST_IMPL()
141 int r; in TEST_IMPL() local
145 r = uv_tcp_init(uv_default_loop(), &server); in TEST_IMPL()
146 ASSERT_OK(r); in TEST_IMPL()
147 r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); in TEST_IMPL()
148 ASSERT_EQ(r, UV_EADDRNOTAVAIL); in TEST_IMPL()
166 int r; in TEST_IMPL() local
170 r = uv_tcp_init(uv_default_loop(), &server); in TEST_IMPL()
171 ASSERT_OK(r); in TEST_IMPL()
172 r = uv_tcp_bind(&server, (const struct sockaddr*) garbage_addr, 0); in TEST_IMPL()
173 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
191 int r; in TEST_IMPL() local
196 r = uv_tcp_init(uv_default_loop(), &server); in TEST_IMPL()
197 ASSERT_OK(r); in TEST_IMPL()
198 r = uv_tcp_bind(&server, (const struct sockaddr*) &addr1, 0); in TEST_IMPL()
199 ASSERT_OK(r); in TEST_IMPL()
200 r = uv_tcp_bind(&server, (const struct sockaddr*) &addr2, 0); in TEST_IMPL()
201 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
217 int r; in TEST_IMPL() local
221 r = uv_tcp_init(uv_default_loop(), &server); in TEST_IMPL()
222 ASSERT_OK(r); in TEST_IMPL()
223 r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); in TEST_IMPL()
224 ASSERT_OK(r); in TEST_IMPL()
234 int r; in TEST_IMPL() local
238 r = uv_tcp_init(uv_default_loop(), &server); in TEST_IMPL()
239 ASSERT_OK(r); in TEST_IMPL()
240 r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, UV_TCP_IPV6ONLY); in TEST_IMPL()
241 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
249 int r; in TEST_IMPL() local
252 r = uv_tcp_init(uv_default_loop(), &server); in TEST_IMPL()
253 ASSERT_OK(r); in TEST_IMPL()
254 r = uv_listen((uv_stream_t*)&server, 128, NULL); in TEST_IMPL()
255 ASSERT_OK(r); in TEST_IMPL()
268 int r; in TEST_IMPL() local
271 r = uv_tcp_init(uv_default_loop(), &server); in TEST_IMPL()
272 ASSERT_OK(r); in TEST_IMPL()
273 r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); in TEST_IMPL()
274 ASSERT_OK(r); in TEST_IMPL()
275 r = uv_listen((uv_stream_t*)&server, 128, NULL); in TEST_IMPL()
276 ASSERT_OK(r); in TEST_IMPL()
282 r = uv_write(&write_req, (uv_stream_t*) &server, &buf, 1, NULL); in TEST_IMPL()
283 ASSERT_EQ(r, UV_EPIPE); in TEST_IMPL()
284 r = uv_shutdown(&shutdown_req, (uv_stream_t*) &server, NULL); in TEST_IMPL()
285 ASSERT_EQ(r, UV_ENOTCONN); in TEST_IMPL()
286 r = uv_read_start((uv_stream_t*) &server, in TEST_IMPL()
289 ASSERT_EQ(r, UV_ENOTCONN); in TEST_IMPL()