]> 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>
Fri, 31 May 2024 14:22:08 +0000 (16:22 +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 05d09eb5952223b69fd1a4e0023c77ce646b6b4a..892856539e00ca37df3b8bc44debd4c1b08ffbe5 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>
 
        renameatu: Work around Cygwin 3.4.6 bug.
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 5275c44ac5716d1604f28b9cdf163b309be52712..8c1d5d6bb08c7c8101578d4506fd503b32af788f 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