]> Savannah Git Hosting - gnulib.git/commitdiff
poll tests: Avoid test failure on Cygwin.
authorBruno Haible <bruno@clisp.org>
Thu, 23 May 2024 14:25:01 +0000 (16:25 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 23 May 2024 14:25:01 +0000 (16:25 +0200)
* 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.

ChangeLog
doc/posix-functions/poll.texi
tests/test-poll.c

index 373275610f546d602f584ac5e6f282c9543b2c89..e2ca6e4f277eb263856fc46858450c9b426d5f2b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-05-23  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        passfd tests: Mark as expected failure on Cygwin.
index ab7083c1c0233d90e1dfb09e8f7de6218b80a1fd..df2c19a900920bfc994fa24854b5d01186ee4cc9 100644 (file)
@@ -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
index 0f8969481907ffe6b676d0c395d62e6ca6f6caa9..58cd87cfb5ed208d5d1ba56c6b11780f45dd6f23 100644 (file)
@@ -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