]> 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>
Thu, 27 Apr 2023 16:35:57 +0000 (18:35 +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 d94710855d23c98fed7a9685043a1cdb1df53fdf..b969c027d0f2201dc4b8b7fe784d05aa2564638f 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-24  Bruno Haible  <bruno@clisp.org>
 
        select, pselect: Fix test failure on native Windows.
index c1efe87ad9c4b216fda315d94f1273ddddd2964c..c06c67ee1aef151b114ff5009649fa14dbf113af 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 bc3ab104b489b19749c9a5a71c2e10a15ca8840e..284b41801c02abfdcc0260ddd8816db27fe4fe88 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of poll() function.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -363,7 +363,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