/libuv/test/ |
H A D | test-tcp-close.c | 44 int i, r; in connect_cb() local 52 ASSERT_OK(r); in connect_cb() 81 int r; in start_server() local 85 r = uv_tcp_init(loop, handle); in start_server() 86 ASSERT_OK(r); in start_server() 89 ASSERT_OK(r); in start_server() 92 ASSERT_OK(r); in start_server() 105 int r; in TEST_IMPL() local 115 ASSERT_OK(r); in TEST_IMPL() 121 ASSERT_OK(r); in TEST_IMPL() [all …]
|
H A D | test-queue-foreach-delete.c | 141 int r; in init_and_start_fs_events() local 143 ASSERT_OK(r); in init_and_start_fs_events() 149 ASSERT_OK(r); in init_and_start_fs_events() 154 int r; in helper_timer_cb() local 159 ASSERT_OK(r); in helper_timer_cb() 172 int r; in TEST_IMPL() local 184 r = uv_timer_init(loop, &timer); in TEST_IMPL() 185 ASSERT_OK(r); in TEST_IMPL() 188 ASSERT_OK(r); in TEST_IMPL() 191 r = uv_run(loop, UV_RUN_NOWAIT); in TEST_IMPL() [all …]
|
H A D | benchmark-pump.c | 157 int r; in start_stats_collection() local 162 ASSERT_OK(r); in start_stats_collection() 164 ASSERT_OK(r); in start_stats_collection() 205 int r; in do_write() local 212 ASSERT_OK(r); in do_write() 248 int r; in maybe_connect_some() local 279 int r; in connection_cb() local 295 ASSERT_OK(r); in connection_cb() 298 ASSERT_OK(r); in connection_cb() 377 int r; in HELPER_IMPL() local [all …]
|
H A D | test-timer-again.c | 45 int r; in repeat_1_cb() local 56 r = uv_timer_again(&repeat_2); in repeat_1_cb() 57 ASSERT_OK(r); in repeat_1_cb() 96 int r; in TEST_IMPL() local 103 ASSERT_OK(r); in TEST_IMPL() 104 r = uv_timer_again(&dummy); in TEST_IMPL() 105 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL() 110 ASSERT_OK(r); in TEST_IMPL() 112 ASSERT_OK(r); in TEST_IMPL() 124 ASSERT_OK(r); in TEST_IMPL() [all …]
|
H A D | test-multiple-listen.c | 49 int r; in start_server() local 53 r = uv_tcp_init(uv_default_loop(), &server); in start_server() 54 ASSERT_OK(r); in start_server() 57 ASSERT_OK(r); in start_server() 60 ASSERT_OK(r); in start_server() 63 ASSERT_OK(r); in start_server() 79 int r; in client_connect() local 84 r = uv_tcp_init(uv_default_loop(), &client); in client_connect() 85 ASSERT_OK(r); in client_connect() 87 r = uv_tcp_connect(connect_req, in client_connect() [all …]
|
H A D | test-tcp-reuseport.c | 36 int r; in TEST_IMPL() local 44 ASSERT_OK(r); in TEST_IMPL() 134 int r; in run_event_loop() local 141 ASSERT_OK(r); in run_event_loop() 146 int r; in create_listener() local 151 ASSERT_OK(r); in create_listener() 154 ASSERT_OK(r); in create_listener() 157 ASSERT_OK(r); in create_listener() 162 int r; in TEST_IMPL() local 168 ASSERT_OK(r); in TEST_IMPL() [all …]
|
H A D | test-tcp-write-fail.c | 41 int r; in close_socket() local 44 ASSERT_OK(r); in close_socket() 46 r = closesocket((uv_os_sock_t)fd); in close_socket() 48 r = close(fd); in close_socket() 50 ASSERT_OK(r); in close_socket() 74 int r; in connect_cb() local 87 ASSERT_OK(r); in connect_cb() 94 int r; in TEST_IMPL() local 99 ASSERT_OK(r); in TEST_IMPL() 101 r = uv_tcp_connect(&connect_req, in TEST_IMPL() [all …]
|
H A D | test-gethostname.c | 30 int r; in TEST_IMPL() local 34 r = uv_os_gethostname(NULL, &size); in TEST_IMPL() 35 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL() 36 r = uv_os_gethostname(buf, NULL); in TEST_IMPL() 37 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL() 39 r = uv_os_gethostname(buf, &size); in TEST_IMPL() 40 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL() 45 r = uv_os_gethostname(buf, &enobufs_size); in TEST_IMPL() 46 ASSERT_EQ(r, UV_ENOBUFS); in TEST_IMPL() 52 r = uv_os_gethostname(buf, &size); in TEST_IMPL() [all …]
|
H A D | test-udp-alloc-cb-fail.c | 84 int r; in cl_send_cb() local 91 ASSERT_OK(r); in cl_send_cb() 116 int r; in sv_recv_cb() local 136 ASSERT_OK(r); in sv_recv_cb() 143 ASSERT_OK(r); in sv_recv_cb() 153 int r; in TEST_IMPL() local 158 ASSERT_OK(r); in TEST_IMPL() 161 ASSERT_OK(r); in TEST_IMPL() 164 ASSERT_OK(r); in TEST_IMPL() 169 ASSERT_OK(r); in TEST_IMPL() [all …]
|
H A D | test-ipc-heavy-traffic-deadlock-bug.c | 66 int r; in do_write() local 76 r = uv_write( in do_write() 78 ASSERT_OK(r); in do_write() 95 int r; in read_cb() local 106 ASSERT_OK(r); in read_cb() 114 int r; in do_writes_and_reads() local 124 ASSERT_OK(r); in do_writes_and_reads() 127 ASSERT_OK(r); in do_writes_and_reads() 146 int r; in ipc_helper_heavy_traffic_deadlock_bug() local 149 ASSERT_OK(r); in ipc_helper_heavy_traffic_deadlock_bug() [all …]
|
H A D | test-idle.c | 73 int r; in TEST_IMPL() local 76 ASSERT_OK(r); in TEST_IMPL() 77 r = uv_idle_start(&idle_handle, idle_cb); in TEST_IMPL() 78 ASSERT_OK(r); in TEST_IMPL() 81 ASSERT_OK(r); in TEST_IMPL() 82 r = uv_check_start(&check_handle, check_cb); in TEST_IMPL() 83 ASSERT_OK(r); in TEST_IMPL() 86 ASSERT_OK(r); in TEST_IMPL() 88 ASSERT_OK(r); in TEST_IMPL() 90 r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); in TEST_IMPL() [all …]
|
H A D | test-shutdown-twice.c | 47 int r; in connect_cb() local 51 r = uv_shutdown(&req1, req->handle, shutdown_cb); in connect_cb() 52 ASSERT_OK(r); in connect_cb() 54 ASSERT(r); in connect_cb() 61 int r; in TEST_IMPL() local 69 r = uv_tcp_init(loop, &h); in TEST_IMPL() 70 ASSERT_OK(r); in TEST_IMPL() 72 r = uv_tcp_connect(&connect_req, in TEST_IMPL() 76 ASSERT_OK(r); in TEST_IMPL() 78 r = uv_run(loop, UV_RUN_DEFAULT); in TEST_IMPL() [all …]
|
H A D | test-udp-send-and-recv.c | 91 int r; in cl_send_cb() local 98 ASSERT_OK(r); in cl_send_cb() 123 int r; in sv_recv_cb() local 147 ASSERT_OK(r); in sv_recv_cb() 154 ASSERT_OK(r); in sv_recv_cb() 164 int r; in TEST_IMPL() local 169 ASSERT_OK(r); in TEST_IMPL() 172 ASSERT_OK(r); in TEST_IMPL() 175 ASSERT_OK(r); in TEST_IMPL() 180 ASSERT_OK(r); in TEST_IMPL() [all …]
|
H A D | test-tty.c | 98 ASSERT_OK(r); in TEST_IMPL() 103 ASSERT_OK(r); in TEST_IMPL() 108 ASSERT_OK(r); in TEST_IMPL() 124 ASSERT_OK(r); in TEST_IMPL() 128 ASSERT_OK(r); in TEST_IMPL() 166 int r; in TEST_IMPL() local 188 ASSERT_OK(r); in TEST_IMPL() 219 int r; in TEST_IMPL() local 265 int r; in TEST_IMPL() local 311 int r; in TEST_IMPL() local [all …]
|
H A D | test-homedir.c | 32 int r; in TEST_IMPL() local 38 r = uv_os_homedir(homedir, &len); in TEST_IMPL() 39 ASSERT_OK(r); in TEST_IMPL() 58 r = uv_os_homedir(homedir, &len); in TEST_IMPL() 59 ASSERT_EQ(r, UV_ENOBUFS); in TEST_IMPL() 63 r = uv_os_homedir(NULL, &len); in TEST_IMPL() 64 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL() 65 r = uv_os_homedir(homedir, NULL); in TEST_IMPL() 66 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL() 68 r = uv_os_homedir(homedir, &len); in TEST_IMPL() [all …]
|
H A D | test-active.c | 44 int r; in TEST_IMPL() local 47 r = uv_timer_init(uv_default_loop(), &timer); in TEST_IMPL() 48 ASSERT_OK(r); in TEST_IMPL() 54 r = uv_timer_start(&timer, timer_cb, 1000, 0); in TEST_IMPL() 55 ASSERT_OK(r); in TEST_IMPL() 60 r = uv_timer_stop(&timer); in TEST_IMPL() 61 ASSERT_OK(r); in TEST_IMPL() 66 r = uv_timer_start(&timer, timer_cb, 1000, 0); in TEST_IMPL() 67 ASSERT_OK(r); in TEST_IMPL() 77 r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); in TEST_IMPL() [all …]
|
H A D | test-tcp-connect-error-after-write.c | 68 int r; in TEST_IMPL() 73 r = uv_tcp_init(uv_default_loop(), &conn); in TEST_IMPL() 74 ASSERT_OK(r); in TEST_IMPL() 76 r = uv_write(&write_req, (uv_stream_t*)&conn, &buf, 1, write_cb); in TEST_IMPL() 77 ASSERT_EQ(r, UV_EBADF); in TEST_IMPL() 79 r = uv_tcp_connect(&connect_req, in TEST_IMPL() 83 ASSERT_OK(r); in TEST_IMPL() 85 r = uv_write(&write_req, (uv_stream_t*)&conn, &buf, 1, write_cb); in TEST_IMPL() 86 ASSERT_OK(r); in TEST_IMPL() 88 r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); in TEST_IMPL() [all …]
|
H A D | test-pipe-server-close.c | 68 int r; in TEST_IMPL() local 73 r = uv_pipe_init(loop, &pipe_server, 0); in TEST_IMPL() 74 ASSERT_OK(r); in TEST_IMPL() 76 r = uv_pipe_bind(&pipe_server, TEST_PIPENAME); in TEST_IMPL() 77 ASSERT_OK(r); in TEST_IMPL() 79 r = uv_listen((uv_stream_t*) &pipe_server, 0, pipe_server_connection_cb); in TEST_IMPL() 80 ASSERT_OK(r); in TEST_IMPL() 82 r = uv_pipe_init(loop, &pipe_client, 0); in TEST_IMPL() 83 ASSERT_OK(r); in TEST_IMPL() 87 r = uv_run(loop, UV_RUN_DEFAULT); in TEST_IMPL() [all …]
|
H A D | test-stdio-over-pipes.c | 65 ASSERT_OK(r); in init_process_options() 100 int r; in on_read() local 120 int r; in test_stdio_over_pipes() local 143 ASSERT_OK(r); in test_stdio_over_pipes() 146 ASSERT_OK(r); in test_stdio_over_pipes() 149 ASSERT_OK(r); in test_stdio_over_pipes() 222 int r; in stdio_over_pipes_helper() local 229 ASSERT_OK(r); in stdio_over_pipes_helper() 231 ASSERT_OK(r); in stdio_over_pipes_helper() 233 ASSERT_OK(r); in stdio_over_pipes_helper() [all …]
|
H A D | test-not-writable-after-shutdown.c | 36 int r; in connect_cb() local 39 r = uv_shutdown(&shutdown_req, req->handle, shutdown_cb); in connect_cb() 40 ASSERT_OK(r); in connect_cb() 46 int r; in TEST_IMPL() local 55 r = uv_tcp_init(loop, &socket); in TEST_IMPL() 56 ASSERT_OK(r); in TEST_IMPL() 58 r = uv_tcp_connect(&connect_req, in TEST_IMPL() 62 ASSERT_OK(r); in TEST_IMPL() 64 r = uv_run(loop, UV_RUN_DEFAULT); in TEST_IMPL() 65 ASSERT_OK(r); in TEST_IMPL()
|
H A D | test-pipe-pending-instances.c | 33 int r; in TEST_IMPL() local 39 r = uv_pipe_init(loop, &pipe_handle, 0); in TEST_IMPL() 40 ASSERT_OK(r); in TEST_IMPL() 44 r = uv_pipe_bind(&pipe_handle, TEST_PIPENAME); in TEST_IMPL() 45 ASSERT_OK(r); in TEST_IMPL() 49 r = uv_listen((uv_stream_t*)&pipe_handle, 128, connection_cb); in TEST_IMPL() 50 ASSERT_OK(r); in TEST_IMPL() 54 r = uv_run(loop, UV_RUN_DEFAULT); in TEST_IMPL() 55 ASSERT_OK(r); in TEST_IMPL()
|
H A D | test-udp-try-send.c | 85 int r; in TEST_IMPL() local 89 r = uv_udp_init(uv_default_loop(), &server); in TEST_IMPL() 90 ASSERT_OK(r); in TEST_IMPL() 92 r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0); in TEST_IMPL() 93 ASSERT_OK(r); in TEST_IMPL() 95 r = uv_udp_recv_start(&server, alloc_cb, sv_recv_cb); in TEST_IMPL() 96 ASSERT_OK(r); in TEST_IMPL() 100 r = uv_udp_init(uv_default_loop(), &client); in TEST_IMPL() 101 ASSERT_OK(r); in TEST_IMPL() 105 ASSERT_EQ(r, UV_EMSGSIZE); in TEST_IMPL() [all …]
|
H A D | runner-unix.c | 206 int i, r; in dowait() local 213 if (r < 0) { in dowait() 222 ssize_t r; in dowait() local 238 int r; in process_wait() local 267 if (r) { in process_wait() 287 if (r) { in process_wait() 325 if (r == -1) { in process_wait() 359 if (r < 0) { in process_output_size() 370 int r; in process_copy_output() local 373 if (r < 0) { in process_copy_output() [all …]
|
H A D | test-udp-send-immediate.c | 101 int r; in TEST_IMPL() local 105 r = uv_udp_init(uv_default_loop(), &server); in TEST_IMPL() 106 ASSERT_OK(r); in TEST_IMPL() 109 ASSERT_OK(r); in TEST_IMPL() 112 ASSERT_OK(r); in TEST_IMPL() 116 r = uv_udp_init(uv_default_loop(), &client); in TEST_IMPL() 117 ASSERT_OK(r); in TEST_IMPL() 122 r = uv_udp_send(&req1, in TEST_IMPL() 128 ASSERT_OK(r); in TEST_IMPL() 132 r = uv_udp_send(&req2, in TEST_IMPL() [all …]
|
/libuv/src/unix/ |
H A D | core.c | 116 int r; in uv_clock_gettime() local 132 if (r) in uv_clock_gettime() 229 int r; in uv__socket_sockopt() local 417 int r; in uv_run() local 452 for (r = 0; r < 8 && !uv__queue_empty(&loop->pending_queue); r++) in uv_run() 643 int r; in uv__nonblock_ioctl() local 649 if (r) in uv__nonblock_ioctl() 659 int r; in uv__nonblock_fcntl() local 681 if (r) in uv__nonblock_fcntl() 1322 for (r = 0; gp.gr_mem[r] != NULL; r++) { in uv_os_get_group() [all …]
|