From: Bruno Haible Date: Thu, 23 May 2024 14:25:01 +0000 (+0200) Subject: poll tests: Avoid test failure on Cygwin. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=bbb443f469fa2599521f84447898cd174f85f20b;p=gnulib.git poll tests: Avoid test failure on Cygwin. * tests/test-poll.c (test_pipe): Disable the POLLHUP check also on Cygwin. * doc/posix-functions/poll.texi: Mention also Cygwin w.r.t. POLLHUP. --- diff --git a/ChangeLog b/ChangeLog index 05d09eb595..892856539e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024-05-23 Bruno Haible + + poll tests: Avoid test failure on Cygwin. + * tests/test-poll.c (test_pipe): Disable the POLLHUP check also on + Cygwin. + * doc/posix-functions/poll.texi: Mention also Cygwin w.r.t. POLLHUP. + 2024-05-23 Bruno Haible renameatu: Work around Cygwin 3.4.6 bug. diff --git a/doc/posix-functions/poll.texi b/doc/posix-functions/poll.texi index ab7083c1c0..df2c19a900 100644 --- a/doc/posix-functions/poll.texi +++ b/doc/posix-functions/poll.texi @@ -26,5 +26,5 @@ thus busy wait. @item On some platforms, file descriptors other than sockets do not support POLLHUP; they will return a "readable" or "writable" status instead: -AIX 7.2, HP NonStop, mingw, MSVC. +AIX 7.2, Cygwin 3.4.6, HP NonStop, mingw, MSVC. @end itemize diff --git a/tests/test-poll.c b/tests/test-poll.c index 5275c44ac5..8c1d5d6bb0 100644 --- a/tests/test-poll.c +++ b/tests/test-poll.c @@ -362,7 +362,7 @@ test_pipe (void) test_pair (fd[0], fd[1]); close (fd[0]); int revents = poll1_wait (fd[1], POLLIN | POLLOUT); -#if !(defined _AIX || (defined _WIN32 && !defined __CYGWIN__)) +#if !(defined _AIX || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__)) if ((revents & (POLLHUP | POLLERR)) == 0) failed ("expecting POLLHUP after shutdown"); #else