From e7f384f8532493b52916968a8b9e995e534e6b7b Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 16 Jan 2013 23:59:57 +0100 Subject: [PATCH] test: make threadpool tests valgrind-compliant Delete the event loop after the test to stop valgrind from complaining about memory leaks. --- test/test-threadpool-cancel.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test-threadpool-cancel.c b/test/test-threadpool-cancel.c index 78938f94ce..f000c1a86b 100644 --- a/test/test-threadpool-cancel.c +++ b/test/test-threadpool-cancel.c @@ -195,6 +195,7 @@ TEST_IMPL(threadpool_cancel_getaddrinfo) { cleanup_threadpool(); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -220,6 +221,7 @@ TEST_IMPL(threadpool_cancel_work) { cleanup_threadpool(); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -271,6 +273,7 @@ TEST_IMPL(threadpool_cancel_fs) { cleanup_threadpool(); + MAKE_VALGRIND_HAPPY(); return 0; } @@ -303,5 +306,6 @@ TEST_IMPL(threadpool_cancel_single) { ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); ASSERT(req.data != NULL); /* Should have been updated by nop_done_cb(). */ + MAKE_VALGRIND_HAPPY(); return 0; }