From b015b4d0ee03b825d61b0b54e36aa405a8e1cf03 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Thu, 25 Feb 2016 11:51:31 -0500 Subject: [PATCH] test: fix threadpool_multiple_event_loops on PPC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On PPC (linux and AIX) uv_thread_join (which is just a call to pthread_join) takes quite a while. Increased the timeout of this specific test on PPC so that there is ample time for all threads to join back. The fs_do and getaddrinfo_do calls do not take up much time. Also removing the ifdef for AIX around fs_do since it did nothing. Fixes: https://github.com/libuv/libuv/issues/687 PR-URL: https://github.com/libuv/libuv/pull/737 Reviewed-By: Ben Noordhuis Reviewed-By: Saúl Ibarra Corretgé --- test/test-list.h | 7 +++++++ test/test-thread.c | 5 ----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/test/test-list.h b/test/test-list.h index 37746b8e..3ad8d32b 100644 --- a/test/test-list.h +++ b/test/test-list.h @@ -722,7 +722,14 @@ TASK_LIST_START TEST_ENTRY (fs_read_write_null_arguments) TEST_ENTRY (threadpool_queue_work_simple) TEST_ENTRY (threadpool_queue_work_einval) +#if defined(__PPC__) || defined(__PPC64__) /* For linux PPC and AIX */ + /* pthread_join takes a while, especially on AIX. + * Therefore being gratuitous with timeout. + */ + TEST_ENTRY_CUSTOM (threadpool_multiple_event_loops, 0, 0, 120000) +#else TEST_ENTRY (threadpool_multiple_event_loops) +#endif TEST_ENTRY (threadpool_cancel_getaddrinfo) TEST_ENTRY (threadpool_cancel_getnameinfo) TEST_ENTRY (threadpool_cancel_work) diff --git a/test/test-thread.c b/test/test-thread.c index 94524ae9..10bec3fe 100644 --- a/test/test-thread.c +++ b/test/test-thread.c @@ -123,17 +123,12 @@ static void do_work(void* arg) { getaddrinfo_do(req); } -/* Disable fs work on AIX as there are known issues. - * See: Readme.md AIX Notes - */ -#ifndef _AIX for (i = 0; i < ARRAY_SIZE(fs_reqs); i++) { struct fs_req* req = fs_reqs + i; req->counter = 16; req->loop = loop; fs_do(req); } -#endif r = uv_run(loop, UV_RUN_DEFAULT); ASSERT(r == 0);