Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

unix, windows: rename uv_run2 to uv_run

This changes the prototype of uv_run() from:

  int uv_run(uv_loop_t* loop);

To:

  int uv_run(uv_loop_t* loop, uv_run_mode mode);

Where `mode` is UV_RUN_DEFAULT, UV_RUN_ONCE or UV_RUN_NOWAIT.

Fixes #683.
  • Loading branch information...
commit 4ba03ddd569bdd361b1498d5f19ec0075db01500 1 parent 4cbd5c7
@bnoordhuis bnoordhuis authored
Showing with 214 additions and 230 deletions.
  1. +1 −7 include/uv.h
  2. +1 −6 src/unix/core.c
  3. +1 −6 src/win/core.c
  4. +1 −1  test/benchmark-async-pummel.c
  5. +2 −2 test/benchmark-async.c
  6. +2 −2 test/benchmark-fs-stat.c
  7. +1 −1  test/benchmark-getaddrinfo.c
  8. +2 −2 test/benchmark-loop-count.c
  9. +1 −1  test/benchmark-million-async.c
  10. +2 −2 test/benchmark-million-timers.c
  11. +5 −5 test/benchmark-multi-accept.c
  12. +1 −1  test/benchmark-ping-pongs.c
  13. +1 −1  test/benchmark-pound.c
  14. +4 −4 test/benchmark-pump.c
  15. +1 −1  test/benchmark-spawn.c
  16. +1 −1  test/benchmark-tcp-write-batch.c
  17. +1 −1  test/benchmark-udp-pummel.c
  18. +1 −1  test/blackhole-server.c
  19. +1 −1  test/dns-server.c
  20. +4 −4 test/echo-server.c
  21. +1 −1  test/test-active.c
  22. +1 −1  test/test-async.c
  23. +1 −1  test/test-callback-order.c
  24. +1 −1  test/test-callback-stack.c
  25. +1 −1  test/test-connection-fail.c
  26. +1 −1  test/test-delayed-accept.c
  27. +2 −2 test/test-embed.c
  28. +9 −9 test/test-fs-event.c
  29. +1 −1  test/test-fs-poll.c
  30. +38 −38 test/test-fs.c
  31. +2 −2 test/test-getaddrinfo.c
  32. +2 −2 test/test-getsockname.c
  33. +1 −1  test/test-idle.c
  34. +2 −2 test/test-ipc-send-recv.c
  35. +3 −3 test/test-ipc.c
  36. +1 −1  test/test-loop-handles.c
  37. +1 −1  test/test-multiple-listen.c
  38. +3 −3 test/test-ping-pong.c
  39. +4 −4 test/test-pipe-bind-error.c
  40. +2 −2 test/test-pipe-connect-error.c
  41. +1 −1  test/test-poll-close.c
  42. +1 −1  test/test-poll.c
  43. +24 −24 test/test-ref.c
  44. +1 −1  test/test-run-nowait.c
  45. +1 −1  test/test-run-once.c
  46. +2 −2 test/test-shutdown-close.c
  47. +1 −1  test/test-shutdown-eof.c
  48. +4 −4 test/test-signal-multiple-loops.c
  49. +4 −4 test/test-signal.c
  50. +19 −19 test/test-spawn.c
  51. +3 −3 test/test-stdio-over-pipes.c
  52. +5 −5 test/test-tcp-bind-error.c
  53. +4 −4 test/test-tcp-bind6-error.c
  54. +1 −1  test/test-tcp-close-while-connecting.c
  55. +1 −1  test/test-tcp-close.c
  56. +1 −1  test/test-tcp-connect-error-after-write.c
  57. +1 −1  test/test-tcp-connect-error.c
  58. +1 −1  test/test-tcp-connect-timeout.c
  59. +1 −1  test/test-tcp-connect6-error.c
  60. +1 −1  test/test-tcp-flags.c
  61. +1 −1  test/test-tcp-open.c
  62. +1 −1  test/test-tcp-read-stop.c
  63. +1 −1  test/test-tcp-shutdown-after-write.c
  64. +1 −1  test/test-tcp-unexpected-read.c
  65. +1 −1  test/test-tcp-write-to-half-open-connection.c
  66. +1 −1  test/test-tcp-writealot.c
  67. +1 −1  test/test-thread.c
  68. +5 −5 test/test-threadpool-cancel.c
  69. +2 −2 test/test-threadpool.c
  70. +1 −1  test/test-timer-again.c
  71. +2 −2 test/test-timer.c
  72. +1 −1  test/test-tty.c
  73. +1 −1  test/test-udp-dgram-too-big.c
  74. +1 −1  test/test-udp-ipv6.c
  75. +1 −1  test/test-udp-multicast-join.c
  76. +1 −1  test/test-udp-multicast-ttl.c
  77. +1 −1  test/test-udp-open.c
  78. +1 −1  test/test-udp-options.c
  79. +1 −1  test/test-udp-send-and-recv.c
  80. +1 −1  test/test-walk-handles.c
View
8 include/uv.h
@@ -245,12 +245,6 @@ UV_EXTERN void uv_loop_delete(uv_loop_t*);
UV_EXTERN uv_loop_t* uv_default_loop(void);
/*
- * This function starts the event loop. It blocks until the reference count
- * of the loop drops to zero. Always returns zero.
- */
-UV_EXTERN int uv_run(uv_loop_t*);
-
-/*
* This function runs the event loop. It will act differently depending on the
* specified mode:
* - UV_RUN_DEFAULT: Runs the event loop until the reference count drops to
@@ -262,7 +256,7 @@ UV_EXTERN int uv_run(uv_loop_t*);
* - UV_RUN_NOWAIT: Poll for new events once but don't block if there are no
* pending events.
*/
-UV_EXTERN int uv_run2(uv_loop_t*, uv_run_mode mode);
+UV_EXTERN int uv_run(uv_loop_t*, uv_run_mode mode);
/*
* Manually modify the event loop's reference count. Useful if the user wants
View
7 src/unix/core.c
@@ -279,7 +279,7 @@ static int uv__loop_alive(uv_loop_t* loop) {
}
-int uv_run2(uv_loop_t* loop, uv_run_mode mode) {
+int uv_run(uv_loop_t* loop, uv_run_mode mode) {
int r;
if (!uv__loop_alive(loop))
@@ -301,11 +301,6 @@ int uv_run2(uv_loop_t* loop, uv_run_mode mode) {
}
-int uv_run(uv_loop_t* loop) {
- return uv_run2(loop, UV_RUN_DEFAULT);
-}
-
-
void uv_update_time(uv_loop_t* loop) {
uv__update_time(loop);
}
View
7 src/win/core.c
@@ -252,7 +252,7 @@ static void uv_poll_ex(uv_loop_t* loop, int block) {
!ngx_queue_empty(&(loop)->active_reqs) || \
(loop)->endgame_handles != NULL)
-int uv_run2(uv_loop_t *loop, uv_run_mode mode) {
+int uv_run(uv_loop_t *loop, uv_run_mode mode) {
int r;
void (*poll)(uv_loop_t* loop, int block);
@@ -291,8 +291,3 @@ int uv_run2(uv_loop_t *loop, uv_run_mode mode) {
}
return r;
}
-
-
-int uv_run(uv_loop_t* loop) {
- return uv_run2(loop, UV_RUN_DEFAULT);
-}
View
2  test/benchmark-async-pummel.c
@@ -78,7 +78,7 @@ static int test_async_pummel(int nthreads) {
time = uv_hrtime();
- ASSERT(0 == uv_run(uv_default_loop()));
+ ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
time = uv_hrtime() - time;
done = 1;
View
4 test/benchmark-async.c
@@ -67,7 +67,7 @@ static void main_async_cb(uv_async_t* handle, int status) {
static void worker(void* arg) {
struct ctx* ctx = arg;
ASSERT(0 == uv_async_send(&ctx->main_async));
- ASSERT(0 == uv_run(ctx->loop));
+ ASSERT(0 == uv_run(ctx->loop, UV_RUN_DEFAULT));
}
@@ -92,7 +92,7 @@ static int test_async(int nthreads) {
time = uv_hrtime();
- ASSERT(0 == uv_run(uv_default_loop()));
+ ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
for (i = 0; i < nthreads; i++)
ASSERT(0 == uv_thread_join(&threads[i].thread));
View
4 test/benchmark-fs-stat.c
@@ -51,7 +51,7 @@ static void warmup(const char* path) {
for (i = 0; i < ARRAY_SIZE(reqs); i++)
uv_fs_stat(uv_default_loop(), reqs + i, path, uv_fs_req_cleanup);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
/* warm up the OS dirent cache */
for (i = 0; i < 16; i++)
@@ -108,7 +108,7 @@ static void async_bench(const char* path) {
}
before = uv_hrtime();
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
after = uv_hrtime();
printf("%s stats (%d concurrent): %.2fs (%s/s)\n",
View
2  test/benchmark-getaddrinfo.c
@@ -75,7 +75,7 @@ BENCHMARK_IMPL(getaddrinfo) {
getaddrinfo_initiate(&handles[i]);
}
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
uv_update_time(loop);
end_time = uv_now(loop);
View
4 test/benchmark-loop-count.c
@@ -57,7 +57,7 @@ BENCHMARK_IMPL(loop_count) {
uv_idle_start(&idle_handle, idle_cb);
ns = uv_hrtime();
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ns = uv_hrtime() - ns;
ASSERT(ticks == NUM_TICKS);
@@ -81,7 +81,7 @@ BENCHMARK_IMPL(loop_count_timed) {
uv_timer_init(loop, &timer_handle);
uv_timer_start(&timer_handle, timer_cb, 5000, 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
LOGF("loop_count: %lu ticks (%.0f ticks/s)\n", ticks, ticks / 5.0);
View
2  test/benchmark-million-async.c
@@ -99,7 +99,7 @@ BENCHMARK_IMPL(million_async) {
ASSERT(0 == uv_timer_init(loop, &timer_handle));
ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, timeout, 0));
ASSERT(0 == uv_thread_create(&thread_id, thread_cb, NULL));
- ASSERT(0 == uv_run(loop));
+ ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
printf("%s async events in %.1f seconds (%s/s, %s unique handles seen)\n",
fmt(container->async_events),
timeout / 1000.,
View
4 test/benchmark-million-timers.c
@@ -59,13 +59,13 @@ BENCHMARK_IMPL(million_timers) {
}
before = uv_hrtime();
- ASSERT(0 == uv_run(loop));
+ ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
after = uv_hrtime();
for (i = 0; i < NUM_TIMERS; i++)
uv_close((uv_handle_t*) (timers + i), close_cb);
- ASSERT(0 == uv_run(loop));
+ ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
ASSERT(timer_cb_called == NUM_TIMERS);
ASSERT(close_cb_called == NUM_TIMERS);
free(timers);
View
10 test/benchmark-multi-accept.c
@@ -214,9 +214,9 @@ static void send_listen_handles(uv_handle_type type,
for (i = 0; i < num_servers; i++)
uv_sem_post(&servers[i].semaphore);
- ASSERT(0 == uv_run(loop));
+ ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
uv_close((uv_handle_t*) &ctx.server_handle, NULL);
- ASSERT(0 == uv_run(loop));
+ ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
for (i = 0; i < num_servers; i++)
uv_sem_wait(&servers[i].semaphore);
@@ -234,7 +234,7 @@ static void get_listen_handle(uv_loop_t* loop, uv_stream_t* server_handle) {
&ctx.ipc_pipe,
IPC_PIPE_NAME,
ipc_connect_cb);
- ASSERT(0 == uv_run(loop));
+ ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
}
@@ -258,7 +258,7 @@ static void server_cb(void *arg) {
ASSERT(0 == uv_listen((uv_stream_t*) &ctx->server_handle,
128,
sv_connection_cb));
- ASSERT(0 == uv_run(loop));
+ ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
uv_loop_delete(loop);
}
@@ -383,7 +383,7 @@ static int test_tcp(unsigned int num_servers, unsigned int num_clients) {
{
uint64_t t = uv_hrtime();
- ASSERT(0 == uv_run(loop));
+ ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
t = uv_hrtime() - t;
time = t / 1e9;
}
View
2  test/benchmark-ping-pongs.c
@@ -203,7 +203,7 @@ BENCHMARK_IMPL(ping_pongs) {
start_time = uv_now(loop);
pinger_new();
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(completed_pingers == 1);
View
2  test/benchmark-pound.c
@@ -287,7 +287,7 @@ static int pound_it(int concurrency,
r = do_connect(concurrency, make_connect, arg);
ASSERT(!r);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
end_time = uv_hrtime();
View
8 test/benchmark-pump.c
@@ -373,7 +373,7 @@ HELPER_IMPL(tcp_pump_server) {
r = uv_listen((uv_stream_t*)&tcpServer, MAX_WRITE_HANDLES, connection_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
return 0;
}
@@ -394,7 +394,7 @@ HELPER_IMPL(pipe_pump_server) {
r = uv_listen((uv_stream_t*)&pipeServer, MAX_WRITE_HANDLES, connection_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
MAKE_VALGRIND_HAPPY();
return 0;
@@ -413,7 +413,7 @@ static void tcp_pump(int n) {
/* Start making connections */
maybe_connect_some();
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
MAKE_VALGRIND_HAPPY();
}
@@ -429,7 +429,7 @@ static void pipe_pump(int n) {
/* Start making connections */
maybe_connect_some();
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
MAKE_VALGRIND_HAPPY();
}
View
2  test/benchmark-spawn.c
@@ -149,7 +149,7 @@ BENCHMARK_IMPL(spawn) {
spawn();
- r = uv_run(loop);
+ r = uv_run(loop, UV_RUN_DEFAULT);
ASSERT(r == 0);
uv_update_time(loop);
View
2  test/benchmark-tcp-write-batch.c
@@ -122,7 +122,7 @@ BENCHMARK_IMPL(tcp_write_batch) {
start = uv_hrtime();
- r = uv_run(loop);
+ r = uv_run(loop, UV_RUN_DEFAULT);
ASSERT(r == 0);
stop = uv_hrtime();
View
2  test/benchmark-udp-pummel.c
@@ -195,7 +195,7 @@ static int pummel(unsigned int n_senders,
}
duration = uv_hrtime();
- ASSERT(0 == uv_run(loop));
+ ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
duration = uv_hrtime() - duration;
/* convert from nanoseconds to milliseconds */
duration = duration / (uint64_t) 1e6;
View
2  test/blackhole-server.c
@@ -111,7 +111,7 @@ HELPER_IMPL(tcp4_blackhole_server) {
r = uv_listen((uv_stream_t*)&tcp_server, 128, connection_cb);
ASSERT(r == 0);
- r = uv_run(loop);
+ r = uv_run(loop, UV_RUN_DEFAULT);
ASSERT(0 && "Blackhole server dropped out of event loop.");
return 0;
View
2  test/dns-server.c
@@ -324,6 +324,6 @@ HELPER_IMPL(dns_server) {
if (dns_start(TEST_PORT_2))
return 1;
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
return 0;
}
View
8 test/echo-server.c
@@ -346,7 +346,7 @@ HELPER_IMPL(tcp4_echo_server) {
if (tcp4_echo_start(TEST_PORT))
return 1;
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
return 0;
}
@@ -357,7 +357,7 @@ HELPER_IMPL(tcp6_echo_server) {
if (tcp6_echo_start(TEST_PORT))
return 1;
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
return 0;
}
@@ -368,7 +368,7 @@ HELPER_IMPL(pipe_echo_server) {
if (pipe_echo_start(TEST_PIPENAME))
return 1;
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
return 0;
}
@@ -379,6 +379,6 @@ HELPER_IMPL(udp4_echo_server) {
if (udp4_echo_start(TEST_PORT))
return 1;
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
return 0;
}
View
2  test/test-active.c
@@ -73,7 +73,7 @@ TEST_IMPL(active) {
ASSERT(!uv_is_active((uv_handle_t*) &timer));
ASSERT(uv_is_closing((uv_handle_t*) &timer));
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(close_cb_called == 1);
View
2  test/test-async.c
@@ -122,7 +122,7 @@ TEST_IMPL(async) {
r = uv_async_init(uv_default_loop(), &async, async_cb);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(prepare_cb_called > 0);
View
2  test/test-callback-order.c
@@ -67,7 +67,7 @@ TEST_IMPL(callback_order) {
ASSERT(idle_cb_called == 0);
ASSERT(timer_cb_called == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(idle_cb_called == 1);
ASSERT(timer_cb_called == 1);
View
2  test/test-callback-stack.c
@@ -189,7 +189,7 @@ TEST_IMPL(callback_stack) {
}
nested--;
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(nested == 0);
ASSERT(connect_cb_called == 1 && "connect_cb must be called exactly once");
View
2  test/test-connection-fail.c
@@ -107,7 +107,7 @@ static void connection_fail(uv_connect_cb connect_cb) {
r = uv_tcp_connect(&req, &tcp, server_addr, connect_cb);
ASSERT(!r);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(connect_cb_calls == 1);
ASSERT(close_cb_calls == 1);
View
2  test/test-delayed-accept.c
@@ -177,7 +177,7 @@ TEST_IMPL(delayed_accept) {
client_connect();
client_connect();
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(connection_cb_called == 2);
ASSERT(do_accept_called == 2);
View
4 test/test-embed.c
@@ -88,7 +88,7 @@ static void embed_thread_runner(void* arg) {
static void embed_cb(uv_async_t* async, int status) {
- uv_run2(uv_default_loop(), UV_RUN_ONCE);
+ uv_run(uv_default_loop(), UV_RUN_ONCE);
uv_sem_post(&embed_sem);
}
@@ -124,7 +124,7 @@ TEST_IMPL(embed) {
uv_thread_create(&embed_thread, embed_thread_runner, NULL);
/* But run external loop */
- uv_run(external);
+ uv_run(external, UV_RUN_DEFAULT);
uv_thread_join(&embed_thread);
uv_loop_delete(external);
View
18 test/test-fs-event.c
@@ -194,7 +194,7 @@ TEST_IMPL(fs_event_watch_dir) {
r = uv_timer_start(&timer, timer_cb_dir, 100, 0);
ASSERT(r != -1);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(fs_event_cb_called == 1);
ASSERT(timer_cb_called == 1);
@@ -228,7 +228,7 @@ TEST_IMPL(fs_event_watch_file) {
r = uv_timer_start(&timer, timer_cb_file, 100, 100);
ASSERT(r != -1);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(fs_event_cb_called == 1);
ASSERT(timer_cb_called == 2);
@@ -256,7 +256,7 @@ TEST_IMPL(fs_event_watch_file_twice) {
ASSERT(0 == uv_fs_event_init(loop, watchers + 1, path, fail_cb, 0));
ASSERT(0 == uv_timer_init(loop, &timer));
ASSERT(0 == uv_timer_start(&timer, timer_cb_watch_twice, 10, 0));
- ASSERT(0 == uv_run(loop));
+ ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
MAKE_VALGRIND_HAPPY();
return 0;
@@ -287,7 +287,7 @@ TEST_IMPL(fs_event_watch_file_current_dir) {
ASSERT(fs_event_cb_called == 0);
ASSERT(close_cb_called == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(timer_cb_touch_called == 1);
ASSERT(fs_event_cb_called == 1);
@@ -319,7 +319,7 @@ TEST_IMPL(fs_event_no_callback_after_close) {
uv_close((uv_handle_t*)&fs_event, close_cb);
touch_file(loop, "watch_dir/file1");
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(fs_event_cb_called == 0);
ASSERT(close_cb_called == 1);
@@ -351,7 +351,7 @@ TEST_IMPL(fs_event_no_callback_on_close) {
uv_close((uv_handle_t*)&fs_event, close_cb);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(fs_event_cb_called == 0);
ASSERT(close_cb_called == 1);
@@ -397,7 +397,7 @@ TEST_IMPL(fs_event_immediate_close) {
r = uv_timer_start(&timer, timer_cb, 1, 0);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(close_cb_called == 2);
@@ -423,7 +423,7 @@ TEST_IMPL(fs_event_close_with_pending_event) {
uv_close((uv_handle_t*)&fs_event, close_cb);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(close_cb_called == 1);
@@ -484,7 +484,7 @@ TEST_IMPL(fs_event_close_in_callback) {
touch_file(loop, "watch_dir/file4");
touch_file(loop, "watch_dir/file5");
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(close_cb_called == 1);
ASSERT(fs_event_cb_called == 3);
View
2  test/test-fs-poll.c
@@ -137,7 +137,7 @@ TEST_IMPL(fs_poll) {
ASSERT(0 == uv_timer_init(loop, &timer_handle));
ASSERT(0 == uv_fs_poll_init(loop, &poll_handle));
ASSERT(0 == uv_fs_poll_start(&poll_handle, poll_cb, FIXTURE, 100));
- ASSERT(0 == uv_run(loop));
+ ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
ASSERT(poll_cb_called == 5);
ASSERT(timer_cb_called == 2);
View
76 test/test-fs.c
@@ -477,7 +477,7 @@ TEST_IMPL(fs_file_noent) {
ASSERT(r == 0);
ASSERT(open_cb_count == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(open_cb_count == 1);
/* TODO add EACCES test */
@@ -506,7 +506,7 @@ TEST_IMPL(fs_file_nametoolong) {
ASSERT(r == 0);
ASSERT(open_cb_count == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(open_cb_count == 1);
MAKE_VALGRIND_HAPPY();
@@ -533,7 +533,7 @@ TEST_IMPL(fs_file_loop) {
ASSERT(r == 0);
ASSERT(open_cb_count == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(open_cb_count == 1);
unlink("test_symlink");
@@ -610,7 +610,7 @@ TEST_IMPL(fs_file_async) {
r = uv_fs_open(loop, &open_req1, "test_file", O_WRONLY | O_CREAT,
S_IREAD | S_IWRITE, create_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(create_cb_count == 1);
ASSERT(write_cb_count == 1);
@@ -621,7 +621,7 @@ TEST_IMPL(fs_file_async) {
r = uv_fs_rename(loop, &rename_req, "test_file", "test_file2", rename_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(create_cb_count == 1);
ASSERT(write_cb_count == 1);
ASSERT(close_cb_count == 1);
@@ -630,7 +630,7 @@ TEST_IMPL(fs_file_async) {
r = uv_fs_open(loop, &open_req1, "test_file2", O_RDWR, 0, open_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(open_cb_count == 1);
ASSERT(read_cb_count == 1);
ASSERT(close_cb_count == 2);
@@ -642,7 +642,7 @@ TEST_IMPL(fs_file_async) {
r = uv_fs_open(loop, &open_req1, "test_file2", O_RDONLY, 0, open_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(open_cb_count == 2);
ASSERT(read_cb_count == 2);
ASSERT(close_cb_count == 3);
@@ -759,7 +759,7 @@ TEST_IMPL(fs_async_dir) {
r = uv_fs_mkdir(loop, &mkdir_req, "test_dir", 0755, mkdir_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(mkdir_cb_count == 1);
/* Create 2 files synchronously. */
@@ -782,7 +782,7 @@ TEST_IMPL(fs_async_dir) {
r = uv_fs_readdir(loop, &readdir_req, "test_dir", 0, readdir_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(readdir_cb_count == 1);
/* sync uv_fs_readdir */
@@ -797,35 +797,35 @@ TEST_IMPL(fs_async_dir) {
r = uv_fs_stat(loop, &stat_req, "test_dir", stat_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
r = uv_fs_stat(loop, &stat_req, "test_dir/", stat_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
r = uv_fs_lstat(loop, &stat_req, "test_dir", stat_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
r = uv_fs_lstat(loop, &stat_req, "test_dir/", stat_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(stat_cb_count == 4);
r = uv_fs_unlink(loop, &unlink_req, "test_dir/file1", unlink_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(unlink_cb_count == 1);
r = uv_fs_unlink(loop, &unlink_req, "test_dir/file2", unlink_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(unlink_cb_count == 2);
r = uv_fs_rmdir(loop, &rmdir_req, "test_dir", rmdir_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(rmdir_cb_count == 1);
/* Cleanup */
@@ -878,7 +878,7 @@ TEST_IMPL(fs_async_sendfile) {
r = uv_fs_sendfile(loop, &sendfile_req, open_req2.result, open_req1.result,
0, 131072, sendfile_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(sendfile_cb_count == 1);
@@ -935,7 +935,7 @@ TEST_IMPL(fs_fstat) {
/* Now do the uv_fs_fstat call asynchronously */
r = uv_fs_fstat(loop, &req, file, fstat_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(fstat_cb_count == 1);
@@ -948,7 +948,7 @@ TEST_IMPL(fs_fstat) {
* Run the loop just to check we don't have make any extraneous uv_ref()
* calls. This should drop out immediately.
*/
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
/* Cleanup. */
unlink("test_file");
@@ -1014,7 +1014,7 @@ TEST_IMPL(fs_chmod) {
}
r = uv_fs_chmod(loop, &req, "test_file", 0200, chmod_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(chmod_cb_count == 1);
chmod_cb_count = 0; /* reset for the next test */
#endif
@@ -1026,7 +1026,7 @@ TEST_IMPL(fs_chmod) {
}
r = uv_fs_chmod(loop, &req, "test_file", 0400, chmod_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(chmod_cb_count == 1);
/* async fchmod */
@@ -1036,7 +1036,7 @@ TEST_IMPL(fs_chmod) {
}
r = uv_fs_fchmod(loop, &req, file, 0600, fchmod_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(fchmod_cb_count == 1);
close(file);
@@ -1045,7 +1045,7 @@ TEST_IMPL(fs_chmod) {
* Run the loop just to check we don't have make any extraneous uv_ref()
* calls. This should drop out immediately.
*/
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
/* Cleanup. */
unlink("test_file");
@@ -1087,19 +1087,19 @@ TEST_IMPL(fs_chown) {
/* async chown */
r = uv_fs_chown(loop, &req, "test_file", -1, -1, chown_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(chown_cb_count == 1);
/* chown to root (fail) */
chown_cb_count = 0;
r = uv_fs_chown(loop, &req, "test_file", 0, 0, chown_root_cb);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(chown_cb_count == 1);
/* async fchown */
r = uv_fs_fchown(loop, &req, file, -1, -1, fchown_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(fchown_cb_count == 1);
close(file);
@@ -1108,7 +1108,7 @@ TEST_IMPL(fs_chown) {
* Run the loop just to check we don't have make any extraneous uv_ref()
* calls. This should drop out immediately.
*/
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
/* Cleanup. */
unlink("test_file");
@@ -1168,7 +1168,7 @@ TEST_IMPL(fs_link) {
/* async link */
r = uv_fs_link(loop, &req, "test_file", "test_file_link2", link_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(link_cb_count == 1);
r = uv_fs_open(loop, &req, "test_file_link2", O_RDWR, 0, NULL);
@@ -1189,7 +1189,7 @@ TEST_IMPL(fs_link) {
* Run the loop just to check we don't have make any extraneous uv_ref()
* calls. This should drop out immediately.
*/
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
/* Cleanup. */
unlink("test_file");
@@ -1206,7 +1206,7 @@ TEST_IMPL(fs_readlink) {
loop = uv_default_loop();
ASSERT(0 == uv_fs_readlink(loop, &req, "no_such_file", dummy_cb));
- ASSERT(0 == uv_run(loop));
+ ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
ASSERT(dummy_cb_count == 1);
ASSERT(req.ptr == NULL);
ASSERT(req.result == -1);
@@ -1302,7 +1302,7 @@ TEST_IMPL(fs_symlink) {
/* async link */
r = uv_fs_symlink(loop, &req, "test_file", "test_file_symlink2", 0, symlink_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(symlink_cb_count == 1);
r = uv_fs_open(loop, &req, "test_file_symlink2", O_RDWR, 0, NULL);
@@ -1325,14 +1325,14 @@ TEST_IMPL(fs_symlink) {
r = uv_fs_readlink(loop, &req, "test_file_symlink2_symlink", readlink_cb);
ASSERT(r != -1);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(readlink_cb_count == 1);
/*
* Run the loop just to check we don't have make any extraneous uv_ref()
* calls. This should drop out immediately.
*/
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
/* Cleanup. */
unlink("test_file");
@@ -1498,7 +1498,7 @@ TEST_IMPL(fs_utime) {
utime_req.data = &checkme;
r = uv_fs_utime(loop, &utime_req, path, atime, mtime, utime_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(utime_cb_count == 1);
/* Cleanup. */
@@ -1590,7 +1590,7 @@ TEST_IMPL(fs_futime) {
futime_req.data = &checkme;
r = uv_fs_futime(loop, &futime_req, file, atime, mtime, futime_cb);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(futime_cb_count == 1);
/* Cleanup. */
@@ -1639,7 +1639,7 @@ TEST_IMPL(fs_readdir_empty_dir) {
ASSERT(r == 0);
ASSERT(readdir_cb_count == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(readdir_cb_count == 1);
uv_fs_rmdir(loop, &req, path, NULL);
@@ -1666,7 +1666,7 @@ TEST_IMPL(fs_readdir_file) {
ASSERT(r == 0);
ASSERT(readdir_cb_count == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(readdir_cb_count == 1);
MAKE_VALGRIND_HAPPY();
@@ -1696,7 +1696,7 @@ TEST_IMPL(fs_open_dir) {
ASSERT(r == 0);
ASSERT(open_cb_count == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(open_cb_count == 1);
MAKE_VALGRIND_HAPPY();
View
4 test/test-getaddrinfo.c
@@ -80,7 +80,7 @@ TEST_IMPL(getaddrinfo_basic) {
NULL);
ASSERT(r == 0);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(getaddrinfo_cbs == 1);
@@ -109,7 +109,7 @@ TEST_IMPL(getaddrinfo_concurrent) {
ASSERT(r == 0);
}
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
for (i = 0; i < CONCURRENT_COUNT; i++) {
ASSERT(callback_counts[i] == 1);
View
4 test/test-getsockname.c
@@ -317,7 +317,7 @@ TEST_IMPL(getsockname_tcp) {
tcp_connector();
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(getsocknamecount == 3);
ASSERT(getpeernamecount == 3);
@@ -335,7 +335,7 @@ TEST_IMPL(getsockname_udp) {
udp_sender();
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(getsocknamecount == 2);
View
2  test/test-idle.c
@@ -70,7 +70,7 @@ TEST_IMPL(idle_starvation) {
r = uv_timer_start(&timer_handle, timer_cb, 50, 0);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(idle_cb_called > 0);
View
4 test/test-ipc-send-recv.c
@@ -103,7 +103,7 @@ static int run_test(void) {
r = uv_read2_start((uv_stream_t*)&ctx.channel, alloc_cb, recv_cb);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(num_recv_handles == 1);
@@ -210,7 +210,7 @@ int ipc_send_recv_helper(void) {
r = uv_read2_start((uv_stream_t*)&ctx.channel, alloc_cb, read2_cb);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
MAKE_VALGRIND_HAPPY();
View
6 test/test-ipc.c
@@ -318,7 +318,7 @@ static int run_ipc_test(const char* helper, uv_read2_cb read_cb) {
spawn_helper(&channel, &process, helper);
uv_read2_start((uv_stream_t*)&channel, on_alloc, read_cb);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
MAKE_VALGRIND_HAPPY();
@@ -567,7 +567,7 @@ int ipc_helper(int listen_after_write) {
ASSERT(r == 0);
}
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(connection_accepted == 1);
@@ -613,7 +613,7 @@ int ipc_helper_tcp_connection(void) {
r = uv_tcp_connect(&conn.conn_req, (uv_tcp_t*)&conn.conn, addr, connect_child_process_cb);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(tcp_conn_read_cb_called == 1);
View
2  test/test-loop-handles.c
@@ -312,7 +312,7 @@ TEST_IMPL(loop_handles) {
ASSERT(r == 0);
uv_unref((uv_handle_t*)&timer_handle);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(loop_iteration == ITERATIONS);
View
2  test/test-multiple-listen.c
@@ -92,7 +92,7 @@ TEST_IMPL(multiple_listen) {
client_connect();
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(connection_cb_called == 1);
ASSERT(connect_cb_called == 1);
View
6 test/test-ping-pong.c
@@ -219,7 +219,7 @@ static void pipe_pinger_new(void) {
TEST_IMPL(tcp_ping_pong) {
tcp_pinger_new();
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(completed_pingers == 1);
@@ -230,7 +230,7 @@ TEST_IMPL(tcp_ping_pong) {
TEST_IMPL(tcp_ping_pong_v6) {
tcp_pinger_v6_new();
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(completed_pingers == 1);
@@ -241,7 +241,7 @@ TEST_IMPL(tcp_ping_pong_v6) {
TEST_IMPL(pipe_ping_pong) {
pipe_pinger_new();
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(completed_pingers == 1);
View
8 test/test-pipe-bind-error.c
@@ -67,7 +67,7 @@ TEST_IMPL(pipe_bind_error_addrinuse) {
uv_close((uv_handle_t*)&server1, close_cb);
uv_close((uv_handle_t*)&server2, close_cb);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(close_cb_called == 2);
@@ -89,7 +89,7 @@ TEST_IMPL(pipe_bind_error_addrnotavail) {
uv_close((uv_handle_t*)&server, close_cb);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(close_cb_called == 1);
@@ -113,7 +113,7 @@ TEST_IMPL(pipe_bind_error_inval) {
uv_close((uv_handle_t*)&server, close_cb);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(close_cb_called == 1);
@@ -135,7 +135,7 @@ TEST_IMPL(pipe_listen_without_bind) {
uv_close((uv_handle_t*)&server, close_cb);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(close_cb_called == 1);
View
4 test/test-pipe-connect-error.c
@@ -68,7 +68,7 @@ TEST_IMPL(pipe_connect_bad_name) {
ASSERT(r == 0);
uv_pipe_connect(&req, &client, BAD_PIPENAME, connect_cb);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(close_cb_called == 1);
ASSERT(connect_cb_called == 1);
@@ -88,7 +88,7 @@ TEST_IMPL(pipe_connect_to_file) {
ASSERT(r == 0);
uv_pipe_connect(&req, &client, path, connect_cb_file);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(close_cb_called == 1);
ASSERT(connect_cb_called == 1);
View
2  test/test-poll-close.c
@@ -64,7 +64,7 @@ TEST_IMPL(poll_close) {
uv_close((uv_handle_t*) &poll_handles[i], close_cb);
}
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(close_cb_called == NUM_SOCKETS);
View
2  test/test-poll.c
@@ -547,7 +547,7 @@ static void start_poll_test(void) {
for (i = 0; i < NUM_CLIENTS; i++)
start_client();
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
/* Assert that at most five percent of the writable wakeups was spurious. */
View
48 test/test-ref.c
@@ -48,7 +48,7 @@ static void do_close(void* handle) {
close_cb_called = 0;
uv_close((uv_handle_t*)handle, close_cb);
ASSERT(close_cb_called == 0);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(close_cb_called == 1);
}
@@ -100,7 +100,7 @@ static void connect_and_shutdown(uv_connect_t* req, int status) {
TEST_IMPL(ref) {
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
MAKE_VALGRIND_HAPPY();
return 0;
}
@@ -111,7 +111,7 @@ TEST_IMPL(idle_ref) {
uv_idle_init(uv_default_loop(), &h);
uv_idle_start(&h, (uv_idle_cb) fail_cb2);
uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
do_close(&h);
MAKE_VALGRIND_HAPPY();
return 0;
@@ -122,7 +122,7 @@ TEST_IMPL(async_ref) {
uv_async_t h;
uv_async_init(uv_default_loop(), &h, NULL);
uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
do_close(&h);
MAKE_VALGRIND_HAPPY();
return 0;
@@ -134,7 +134,7 @@ TEST_IMPL(prepare_ref) {
uv_prepare_init(uv_default_loop(), &h);
uv_prepare_start(&h, (uv_prepare_cb) fail_cb2);
uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
do_close(&h);
MAKE_VALGRIND_HAPPY();
return 0;
@@ -146,7 +146,7 @@ TEST_IMPL(check_ref) {
uv_check_init(uv_default_loop(), &h);
uv_check_start(&h, (uv_check_cb) fail_cb2);
uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
do_close(&h);
MAKE_VALGRIND_HAPPY();
return 0;
@@ -164,7 +164,7 @@ TEST_IMPL(unref_in_prepare_cb) {
uv_prepare_t h;
uv_prepare_init(uv_default_loop(), &h);
uv_prepare_start(&h, prepare_cb);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
do_close(&h);
MAKE_VALGRIND_HAPPY();
return 0;
@@ -175,7 +175,7 @@ TEST_IMPL(timer_ref) {
uv_timer_t h;
uv_timer_init(uv_default_loop(), &h);
uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
do_close(&h);
MAKE_VALGRIND_HAPPY();
return 0;
@@ -187,7 +187,7 @@ TEST_IMPL(timer_ref2) {
uv_timer_init(uv_default_loop(), &h);
uv_timer_start(&h, (uv_timer_cb)fail_cb, 42, 42);
uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
do_close(&h);
MAKE_VALGRIND_HAPPY();
return 0;
@@ -198,7 +198,7 @@ TEST_IMPL(fs_event_ref) {
uv_fs_event_t h;
uv_fs_event_init(uv_default_loop(), &h, ".", (uv_fs_event_cb)fail_cb, 0);
uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
do_close(&h);
MAKE_VALGRIND_HAPPY();
return 0;
@@ -210,7 +210,7 @@ TEST_IMPL(fs_poll_ref) {
uv_fs_poll_init(uv_default_loop(), &h);
uv_fs_poll_start(&h, NULL, ".", 999);
uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
do_close(&h);
MAKE_VALGRIND_HAPPY();
return 0;
@@ -221,7 +221,7 @@ TEST_IMPL(tcp_ref) {
uv_tcp_t h;
uv_tcp_init(uv_default_loop(), &h);
uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
do_close(&h);
MAKE_VALGRIND_HAPPY();
return 0;
@@ -233,7 +233,7 @@ TEST_IMPL(tcp_ref2) {
uv_tcp_init(uv_default_loop(), &h);
uv_listen((uv_stream_t*)&h, 128, (uv_connection_cb)fail_cb);
uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
do_close(&h);
MAKE_VALGRIND_HAPPY();
return 0;
@@ -246,7 +246,7 @@ TEST_IMPL(tcp_ref2b) {
uv_listen((uv_stream_t*)&h, 128, (uv_connection_cb)fail_cb);
uv_unref((uv_handle_t*)&h);
uv_close((uv_handle_t*)&h, close_cb);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(close_cb_called == 1);
MAKE_VALGRIND_HAPPY();
return 0;
@@ -259,7 +259,7 @@ TEST_IMPL(tcp_ref3) {
uv_tcp_init(uv_default_loop(), &h);
uv_tcp_connect(&connect_req, &h, addr, connect_and_shutdown);
uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(connect_cb_called == 1);
ASSERT(shutdown_cb_called == 1);
do_close(&h);
@@ -274,7 +274,7 @@ TEST_IMPL(tcp_ref4) {
uv_tcp_init(uv_default_loop(), &h);
uv_tcp_connect(&connect_req, &h, addr, connect_and_write);
uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(connect_cb_called == 1);
ASSERT(write_cb_called == 1);
ASSERT(shutdown_cb_called == 1);
@@ -288,7 +288,7 @@ TEST_IMPL(udp_ref) {
uv_udp_t h;
uv_udp_init(uv_default_loop(), &h);
uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
do_close(&h);
MAKE_VALGRIND_HAPPY();
return 0;
@@ -302,7 +302,7 @@ TEST_IMPL(udp_ref2) {
uv_udp_bind(&h, addr, 0);
uv_udp_recv_start(&h, (uv_alloc_cb)fail_cb, (uv_udp_recv_cb)fail_cb);
uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
do_close(&h);
MAKE_VALGRIND_HAPPY();
return 0;
@@ -318,7 +318,7 @@ TEST_IMPL(udp_ref3) {
uv_udp_init(uv_default_loop(), &h);
uv_udp_send(&req, &h, &buf, 1, addr, (uv_udp_send_cb)req_cb);
uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(req_cb_called == 1);
do_close(&h);
@@ -331,7 +331,7 @@ TEST_IMPL(pipe_ref) {
uv_pipe_t h;
uv_pipe_init(uv_default_loop(), &h, 0);
uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
do_close(&h);
MAKE_VALGRIND_HAPPY();
return 0;
@@ -343,7 +343,7 @@ TEST_IMPL(pipe_ref2) {
uv_pipe_init(uv_default_loop(), &h, 0);
uv_listen((uv_stream_t*)&h, 128, (uv_connection_cb)fail_cb);
uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
do_close(&h);
MAKE_VALGRIND_HAPPY();
return 0;
@@ -355,7 +355,7 @@ TEST_IMPL(pipe_ref3) {
uv_pipe_init(uv_default_loop(), &h, 0);
uv_pipe_connect(&connect_req, &h, TEST_PIPENAME, connect_and_shutdown);
uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(connect_cb_called == 1);
ASSERT(shutdown_cb_called == 1);
do_close(&h);
@@ -369,7 +369,7 @@ TEST_IMPL(pipe_ref4) {
uv_pipe_init(uv_default_loop(), &h, 0);
uv_pipe_connect(&connect_req, &h, TEST_PIPENAME, connect_and_write);
uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(connect_cb_called == 1);
ASSERT(write_cb_called == 1);
ASSERT(shutdown_cb_called == 1);
@@ -403,7 +403,7 @@ TEST_IMPL(process_ref) {
ASSERT(r == 0);
uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
r = uv_process_kill(&h, /* SIGTERM */ 15);
ASSERT(r == 0);
View
2  test/test-run-nowait.c
@@ -38,7 +38,7 @@ TEST_IMPL(run_nowait) {
uv_timer_init(uv_default_loop(), &timer_handle);
uv_timer_start(&timer_handle, timer_cb, 100, 100);
- r = uv_run2(uv_default_loop(), UV_RUN_NOWAIT);
+ r = uv_run(uv_default_loop(), UV_RUN_NOWAIT);
ASSERT(r != 0);
ASSERT(timer_called == 0);
View
2  test/test-run-once.c
@@ -41,7 +41,7 @@ TEST_IMPL(run_once) {
uv_idle_init(uv_default_loop(), &idle_handle);
uv_idle_start(&idle_handle, idle_cb);
- while (uv_run2(uv_default_loop(), UV_RUN_ONCE));
+ while (uv_run(uv_default_loop(), UV_RUN_ONCE));
ASSERT(idle_counter == NUM_TICKS);
MAKE_VALGRIND_HAPPY();
View
4 test/test-shutdown-close.c
@@ -74,7 +74,7 @@ TEST_IMPL(shutdown_close_tcp) {
ASSERT(r == 0);
r = uv_tcp_connect(&connect_req, &h, addr, connect_cb);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(connect_cb_called == 1);
@@ -93,7 +93,7 @@ TEST_IMPL(shutdown_close_pipe) {
r = uv_pipe_init(uv_default_loop(), &h, 0);
ASSERT(r == 0);
uv_pipe_connect(&connect_req, &h, TEST_PIPENAME, connect_cb);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(connect_cb_called == 1);
View
2  test/test-shutdown-eof.c
@@ -168,7 +168,7 @@ TEST_IMPL(shutdown_eof) {
r = uv_tcp_connect(&connect_req, &tcp, server_addr, connect_cb);
ASSERT(!r);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(called_connect_cb == 1);
ASSERT(called_shutdown_cb == 1);
View
8 test/test-signal-multiple-loops.c
@@ -104,7 +104,7 @@ static void signal_handling_worker(void* context) {
/* Wait for all signals. The signal callbacks stop the watcher, so uv_run
* will return when all signal watchers caught a signal.
*/
- r = uv_run(loop);
+ r = uv_run(loop, UV_RUN_DEFAULT);
ASSERT(r == 0);
/* Restart the signal watchers. */
@@ -122,7 +122,7 @@ static void signal_handling_worker(void* context) {
/* Wait for signals once more. */
uv_sem_post(&sem);
- r = uv_run(loop);
+ r = uv_run(loop, UV_RUN_DEFAULT);
ASSERT(r == 0);
/* Close the watchers. */
@@ -135,7 +135,7 @@ static void signal_handling_worker(void* context) {
}
/* Wait for the signal watchers to close. */
- r = uv_run(loop);
+ r = uv_run(loop, UV_RUN_DEFAULT);
ASSERT(r == 0);
uv_loop_delete(loop);
@@ -166,7 +166,7 @@ static void loop_creating_worker(void* context) {
uv_close((uv_handle_t*) &signal, NULL);
- r = uv_run(loop);
+ r = uv_run(loop, UV_RUN_DEFAULT);
ASSERT(r == 0);
uv_loop_delete(loop);
View
8 test/test-signal.c
@@ -101,12 +101,12 @@ TEST_IMPL(we_get_signal) {
start_timer(loop, SIGCHLD, &tc);
start_watcher(loop, SIGCHLD, &sc);
sc.stop_or_close = STOP; /* stop, don't close the signal handle */
- ASSERT(0 == uv_run(loop));
+ ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
ASSERT(tc.ncalls == NSIGNALS);
ASSERT(sc.ncalls == NSIGNALS);
start_timer(loop, SIGCHLD, &tc);
- ASSERT(0 == uv_run(loop));
+ ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
ASSERT(tc.ncalls == NSIGNALS);
ASSERT(sc.ncalls == NSIGNALS);
@@ -115,7 +115,7 @@ TEST_IMPL(we_get_signal) {
uv_signal_start(&sc.handle, signal_cb, SIGCHLD);
start_timer(loop, SIGCHLD, &tc);
- ASSERT(0 == uv_run(loop));
+ ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
ASSERT(tc.ncalls == NSIGNALS);
ASSERT(sc.ncalls == NSIGNALS);
@@ -137,7 +137,7 @@ TEST_IMPL(we_get_signals) {
start_watcher(loop, SIGUSR2, sc + 3);
start_timer(loop, SIGUSR1, tc + 0);
start_timer(loop, SIGUSR2, tc + 1);
- ASSERT(0 == uv_run(loop));
+ ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
for (i = 0; i < ARRAY_SIZE(sc); i++)
ASSERT(sc[i].ncalls == NSIGNALS);
View
38 test/test-spawn.c
@@ -150,7 +150,7 @@ TEST_IMPL(spawn_fails) {
options.file = options.args[0] = "program-that-had-better-not-exist";
ASSERT(0 == uv_spawn(uv_default_loop(), &process, options));
ASSERT(0 != uv_is_active((uv_handle_t*)&process));
- ASSERT(0 == uv_run(uv_default_loop()));
+ ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
ASSERT(uv_last_error(uv_default_loop()).code == UV_ENOENT);
MAKE_VALGRIND_HAPPY();
@@ -166,7 +166,7 @@ TEST_IMPL(spawn_exit_code) {
r = uv_spawn(uv_default_loop(), &process, options);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(exit_cb_called == 1);
@@ -197,7 +197,7 @@ TEST_IMPL(spawn_stdout) {
r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(exit_cb_called == 1);
@@ -237,7 +237,7 @@ TEST_IMPL(spawn_stdout_to_file) {
r = uv_spawn(uv_default_loop(), &process, options);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(exit_cb_called == 1);
@@ -294,7 +294,7 @@ TEST_IMPL(spawn_stdin) {
r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(exit_cb_called == 1);
@@ -328,7 +328,7 @@ TEST_IMPL(spawn_stdio_greater_than_3) {
r = uv_read_start((uv_stream_t*) &pipe, on_alloc, on_read);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(exit_cb_called == 1);
@@ -352,7 +352,7 @@ TEST_IMPL(spawn_ignored_stdio) {
r = uv_spawn(uv_default_loop(), &process, options);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(exit_cb_called == 1);
@@ -377,7 +377,7 @@ TEST_IMPL(spawn_and_kill) {
r = uv_timer_start(&timer, timer_cb, 500, 0);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(exit_cb_called == 1);
@@ -414,7 +414,7 @@ TEST_IMPL(spawn_preserve_env) {
r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(exit_cb_called == 1);
@@ -441,7 +441,7 @@ TEST_IMPL(spawn_detached) {
uv_unref((uv_handle_t*)&process);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(exit_cb_called == 0);
@@ -504,7 +504,7 @@ TEST_IMPL(spawn_and_kill_with_std) {
r = uv_timer_start(&timer, timer_cb, 500, 0);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(exit_cb_called == 1);
@@ -551,7 +551,7 @@ TEST_IMPL(spawn_and_ping) {
ASSERT(exit_cb_called == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(exit_cb_called == 1);
@@ -585,7 +585,7 @@ TEST_IMPL(kill) {
err = uv_kill(process.pid, /* SIGTERM */ 15);
ASSERT(err.code == UV_OK);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(exit_cb_called == 1);
@@ -631,7 +631,7 @@ TEST_IMPL(spawn_detect_pipe_name_collisions_on_windows) {
r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(exit_cb_called == 1);
@@ -793,7 +793,7 @@ TEST_IMPL(spawn_setuid_setgid) {
r = uv_spawn(uv_default_loop(), &process, options);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(exit_cb_called == 1);
@@ -827,7 +827,7 @@ TEST_IMPL(spawn_setuid_fails) {
r = uv_spawn(uv_default_loop(), &process, options);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(exit_cb_called == 1);
@@ -859,7 +859,7 @@ TEST_IMPL(spawn_setgid_fails) {
r = uv_spawn(uv_default_loop(), &process, options);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(exit_cb_called == 1);
@@ -892,7 +892,7 @@ TEST_IMPL(spawn_setuid_fails) {
ASSERT(r == -1);
ASSERT(uv_last_error(uv_default_loop()).code == UV_ENOTSUP);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(close_cb_called == 0);
@@ -914,7 +914,7 @@ TEST_IMPL(spawn_setgid_fails) {
ASSERT(r == -1);
ASSERT(uv_last_error(uv_default_loop()).code == UV_ENOTSUP);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(close_cb_called == 0);
View
6 test/test-stdio-over-pipes.c
@@ -138,7 +138,7 @@ TEST_IMPL(stdio_over_pipes) {
r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(on_read_cb_called > 1);
@@ -226,7 +226,7 @@ int stdio_over_pipes_helper(void) {
ASSERT(r == 0);
}
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(after_write_called == 7);
ASSERT(on_pipe_read_called == 0);
@@ -239,7 +239,7 @@ int stdio_over_pipes_helper(void) {
on_pipe_read);
ASSERT(r == 0);
- uv_run(loop);
+ uv_run(loop, UV_RUN_DEFAULT);
ASSERT(after_write_called == 7);
ASSERT(on_pipe_read_called == 1);
View
10 test/test-tcp-bind-error.c
@@ -59,7 +59,7 @@ TEST_IMPL(tcp_bind_error_addrinuse) {
uv_close((uv_handle_t*)&server1, close_cb);
uv_close((uv_handle_t*)&server2, close_cb);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(close_cb_called == 2);
@@ -84,7 +84,7 @@ TEST_IMPL(tcp_bind_error_addrnotavail_1) {
uv_close((uv_handle_t*)&server, close_cb);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(close_cb_called == 1);
@@ -106,7 +106,7 @@ TEST_IMPL(tcp_bind_error_addrnotavail_2) {
uv_close((uv_handle_t*)&server, close_cb);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(close_cb_called == 1);
@@ -132,7 +132,7 @@ TEST_IMPL(tcp_bind_error_fault) {
uv_close((uv_handle_t*)&server, close_cb);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(close_cb_called == 1);
@@ -159,7 +159,7 @@ TEST_IMPL(tcp_bind_error_inval) {
uv_close((uv_handle_t*)&server, close_cb);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(close_cb_called == 1);
View
8 test/test-tcp-bind6-error.c
@@ -59,7 +59,7 @@ TEST_IMPL(tcp_bind6_error_addrinuse) {
uv_close((uv_handle_t*)&server1, close_cb);
uv_close((uv_handle_t*)&server2, close_cb);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(close_cb_called == 2);
@@ -81,7 +81,7 @@ TEST_IMPL(tcp_bind6_error_addrnotavail) {
uv_close((uv_handle_t*)&server, close_cb);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(close_cb_called == 1);
@@ -107,7 +107,7 @@ TEST_IMPL(tcp_bind6_error_fault) {
uv_close((uv_handle_t*)&server, close_cb);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(close_cb_called == 1);
@@ -134,7 +134,7 @@ TEST_IMPL(tcp_bind6_error_inval) {
uv_close((uv_handle_t*)&server, close_cb);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(close_cb_called == 1);
View
2  test/test-tcp-close-while-connecting.c
@@ -70,7 +70,7 @@ TEST_IMPL(tcp_close_while_connecting) {
ASSERT(0 == uv_timer_start(&timer1_handle, timer1_cb, 50, 0));
ASSERT(0 == uv_timer_init(loop, &timer2_handle));
ASSERT(0 == uv_timer_start(&timer2_handle, timer2_cb, 86400 * 1000, 0));
- ASSERT(0 == uv_run(loop));
+ ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
ASSERT(connect_cb_called == 1);
ASSERT(timer1_cb_called == 1);
View
2  test/test-tcp-close.c
@@ -117,7 +117,7 @@ TEST_IMPL(tcp_close) {
ASSERT(write_cb_called == 0);
ASSERT(close_cb_called == 0);
- r = uv_run(loop);
+ r = uv_run(loop, UV_RUN_DEFAULT);
ASSERT(r == 0);
printf("%d of %d write reqs seen\n", write_cb_called, NUM_WRITE_REQS);
View
2  test/test-tcp-connect-error-after-write.c
@@ -84,7 +84,7 @@ TEST_IMPL(tcp_connect_error_after_write) {
r = uv_write(&write_req, (uv_stream_t*)&conn, &buf, 1, write_cb);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
ASSERT(connect_cb_called == 1);
View
2  test/test-tcp-connect-error.c
@@ -61,7 +61,7 @@ TEST_IMPL(tcp_connect_error_fault) {
uv_close((uv_handle_t*)&server, close_cb);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(connect_cb_called == 0);
ASSERT(close_cb_called == 1);
View
2  test/test-tcp-connect-timeout.c
@@ -78,7 +78,7 @@ TEST_IMPL(tcp_connect_timeout) {
r = uv_tcp_connect(&connect_req, &conn, addr, connect_cb);
ASSERT(r == 0);
- r = uv_run(uv_default_loop());
+ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(r == 0);
MAKE_VALGRIND_HAPPY();
View
2  test/test-tcp-connect6-error.c
@@ -59,7 +59,7 @@ TEST_IMPL(tcp_connect6_error_fault) {
uv_close((uv_handle_t*)&server, close_cb);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(connect_cb_called == 0);
ASSERT(close_cb_called == 1);
View
2  test/test-tcp-flags.c
@@ -44,7 +44,7 @@ TEST_IMPL(tcp_flags) {
uv_close((uv_handle_t*)&handle, NULL);
- r = uv_run(loop);
+ r = uv_run(loop, UV_RUN_DEFAULT);
ASSERT(r == 0);
MAKE_VALGRIND_HAPPY();
View
2  test/test-tcp-open.c
@@ -163,7 +163,7 @@ TEST_IMPL(tcp_open) {
r = uv_tcp_connect(&connect_req, &client, addr, connect_cb);
ASSERT(r == 0);
- uv_run(uv_default_loop());
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
<