diff --git a/test/benchmark-async-pummel.c b/test/benchmark-async-pummel.c index f6ce45ef..c8382132 100644 --- a/test/benchmark-async-pummel.c +++ b/test/benchmark-async-pummel.c @@ -73,6 +73,8 @@ static int test_async_pummel(int nthreads) { fmt(callbacks / (time / 1e9))); free(tids); + + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/benchmark-async.c b/test/benchmark-async.c index 2bf30408..649b1c5b 100644 --- a/test/benchmark-async.c +++ b/test/benchmark-async.c @@ -113,6 +113,7 @@ static int test_async(int nthreads) { free(threads); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/benchmark-fs-stat.c b/test/benchmark-fs-stat.c index ea5b5975..4404ab4c 100644 --- a/test/benchmark-fs-stat.c +++ b/test/benchmark-fs-stat.c @@ -131,5 +131,6 @@ BENCHMARK_IMPL(fs_stat) { warmup(path); sync_bench(path); async_bench(path); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/benchmark-getaddrinfo.c b/test/benchmark-getaddrinfo.c index 892c14d1..07dfa87a 100644 --- a/test/benchmark-getaddrinfo.c +++ b/test/benchmark-getaddrinfo.c @@ -90,5 +90,6 @@ BENCHMARK_IMPL(getaddrinfo) { LOGF("getaddrinfo: %.0f req/s\n", (double) calls_completed / (double) (end_time - start_time) * 1000.0); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/benchmark-loop-count.c b/test/benchmark-loop-count.c index a58181a2..ac3d16ad 100644 --- a/test/benchmark-loop-count.c +++ b/test/benchmark-loop-count.c @@ -67,6 +67,7 @@ BENCHMARK_IMPL(loop_count) { ns / 1e9, NUM_TICKS / (ns / 1e9)); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -84,5 +85,6 @@ BENCHMARK_IMPL(loop_count_timed) { LOGF("loop_count: %lu ticks (%.0f ticks/s)\n", ticks, ticks / 5.0); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/benchmark-million-timers.c b/test/benchmark-million-timers.c index ae56b2bc..3f3fab78 100644 --- a/test/benchmark-million-timers.c +++ b/test/benchmark-million-timers.c @@ -61,5 +61,6 @@ BENCHMARK_IMPL(million_timers) { LOGF("%.2f seconds\n", (after - before) / 1e9); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/benchmark-multi-accept.c b/test/benchmark-multi-accept.c index 3b2c16c3..a7847502 100644 --- a/test/benchmark-multi-accept.c +++ b/test/benchmark-multi-accept.c @@ -416,6 +416,7 @@ static int test_tcp(unsigned int num_servers, unsigned int num_clients) { free(clients); free(servers); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/benchmark-ping-pongs.c b/test/benchmark-ping-pongs.c index d42e7063..4196b42f 100644 --- a/test/benchmark-ping-pongs.c +++ b/test/benchmark-ping-pongs.c @@ -209,5 +209,6 @@ BENCHMARK_IMPL(ping_pongs) { ASSERT(completed_pingers == 1); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/benchmark-pound.c b/test/benchmark-pound.c index 5c29a05b..51f2ca2f 100644 --- a/test/benchmark-pound.c +++ b/test/benchmark-pound.c @@ -300,6 +300,7 @@ static int pound_it(int concurrency, closed_streams / secs, conns_failed); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/benchmark-pump.c b/test/benchmark-pump.c index 52f29572..613b0abc 100644 --- a/test/benchmark-pump.c +++ b/test/benchmark-pump.c @@ -404,6 +404,7 @@ HELPER_IMPL(pipe_pump_server) { uv_run(loop); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -421,6 +422,8 @@ void tcp_pump(int n) { maybe_connect_some(); uv_run(loop); + + MAKE_VALGRIND_HAPPY(); } @@ -435,6 +438,8 @@ void pipe_pump(int n) { maybe_connect_some(); uv_run(loop); + + MAKE_VALGRIND_HAPPY(); } diff --git a/test/benchmark-spawn.c b/test/benchmark-spawn.c index 74cc3d23..ccd25079 100644 --- a/test/benchmark-spawn.c +++ b/test/benchmark-spawn.c @@ -158,5 +158,6 @@ BENCHMARK_IMPL(spawn) { LOGF("spawn: %.0f spawns/s\n", (double) N / (double) (end_time - start_time) * 1000.0); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/benchmark-tcp-write-batch.c b/test/benchmark-tcp-write-batch.c index d7b8c99b..a0793d57 100644 --- a/test/benchmark-tcp-write-batch.c +++ b/test/benchmark-tcp-write-batch.c @@ -136,5 +136,6 @@ BENCHMARK_IMPL(tcp_write_batch) { (long)NUM_WRITE_REQS, (stop - start) / 1e9); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/benchmark-udp-pummel.c b/test/benchmark-udp-pummel.c index a183c962..01f9a948 100644 --- a/test/benchmark-udp-pummel.c +++ b/test/benchmark-udp-pummel.c @@ -204,6 +204,7 @@ static int do_packet_storm(int n_senders, send_cb_called, duration / 1000.0); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/runner.c b/test/runner.c index d7098123..5925ec75 100644 --- a/test/runner.c +++ b/test/runner.c @@ -300,7 +300,6 @@ int run_test_part(const char* test, const char* part) { if (strcmp(test, task->task_name) == 0 && strcmp(part, task->process_name) == 0) { r = task->main(); - uv_loop_delete(uv_default_loop()); return r; } } diff --git a/test/task.h b/test/task.h index 34d28a1e..e06ae647 100644 --- a/test/task.h +++ b/test/task.h @@ -91,6 +91,11 @@ typedef enum { } \ } while (0) +/* This macro cleans up the main loop. This is used to avoid valgrind + * warnings about memory being "leaked" by the main event loop. + */ +#define MAKE_VALGRIND_HAPPY() \ + uv_loop_delete(uv_default_loop()) /* Just sugar for wrapping the main() for a task or helper. */ #define TEST_IMPL(name) \ diff --git a/test/test-active.c b/test/test-active.c index 9af4fd66..910d7608 100644 --- a/test/test-active.c +++ b/test/test-active.c @@ -78,5 +78,6 @@ TEST_IMPL(active) { ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-async.c b/test/test-async.c index 9b2ce7bc..efcfe15a 100644 --- a/test/test-async.c +++ b/test/test-async.c @@ -116,5 +116,6 @@ TEST_IMPL(async) { ASSERT(0 == uv_thread_join(&thread)); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-callback-order.c b/test/test-callback-order.c index a6c40cbd..ed280e62 100644 --- a/test/test-callback-order.c +++ b/test/test-callback-order.c @@ -72,5 +72,6 @@ TEST_IMPL(callback_order) { ASSERT(idle_cb_called == 1); ASSERT(timer_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-callback-stack.c b/test/test-callback-stack.c index 4983b651..044a3e35 100644 --- a/test/test-callback-stack.c +++ b/test/test-callback-stack.c @@ -199,5 +199,6 @@ TEST_IMPL(callback_stack) { ASSERT(shutdown_cb_called == 1 && "shutdown_cb must be called exactly once"); ASSERT(close_cb_called == 2 && "close_cb must be called exactly twice"); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-connection-fail.c b/test/test-connection-fail.c index 1c5a31d1..4219f4c6 100644 --- a/test/test-connection-fail.c +++ b/test/test-connection-fail.c @@ -124,6 +124,7 @@ TEST_IMPL(connection_fail) { ASSERT(timer_close_cb_calls == 0); ASSERT(timer_cb_calls == 0); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -144,5 +145,6 @@ TEST_IMPL(connection_fail_doesnt_auto_close) { ASSERT(timer_close_cb_calls == 1); ASSERT(timer_cb_calls == 1); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-delayed-accept.c b/test/test-delayed-accept.c index 672672a9..064fb6a6 100644 --- a/test/test-delayed-accept.c +++ b/test/test-delayed-accept.c @@ -184,5 +184,6 @@ TEST_IMPL(delayed_accept) { ASSERT(connect_cb_called == 2); ASSERT(close_cb_called == 7); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-fs-event.c b/test/test-fs-event.c index dd10915f..d741b399 100644 --- a/test/test-fs-event.c +++ b/test/test-fs-event.c @@ -201,6 +201,7 @@ TEST_IMPL(fs_event_watch_dir) { remove("watch_dir/file1"); remove("watch_dir/"); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -234,6 +235,7 @@ TEST_IMPL(fs_event_watch_file) { remove("watch_dir/file1"); remove("watch_dir/"); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -252,6 +254,7 @@ TEST_IMPL(fs_event_watch_file_twice) { ASSERT(0 == uv_timer_start(&timer, timer_cb_watch_twice, 10, 0)); ASSERT(0 == uv_run(loop)); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -289,6 +292,7 @@ TEST_IMPL(fs_event_watch_file_current_dir) { /* Cleanup */ remove("watch_file"); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -321,6 +325,7 @@ TEST_IMPL(fs_event_no_callback_on_close) { remove("watch_dir/file1"); remove("watch_dir/"); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -361,6 +366,7 @@ TEST_IMPL(fs_event_immediate_close) { ASSERT(close_cb_called == 2); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -390,6 +396,7 @@ TEST_IMPL(fs_event_close_with_pending_event) { remove("watch_dir/file"); remove("watch_dir/"); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -455,6 +462,7 @@ TEST_IMPL(fs_event_close_in_callback) { remove("watch_dir/file5"); remove("watch_dir/"); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-fs-poll.c b/test/test-fs-poll.c index 4380b561..a3dede64 100644 --- a/test/test-fs-poll.c +++ b/test/test-fs-poll.c @@ -141,5 +141,6 @@ TEST_IMPL(fs_poll) { ASSERT(timer_cb_called == 2); ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-fs.c b/test/test-fs.c index e59e5ed1..597ef971 100644 --- a/test/test-fs.c +++ b/test/test-fs.c @@ -482,6 +482,7 @@ TEST_IMPL(fs_file_noent) { /* TODO add EACCES test */ + MAKE_VALGRIND_HAPPY(); return 0; } @@ -508,6 +509,7 @@ TEST_IMPL(fs_file_nametoolong) { uv_run(loop); ASSERT(open_cb_count == 1); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -536,6 +538,7 @@ TEST_IMPL(fs_file_loop) { unlink("test_symlink"); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -653,6 +656,7 @@ TEST_IMPL(fs_file_async) { unlink("test_file"); unlink("test_file2"); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -737,6 +741,7 @@ TEST_IMPL(fs_file_sync) { unlink("test_file"); unlink("test_file2"); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -828,6 +833,7 @@ TEST_IMPL(fs_async_dir) { unlink("test_dir/file2"); rmdir("test_dir"); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -891,6 +897,7 @@ TEST_IMPL(fs_async_sendfile) { unlink("test_file"); unlink("test_file2"); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -946,6 +953,7 @@ TEST_IMPL(fs_fstat) { /* Cleanup. */ unlink("test_file"); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -1042,6 +1050,7 @@ TEST_IMPL(fs_chmod) { /* Cleanup. */ unlink("test_file"); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -1104,6 +1113,7 @@ TEST_IMPL(fs_chown) { /* Cleanup. */ unlink("test_file"); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -1186,6 +1196,7 @@ TEST_IMPL(fs_link) { unlink("test_file_link"); unlink("test_file_link2"); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -1208,6 +1219,7 @@ TEST_IMPL(fs_readlink) { ASSERT(req.errorno == UV_ENOENT); uv_fs_req_cleanup(&req); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -1329,6 +1341,7 @@ TEST_IMPL(fs_symlink) { unlink("test_file_symlink2"); unlink("test_file_symlink2_symlink"); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -1440,6 +1453,7 @@ TEST_IMPL(fs_symlink_dir) { rmdir("test_dir"); rmdir("test_dir_symlink"); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -1490,6 +1504,7 @@ TEST_IMPL(fs_utime) { /* Cleanup. */ unlink(path); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -1521,6 +1536,7 @@ TEST_IMPL(fs_stat_root) { r = uv_fs_stat(loop, &stat_req, "\\\\?\\C:\\", NULL); ASSERT(r == 0); + MAKE_VALGRIND_HAPPY(); return 0; } #endif @@ -1580,6 +1596,7 @@ TEST_IMPL(fs_futime) { /* Cleanup. */ unlink(path); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -1596,6 +1613,7 @@ TEST_IMPL(fs_stat_missing_path) { ASSERT(uv_last_error(loop).code == UV_ENOENT); uv_fs_req_cleanup(&req); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -1627,6 +1645,7 @@ TEST_IMPL(fs_readdir_empty_dir) { uv_fs_rmdir(loop, &req, path, NULL); uv_fs_req_cleanup(&req); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -1650,6 +1669,7 @@ TEST_IMPL(fs_readdir_file) { uv_run(loop); ASSERT(readdir_cb_count == 1); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -1679,6 +1699,7 @@ TEST_IMPL(fs_open_dir) { uv_run(loop); ASSERT(open_cb_count == 1); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -1747,6 +1768,7 @@ TEST_IMPL(fs_file_open_append) { /* Cleanup */ unlink("test_file"); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -1815,6 +1837,7 @@ TEST_IMPL(fs_rename_to_existing_file) { unlink("test_file"); unlink("test_file2"); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -1871,5 +1894,6 @@ TEST_IMPL(fs_read_file_eof) { /* Cleanup */ unlink("test_file"); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-getaddrinfo.c b/test/test-getaddrinfo.c index 2a8c94e7..b88d4b31 100644 --- a/test/test-getaddrinfo.c +++ b/test/test-getaddrinfo.c @@ -88,6 +88,7 @@ TEST_IMPL(getaddrinfo_basic) { ASSERT(getaddrinfo_cbs == 1); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -118,5 +119,6 @@ TEST_IMPL(getaddrinfo_concurrent) { ASSERT(callback_counts[i] == 1); } + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-getsockname.c b/test/test-getsockname.c index 2bfb71ad..a6f8a812 100644 --- a/test/test-getsockname.c +++ b/test/test-getsockname.c @@ -322,6 +322,7 @@ TEST_IMPL(getsockname_tcp) { ASSERT(getsocknamecount == 3); ASSERT(getpeernamecount == 3); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -338,5 +339,6 @@ TEST_IMPL(getsockname_udp) { ASSERT(getsocknamecount == 2); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-idle.c b/test/test-idle.c index 95ef3a94..0a6e0dcc 100644 --- a/test/test-idle.c +++ b/test/test-idle.c @@ -77,5 +77,6 @@ TEST_IMPL(idle_starvation) { ASSERT(timer_cb_called == 1); ASSERT(close_cb_called == 2); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-ipc-send-recv.c b/test/test-ipc-send-recv.c index 970bf1ef..799e4f5e 100644 --- a/test/test-ipc-send-recv.c +++ b/test/test-ipc-send-recv.c @@ -123,7 +123,11 @@ TEST_IMPL(ipc_send_recv_pipe) { r = uv_pipe_bind(&ctx.send.pipe, TEST_PIPENAME); ASSERT(r == 0); - return run_test(); + r = run_test(); + ASSERT(r == 0); + + MAKE_VALGRIND_HAPPY(); + return 0; } @@ -138,7 +142,11 @@ TEST_IMPL(ipc_send_recv_tcp) { r = uv_tcp_bind(&ctx.send.tcp, uv_ip4_addr("127.0.0.1", TEST_PORT)); ASSERT(r == 0); - return run_test(); + r = run_test(); + ASSERT(r == 0); + + MAKE_VALGRIND_HAPPY(); + return 0; } @@ -205,5 +213,6 @@ int ipc_send_recv_helper(void) { r = uv_run(uv_default_loop()); ASSERT(r == 0); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-ipc.c b/test/test-ipc.c index 61add0b4..c37d1518 100644 --- a/test/test-ipc.c +++ b/test/test-ipc.c @@ -321,6 +321,7 @@ static int run_ipc_test(const char* helper, uv_read2_cb read_cb) { r = uv_run(uv_default_loop()); ASSERT(r == 0); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -374,6 +375,7 @@ TEST_IMPL(listen_with_simultaneous_accepts) { ASSERT(r == 0); ASSERT(server.reqs_pending == 32); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -396,6 +398,7 @@ TEST_IMPL(listen_no_simultaneous_accepts) { ASSERT(r == 0); ASSERT(server.reqs_pending == 1); + MAKE_VALGRIND_HAPPY(); return 0; } #endif @@ -570,6 +573,7 @@ int ipc_helper(int listen_after_write) { ASSERT(connection_accepted == 1); ASSERT(close_cb_called == 3); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -616,5 +620,6 @@ int ipc_helper_tcp_connection() { ASSERT(tcp_conn_write_cb_called == 1); ASSERT(close_cb_called == 4); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-loop-handles.c b/test/test-loop-handles.c index 9972dfa1..f57efb08 100644 --- a/test/test-loop-handles.c +++ b/test/test-loop-handles.c @@ -332,5 +332,6 @@ TEST_IMPL(loop_handles) { ASSERT(idle_2_close_cb_called == idle_2_cb_started); ASSERT(idle_2_is_active == 0); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-multiple-listen.c b/test/test-multiple-listen.c index 0b5c887d..18197d18 100644 --- a/test/test-multiple-listen.c +++ b/test/test-multiple-listen.c @@ -98,5 +98,6 @@ TEST_IMPL(multiple_listen) { ASSERT(connect_cb_called == 1); ASSERT(close_cb_called == 2); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-ping-pong.c b/test/test-ping-pong.c index 92e40e55..1b85fa89 100644 --- a/test/test-ping-pong.c +++ b/test/test-ping-pong.c @@ -228,6 +228,7 @@ TEST_IMPL(tcp_ping_pong) { ASSERT(completed_pingers == 1); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -238,6 +239,7 @@ TEST_IMPL(tcp_ping_pong_v6) { ASSERT(completed_pingers == 1); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -248,5 +250,6 @@ TEST_IMPL(pipe_ping_pong) { ASSERT(completed_pingers == 1); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-pipe-bind-error.c b/test/test-pipe-bind-error.c index b84d20f1..2d45fb3e 100644 --- a/test/test-pipe-bind-error.c +++ b/test/test-pipe-bind-error.c @@ -71,6 +71,7 @@ TEST_IMPL(pipe_bind_error_addrinuse) { ASSERT(close_cb_called == 2); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -92,6 +93,7 @@ TEST_IMPL(pipe_bind_error_addrnotavail) { ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -115,6 +117,7 @@ TEST_IMPL(pipe_bind_error_inval) { ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -136,5 +139,6 @@ TEST_IMPL(pipe_listen_without_bind) { ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-pipe-connect-error.c b/test/test-pipe-connect-error.c index cc06d429..c70a3ef8 100644 --- a/test/test-pipe-connect-error.c +++ b/test/test-pipe-connect-error.c @@ -73,6 +73,7 @@ TEST_IMPL(pipe_connect_bad_name) { ASSERT(close_cb_called == 1); ASSERT(connect_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -92,5 +93,6 @@ TEST_IMPL(pipe_connect_to_file) { ASSERT(close_cb_called == 1); ASSERT(connect_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-poll-close.c b/test/test-poll-close.c index 83893827..9c80527b 100644 --- a/test/test-poll-close.c +++ b/test/test-poll-close.c @@ -68,5 +68,6 @@ TEST_IMPL(poll_close) { ASSERT(close_cb_called == NUM_SOCKETS); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-poll.c b/test/test-poll.c index 5a20b9d5..b69f9f24 100644 --- a/test/test-poll.c +++ b/test/test-poll.c @@ -556,6 +556,8 @@ static void start_poll_test() { spurious_writable_wakeups > 20); ASSERT(closed_connections == NUM_CLIENTS * 2); + + MAKE_VALGRIND_HAPPY(); } diff --git a/test/test-ref.c b/test/test-ref.c index 95e92a86..484608ac 100644 --- a/test/test-ref.c +++ b/test/test-ref.c @@ -96,6 +96,7 @@ static void connect_and_shutdown(uv_connect_t* req, int status) { TEST_IMPL(ref) { uv_run(uv_default_loop()); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -107,6 +108,7 @@ TEST_IMPL(idle_ref) { uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop()); do_close(&h); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -117,6 +119,7 @@ TEST_IMPL(async_ref) { uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop()); do_close(&h); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -128,6 +131,7 @@ TEST_IMPL(prepare_ref) { uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop()); do_close(&h); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -139,6 +143,7 @@ TEST_IMPL(check_ref) { uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop()); do_close(&h); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -156,6 +161,7 @@ TEST_IMPL(unref_in_prepare_cb) { uv_prepare_start(&h, prepare_cb); uv_run(uv_default_loop()); do_close(&h); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -166,6 +172,7 @@ TEST_IMPL(timer_ref) { uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop()); do_close(&h); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -177,6 +184,7 @@ TEST_IMPL(timer_ref2) { uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop()); do_close(&h); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -187,6 +195,7 @@ TEST_IMPL(fs_event_ref) { uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop()); do_close(&h); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -198,6 +207,7 @@ TEST_IMPL(fs_poll_ref) { uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop()); do_close(&h); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -208,6 +218,7 @@ TEST_IMPL(tcp_ref) { uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop()); do_close(&h); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -219,6 +230,7 @@ TEST_IMPL(tcp_ref2) { uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop()); do_close(&h); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -233,6 +245,7 @@ TEST_IMPL(tcp_ref3) { ASSERT(connect_cb_called == 1); ASSERT(shutdown_cb_called == 1); do_close(&h); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -248,6 +261,7 @@ TEST_IMPL(tcp_ref4) { ASSERT(write_cb_called == 1); ASSERT(shutdown_cb_called == 1); do_close(&h); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -258,6 +272,7 @@ TEST_IMPL(udp_ref) { uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop()); do_close(&h); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -271,6 +286,7 @@ TEST_IMPL(udp_ref2) { uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop()); do_close(&h); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -288,6 +304,7 @@ TEST_IMPL(udp_ref3) { ASSERT(req_cb_called == 1); do_close(&h); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -298,6 +315,7 @@ TEST_IMPL(pipe_ref) { uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop()); do_close(&h); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -309,6 +327,7 @@ TEST_IMPL(pipe_ref2) { uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop()); do_close(&h); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -322,6 +341,7 @@ TEST_IMPL(pipe_ref3) { ASSERT(connect_cb_called == 1); ASSERT(shutdown_cb_called == 1); do_close(&h); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -336,6 +356,7 @@ TEST_IMPL(pipe_ref4) { ASSERT(write_cb_called == 1); ASSERT(shutdown_cb_called == 1); do_close(&h); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -371,5 +392,6 @@ TEST_IMPL(process_ref) { do_close(&h); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-run-once.c b/test/test-run-once.c index f74e9f37..b425a423 100644 --- a/test/test-run-once.c +++ b/test/test-run-once.c @@ -44,5 +44,6 @@ TEST_IMPL(run_once) { while (uv_run_once(uv_default_loop())); ASSERT(idle_counter == NUM_TICKS); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-shutdown-close.c b/test/test-shutdown-close.c index 6ce46b24..6a372330 100644 --- a/test/test-shutdown-close.c +++ b/test/test-shutdown-close.c @@ -81,6 +81,7 @@ TEST_IMPL(shutdown_close_tcp) { ASSERT(shutdown_cb_called == 1); ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -99,5 +100,6 @@ TEST_IMPL(shutdown_close_pipe) { ASSERT(shutdown_cb_called == 1); ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-shutdown-eof.c b/test/test-shutdown-eof.c index 9d4f2cce..22f6da53 100644 --- a/test/test-shutdown-eof.c +++ b/test/test-shutdown-eof.c @@ -178,6 +178,7 @@ TEST_IMPL(shutdown_eof) { ASSERT(called_timer_close_cb == 1); ASSERT(called_timer_cb == 1); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-signal.c b/test/test-signal.c index 01301c56..bf380686 100644 --- a/test/test-signal.c +++ b/test/test-signal.c @@ -119,6 +119,7 @@ TEST_IMPL(we_get_signal) { ASSERT(tc.ncalls == NSIGNALS); ASSERT(sc.ncalls == NSIGNALS); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -144,6 +145,7 @@ TEST_IMPL(we_get_signals) { for (i = 0; i < ARRAY_SIZE(tc); i++) ASSERT(tc[i].ncalls == NSIGNALS); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-spawn.c b/test/test-spawn.c index 666d00f7..cb03efdf 100644 --- a/test/test-spawn.c +++ b/test/test-spawn.c @@ -152,6 +152,8 @@ TEST_IMPL(spawn_fails) { ASSERT(0 != uv_is_active((uv_handle_t*)&process)); ASSERT(0 == uv_run(uv_default_loop())); ASSERT(uv_last_error(uv_default_loop()).code == UV_ENOENT); + + MAKE_VALGRIND_HAPPY(); return 0; } @@ -170,6 +172,7 @@ TEST_IMPL(spawn_exit_code) { ASSERT(exit_cb_called == 1); ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -202,6 +205,7 @@ TEST_IMPL(spawn_stdout) { printf("output is: %s", output); ASSERT(strcmp("hello world\n", output) == 0); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -254,6 +258,7 @@ TEST_IMPL(spawn_stdout_to_file) { /* Cleanup. */ unlink("stdout_file"); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -296,6 +301,7 @@ TEST_IMPL(spawn_stdin) { ASSERT(close_cb_called == 3); /* Once for process twice for the pipe. */ ASSERT(strcmp(buffer, output) == 0); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -330,6 +336,7 @@ TEST_IMPL(spawn_stdio_greater_than_3) { printf("output from stdio[3] is: %s", output); ASSERT(strcmp("fourth stdio!\n", output) == 0); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -351,6 +358,7 @@ TEST_IMPL(spawn_ignored_stdio) { ASSERT(exit_cb_called == 1); ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -375,6 +383,7 @@ TEST_IMPL(spawn_and_kill) { ASSERT(exit_cb_called == 1); ASSERT(close_cb_called == 2); /* Once for process and once for timer. */ + MAKE_VALGRIND_HAPPY(); return 0; } @@ -402,6 +411,7 @@ TEST_IMPL(spawn_detached) { err = uv_kill(process.pid, 15); ASSERT(err.code == 0); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -459,6 +469,7 @@ TEST_IMPL(spawn_and_kill_with_std) { ASSERT(exit_cb_called == 1); ASSERT(close_cb_called == 5); /* process x 1, timer x 1, stdio x 3. */ + MAKE_VALGRIND_HAPPY(); return 0; } @@ -505,6 +516,7 @@ TEST_IMPL(spawn_and_ping) { ASSERT(exit_cb_called == 1); ASSERT(strcmp(output, "TEST") == 0); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -538,6 +550,7 @@ TEST_IMPL(kill) { ASSERT(exit_cb_called == 1); ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -585,6 +598,7 @@ TEST_IMPL(spawn_detect_pipe_name_collisions_on_windows) { printf("output is: %s", output); ASSERT(strcmp("hello world\n", output) == 0); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -744,6 +758,7 @@ TEST_IMPL(spawn_setuid_setgid) { ASSERT(exit_cb_called == 1); ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } #endif @@ -777,6 +792,7 @@ TEST_IMPL(spawn_setuid_fails) { ASSERT(exit_cb_called == 1); ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -808,6 +824,7 @@ TEST_IMPL(spawn_setgid_fails) { ASSERT(exit_cb_called == 1); ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } #endif @@ -839,6 +856,7 @@ TEST_IMPL(spawn_setuid_fails) { ASSERT(close_cb_called == 0); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -860,6 +878,7 @@ TEST_IMPL(spawn_setgid_fails) { ASSERT(close_cb_called == 0); + MAKE_VALGRIND_HAPPY(); return 0; } #endif diff --git a/test/test-stdio-over-pipes.c b/test/test-stdio-over-pipes.c index 7603027f..03e71071 100644 --- a/test/test-stdio-over-pipes.c +++ b/test/test-stdio-over-pipes.c @@ -147,6 +147,7 @@ TEST_IMPL(stdio_over_pipes) { ASSERT(memcmp("hello world\n", output, 12) == 0); ASSERT(output_used == 12); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -242,5 +243,6 @@ int stdio_over_pipes_helper() { ASSERT(on_pipe_read_called == 1); ASSERT(close_cb_called == 2); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-tcp-bind-error.c b/test/test-tcp-bind-error.c index 9512519a..5c3be70a 100644 --- a/test/test-tcp-bind-error.c +++ b/test/test-tcp-bind-error.c @@ -63,6 +63,7 @@ TEST_IMPL(tcp_bind_error_addrinuse) { ASSERT(close_cb_called == 2); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -87,6 +88,7 @@ TEST_IMPL(tcp_bind_error_addrnotavail_1) { ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -108,6 +110,7 @@ TEST_IMPL(tcp_bind_error_addrnotavail_2) { ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -133,6 +136,7 @@ TEST_IMPL(tcp_bind_error_fault) { ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -159,6 +163,7 @@ TEST_IMPL(tcp_bind_error_inval) { ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -174,6 +179,7 @@ TEST_IMPL(tcp_bind_localhost_ok) { r = uv_tcp_bind(&server, addr); ASSERT(r == 0); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -187,5 +193,6 @@ TEST_IMPL(tcp_listen_without_bind) { r = uv_listen((uv_stream_t*)&server, 128, NULL); ASSERT(r == 0); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-tcp-bind6-error.c b/test/test-tcp-bind6-error.c index 5a8b7636..f281b94e 100644 --- a/test/test-tcp-bind6-error.c +++ b/test/test-tcp-bind6-error.c @@ -63,6 +63,7 @@ TEST_IMPL(tcp_bind6_error_addrinuse) { ASSERT(close_cb_called == 2); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -84,6 +85,7 @@ TEST_IMPL(tcp_bind6_error_addrnotavail) { ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -109,6 +111,7 @@ TEST_IMPL(tcp_bind6_error_fault) { ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -135,6 +138,7 @@ TEST_IMPL(tcp_bind6_error_inval) { ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -150,5 +154,6 @@ TEST_IMPL(tcp_bind6_localhost_ok) { r = uv_tcp_bind6(&server, addr); ASSERT(r == 0); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-tcp-close-while-connecting.c b/test/test-tcp-close-while-connecting.c index 90471eca..c8a8bda9 100644 --- a/test/test-tcp-close-while-connecting.c +++ b/test/test-tcp-close-while-connecting.c @@ -76,5 +76,6 @@ TEST_IMPL(tcp_close_while_connecting) { ASSERT(timer1_cb_called == 1); ASSERT(close_cb_called == 2); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-tcp-close.c b/test/test-tcp-close.c index 33f79974..321a0e46 100644 --- a/test/test-tcp-close.c +++ b/test/test-tcp-close.c @@ -125,5 +125,6 @@ TEST_IMPL(tcp_close) { ASSERT(write_cb_called == NUM_WRITE_REQS); ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-tcp-connect-error-after-write.c b/test/test-tcp-connect-error-after-write.c index a9c02037..7fbbf7cb 100644 --- a/test/test-tcp-connect-error-after-write.c +++ b/test/test-tcp-connect-error-after-write.c @@ -91,5 +91,6 @@ TEST_IMPL(tcp_connect_error_after_write) { ASSERT(write_cb_called == 1); ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-tcp-connect-error.c b/test/test-tcp-connect-error.c index 5cdacab6..20a5a403 100644 --- a/test/test-tcp-connect-error.c +++ b/test/test-tcp-connect-error.c @@ -66,5 +66,6 @@ TEST_IMPL(tcp_connect_error_fault) { ASSERT(connect_cb_called == 0); ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-tcp-connect-timeout.c b/test/test-tcp-connect-timeout.c index 32b0dffd..8eb959b6 100644 --- a/test/test-tcp-connect-timeout.c +++ b/test/test-tcp-connect-timeout.c @@ -81,5 +81,6 @@ TEST_IMPL(tcp_connect_timeout) { r = uv_run(uv_default_loop()); ASSERT(r == 0); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-tcp-connect6-error.c b/test/test-tcp-connect6-error.c index 5c158ff8..2eb55ca9 100644 --- a/test/test-tcp-connect6-error.c +++ b/test/test-tcp-connect6-error.c @@ -64,5 +64,6 @@ TEST_IMPL(tcp_connect6_error_fault) { ASSERT(connect_cb_called == 0); ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-tcp-flags.c b/test/test-tcp-flags.c index c441b563..33c2002c 100644 --- a/test/test-tcp-flags.c +++ b/test/test-tcp-flags.c @@ -47,5 +47,6 @@ TEST_IMPL(tcp_flags) { r = uv_run(loop); ASSERT(r == 0); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-tcp-open.c b/test/test-tcp-open.c index 40d3f5fa..75469931 100644 --- a/test/test-tcp-open.c +++ b/test/test-tcp-open.c @@ -170,5 +170,6 @@ TEST_IMPL(tcp_open) { ASSERT(write_cb_called == 1); ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-tcp-shutdown-after-write.c b/test/test-tcp-shutdown-after-write.c index 219a3b40..b3e06f5f 100644 --- a/test/test-tcp-shutdown-after-write.c +++ b/test/test-tcp-shutdown-after-write.c @@ -127,5 +127,6 @@ TEST_IMPL(tcp_shutdown_after_write) { ASSERT(conn_close_cb_called == 1); ASSERT(timer_close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-tcp-unexpected-read.c b/test/test-tcp-unexpected-read.c index 709d7dd5..772746bc 100644 --- a/test/test-tcp-unexpected-read.c +++ b/test/test-tcp-unexpected-read.c @@ -109,5 +109,6 @@ TEST_IMPL(tcp_unexpected_read) { */ ASSERT(ticks <= 20); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-tcp-write-error.c b/test/test-tcp-write-error.c index 32207dd2..a0fbeca6 100644 --- a/test/test-tcp-write-error.c +++ b/test/test-tcp-write-error.c @@ -164,5 +164,6 @@ TEST_IMPL(tcp_write_error) { ASSERT(write_cb_error_called >= 1); ASSERT(tcp_client.write_queue_size == 0); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-tcp-write-to-half-open-connection.c b/test/test-tcp-write-to-half-open-connection.c index 26f914b9..8c338953 100644 --- a/test/test-tcp-write-to-half-open-connection.c +++ b/test/test-tcp-write-to-half-open-connection.c @@ -131,5 +131,6 @@ TEST_IMPL(tcp_write_to_half_open_connection) { ASSERT(write_cb_called > 0); ASSERT(read_cb_called > 0); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-tcp-writealot.c b/test/test-tcp-writealot.c index 16d141ad..05f18058 100644 --- a/test/test-tcp-writealot.c +++ b/test/test-tcp-writealot.c @@ -166,5 +166,6 @@ TEST_IMPL(tcp_writealot) { free(send_buffer); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-threadpool.c b/test/test-threadpool.c index 92130b50..12777b6e 100644 --- a/test/test-threadpool.c +++ b/test/test-threadpool.c @@ -53,5 +53,6 @@ TEST_IMPL(threadpool_queue_work_simple) { ASSERT(work_cb_count == 1); ASSERT(after_work_cb_count == 1); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-timer-again.c b/test/test-timer-again.c index e492c364..73bc5303 100644 --- a/test/test-timer-again.c +++ b/test/test-timer-again.c @@ -137,5 +137,6 @@ TEST_IMPL(timer_again) { (long int)(uv_now(uv_default_loop()) - start_time)); ASSERT(700 <= uv_now(uv_default_loop()) - start_time); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-timer.c b/test/test-timer.c index c1b629b2..5f634495 100644 --- a/test/test-timer.c +++ b/test/test-timer.c @@ -129,6 +129,7 @@ TEST_IMPL(timer) { ASSERT(500 <= uv_now(uv_default_loop()) - start_time); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -148,5 +149,6 @@ TEST_IMPL(timer_start_twice) { ASSERT(once_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-tty.c b/test/test-tty.c index ded59c9f..3bf37883 100644 --- a/test/test-tty.c +++ b/test/test-tty.c @@ -106,5 +106,6 @@ TEST_IMPL(tty) { uv_run(loop); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-udp-dgram-too-big.c b/test/test-udp-dgram-too-big.c index 2d172c06..ebf82de9 100644 --- a/test/test-udp-dgram-too-big.c +++ b/test/test-udp-dgram-too-big.c @@ -82,5 +82,6 @@ TEST_IMPL(udp_dgram_too_big) { ASSERT(send_cb_called == 1); ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-udp-ipv6.c b/test/test-udp-ipv6.c index 6ff36b32..883772ad 100644 --- a/test/test-udp-ipv6.c +++ b/test/test-udp-ipv6.c @@ -133,6 +133,8 @@ static void do_test(uv_udp_recv_cb recv_cb, int bind_flags) { uv_run(uv_default_loop()); ASSERT(close_cb_called == 3); + + MAKE_VALGRIND_HAPPY(); } diff --git a/test/test-udp-multicast-join.c b/test/test-udp-multicast-join.c index b32ef073..e995012e 100644 --- a/test/test-udp-multicast-join.c +++ b/test/test-udp-multicast-join.c @@ -135,5 +135,6 @@ TEST_IMPL(udp_multicast_join) { ASSERT(sv_send_cb_called == 1); ASSERT(close_cb_called == 2); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-udp-multicast-ttl.c b/test/test-udp-multicast-ttl.c index b2f11251..3fd4be8d 100644 --- a/test/test-udp-multicast-ttl.c +++ b/test/test-udp-multicast-ttl.c @@ -82,5 +82,6 @@ TEST_IMPL(udp_multicast_ttl) { ASSERT(sv_send_cb_called == 1); ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-udp-open.c b/test/test-udp-open.c index 5fcebac0..bb6d28a2 100644 --- a/test/test-udp-open.c +++ b/test/test-udp-open.c @@ -149,5 +149,6 @@ TEST_IMPL(udp_open) { ASSERT(send_cb_called == 1); ASSERT(close_cb_called == 1); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-udp-options.c b/test/test-udp-options.c index 4ff650dc..e7b21678 100644 --- a/test/test-udp-options.c +++ b/test/test-udp-options.c @@ -82,5 +82,6 @@ TEST_IMPL(udp_options) { r = uv_run(loop); ASSERT(r == 0); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-udp-send-and-recv.c b/test/test-udp-send-and-recv.c index ab47e91c..7f57c32d 100644 --- a/test/test-udp-send-and-recv.c +++ b/test/test-udp-send-and-recv.c @@ -204,5 +204,6 @@ TEST_IMPL(udp_send_and_recv) { ASSERT(sv_recv_cb_called == 1); ASSERT(close_cb_called == 2); + MAKE_VALGRIND_HAPPY(); return 0; } diff --git a/test/test-walk-handles.c b/test/test-walk-handles.c index a72c095b..298f98f5 100644 --- a/test/test-walk-handles.c +++ b/test/test-walk-handles.c @@ -73,5 +73,6 @@ TEST_IMPL(walk_handles) { uv_walk(loop, walk_cb, magic_cookie); ASSERT(seen_timer_handle == 0); + MAKE_VALGRIND_HAPPY(); return 0; }