From: Bruno Haible Date: Tue, 25 Apr 2023 11:38:47 +0000 (+0200) Subject: poll tests: Avoid test failure on native Windows. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=f0fa9887df02a9ad9b9d84cc5a77dcee739415d2;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index d94710855d..b969c027d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2023-04-25 Bruno Haible + + 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 select, pselect: Fix test failure on native Windows. diff --git a/doc/posix-functions/poll.texi b/doc/posix-functions/poll.texi index c1efe87ad9..c06c67ee1a 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. +AIX 7.2, HP NonStop, mingw, MSVC. @end itemize diff --git a/tests/test-poll.c b/tests/test-poll.c index bc3ab104b4..284b41801c 100644 --- a/tests/test-poll.c +++ b/tests/test-poll.c @@ -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