From faea76d81d3cb827de2d16cc0ace53fc240db060 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Tue, 19 Apr 2016 18:25:54 -0400 Subject: [PATCH] test: skip fs_event_close_in_callback on AIX The file descriptor that you receive from ahafs has to be part of the pollset_poll set of interest in order to receive events. This does not happen until we are in the event loop causing the test to hang and therefore timeout. PR-URL: https://github.com/libuv/libuv/pull/838 Reviewed-By: Ben Noordhuis --- test/test-fs-event.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/test-fs-event.c b/test/test-fs-event.c index 20f489c2..353c43b0 100644 --- a/test/test-fs-event.c +++ b/test/test-fs-event.c @@ -698,18 +698,19 @@ TEST_IMPL(fs_event_close_with_pending_event) { return 0; } -#if defined(HAVE_KQUEUE) +#if defined(HAVE_KQUEUE) || defined(_AIX) /* kqueue doesn't register fs events if you don't have an active watcher. * The file descriptor needs to be part of the kqueue set of interest and * that's not the case until we actually enter the event loop. + * This is also observed on AIX with ahafs. */ TEST_IMPL(fs_event_close_in_callback) { - fprintf(stderr, "Skipping test, doesn't work with kqueue.\n"); + fprintf(stderr, "Skipping test, doesn't work with kqueue and AIX.\n"); return 0; } -#else /* !HAVE_KQUEUE */ +#else /* !HAVE_KQUEUE || !_AIX */ static void fs_event_cb_close(uv_fs_event_t* handle, const char* filename, int events, int status) { @@ -766,7 +767,7 @@ TEST_IMPL(fs_event_close_in_callback) { return 0; } -#endif /* HAVE_KQUEUE */ +#endif /* HAVE_KQUEUE || _AIX */ TEST_IMPL(fs_event_start_and_close) { uv_loop_t* loop;