From c6f886ce108a4f219573965d57d739903c6e1dbb Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Wed, 25 Jun 2014 16:37:25 +0200 Subject: [PATCH] unit-tests: Give worker threads time to clean up when testing thread_t.detach() --- src/libstrongswan/tests/suites/test_threading.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libstrongswan/tests/suites/test_threading.c b/src/libstrongswan/tests/suites/test_threading.c index 0526d9d6e..47e448484 100644 --- a/src/libstrongswan/tests/suites/test_threading.c +++ b/src/libstrongswan/tests/suites/test_threading.c @@ -980,7 +980,8 @@ START_TEST(test_detach) sched_yield(); } /* no checks done here, but we check that thread state gets cleaned - * up with leak detective. */ + * up with leak detective. give the threads time to clean up. */ + usleep(10000); } END_TEST @@ -1015,7 +1016,8 @@ START_TEST(test_detach_exit) sched_yield(); } /* no checks done here, but we check that thread state gets cleaned - * up with leak detective. */ + * up with leak detective. give the threads time to clean up. */ + usleep(10000); } END_TEST