test: fix threadpool_multiple_event_loops on PPC

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 <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
Imran Iqbal 2016-02-25 11:51:31 -05:00 committed by Ben Noordhuis
parent 4a24df9167
commit b015b4d0ee
2 changed files with 7 additions and 5 deletions

View File

@ -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)

View File

@ -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);