]> Savannah Git Hosting - gnulib.git/commitdiff
poll tests: Avoid test failure on native Windows.
authorBruno Haible <bruno@clisp.org>
Tue, 25 Apr 2023 11:38:47 +0000 (13:38 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 25 Apr 2023 11:38:47 +0000 (13:38 +0200)
* tests/test-poll.c (test_pipe): Disable the POLLHUP check also on
native Windows.
* doc/posix-functions/poll.texi: Mention also native Windows w.r.t.
POLLHUP.

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

index 96ffb4228544bc19a1431ed61bc189cd18aacaba..1a980889b93f0c457582d0475e9d88b0c59d5a37 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-04-25  Bruno Haible  <bruno@clisp.org>
+
+       poll tests: Avoid test failure on native Windows.
+       * tests/test-poll.c (test_pipe): Disable the POLLHUP check also on
+       native Windows.
+       * doc/posix-functions/poll.texi: Mention also native Windows w.r.t.
+       POLLHUP.
+
 2023-04-25  Bruno Haible  <bruno@clisp.org>
 
        dfa tests: Fix compilation error (regression 2023-04-22).
index 1fad8f85a905336b0402f00eb6e6ce7800505918..ab7083c1c0233d90e1dfb09e8f7de6218b80a1fd 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.
+AIX 7.2, HP NonStop, mingw, MSVC.
 @end itemize
index 716c38b4921e1aa8d2259f8eac54bc5bc009e660..f34f7f460a7f565016c0faec9148065b767bac1c 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
+#if !(defined _AIX || (defined _WIN32 && !defined __CYGWIN__))
   if ((revents & (POLLHUP | POLLERR)) == 0)
     failed ("expecting POLLHUP after shutdown");
 #else