Lines Matching refs:r

52   int r;  in pipe_client_connect_cb()  local
58 r = uv_pipe_getpeername(&pipe_client, buf, &len); in pipe_client_connect_cb()
59 ASSERT_OK(r); in pipe_client_connect_cb()
71 r = uv_pipe_getsockname(&pipe_client, buf, &len); in pipe_client_connect_cb()
72 ASSERT(r == 0 && len == 0); in pipe_client_connect_cb()
128 int r; in TEST_IMPL() local
136 r = uv_pipe_init(loop, &pipe_server, 0); in TEST_IMPL()
137 ASSERT_OK(r); in TEST_IMPL()
139 r = uv_pipe_bind2(&pipe_server, "bad\0path", 8, 0); in TEST_IMPL()
140 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
143 r = uv_pipe_getsockname(&pipe_server, buf, &len); in TEST_IMPL()
144 ASSERT_EQ(r, UV_EBADF); in TEST_IMPL()
147 r = uv_pipe_getpeername(&pipe_server, buf, &len); in TEST_IMPL()
148 ASSERT_EQ(r, UV_EBADF); in TEST_IMPL()
150 r = uv_pipe_bind2(&pipe_server, namebuf, namelen, 0); in TEST_IMPL()
151 ASSERT_OK(r); in TEST_IMPL()
157 r = uv_pipe_getsockname(&pipe_server, NULL, &len); in TEST_IMPL()
158 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
160 r = uv_pipe_getsockname(&pipe_server, buf, NULL); in TEST_IMPL()
161 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
163 r = uv_pipe_getsockname(&pipe_server, NULL, NULL); in TEST_IMPL()
164 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
177 r = uv_pipe_getpeername(&pipe_server, buf, &len); in TEST_IMPL()
178 ASSERT_EQ(r, UV_ENOTCONN); in TEST_IMPL()
180 r = uv_listen((uv_stream_t*) &pipe_server, 0, pipe_server_connection_cb); in TEST_IMPL()
181 ASSERT_OK(r); in TEST_IMPL()
183 r = uv_pipe_init(loop, &pipe_client, 0); in TEST_IMPL()
184 ASSERT_OK(r); in TEST_IMPL()
187 r = uv_pipe_getsockname(&pipe_client, buf, &len); in TEST_IMPL()
188 ASSERT_EQ(r, UV_EBADF); in TEST_IMPL()
191 r = uv_pipe_getpeername(&pipe_client, buf, &len); in TEST_IMPL()
192 ASSERT_EQ(r, UV_EBADF); in TEST_IMPL()
194 r = uv_pipe_connect2(&connect_req, in TEST_IMPL()
200 ASSERT_OK(r); in TEST_IMPL()
203 r = uv_pipe_getsockname(&pipe_client, buf, &len); in TEST_IMPL()
204 ASSERT_EQ(r, 0); in TEST_IMPL()
208 r = uv_pipe_getpeername(&pipe_client, buf, &len); in TEST_IMPL()
209 ASSERT_OK(r); in TEST_IMPL()
214 r = uv_run(loop, UV_RUN_DEFAULT); in TEST_IMPL()
215 ASSERT_OK(r); in TEST_IMPL()
317 int r; in TEST_IMPL() local
319 r = CreatePipe(&readh, &writeh, NULL, 65536); in TEST_IMPL()
320 ASSERT(r); in TEST_IMPL()
322 r = uv_pipe_init(uv_default_loop(), &pipe_client, 0); in TEST_IMPL()
323 ASSERT_OK(r); in TEST_IMPL()
325 ASSERT_NE(r, -1); in TEST_IMPL()
326 r = uv_pipe_open(&pipe_client, readfd); in TEST_IMPL()
327 ASSERT_OK(r); in TEST_IMPL()
328 r = uv_read_start((uv_stream_t*) &pipe_client, in TEST_IMPL()
331 ASSERT_OK(r); in TEST_IMPL()
333 r = uv_read_stop((uv_stream_t*)&pipe_client); in TEST_IMPL()
334 ASSERT_OK(r); in TEST_IMPL()
337 r = uv_pipe_getsockname(&pipe_client, buf1, &len1); in TEST_IMPL()
338 ASSERT_OK(r); in TEST_IMPL()
341 r = uv_read_start((uv_stream_t*)&pipe_client, in TEST_IMPL()
344 ASSERT_OK(r); in TEST_IMPL()
348 r = uv_pipe_getsockname(&pipe_client, buf2, &len2); in TEST_IMPL()
349 ASSERT_OK(r); in TEST_IMPL()
352 r = uv_read_stop((uv_stream_t*)&pipe_client); in TEST_IMPL()
353 ASSERT_OK(r); in TEST_IMPL()