[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
poll tests: Avoid test failure on native Windows
From: |
Bruno Haible |
Subject: |
poll tests: Avoid test failure on native Windows |
Date: |
Tue, 25 Apr 2023 13:42:40 +0200 |
On native Windows, I see the 'test-poll' test fail always:
FAIL: test-poll
===============
Unconnected socket test... passed
Connected sockets test... passed
General socket test with fork... passed
Pipe test... failed (expecting POLLHUP after shutdown)
FAIL test-poll.exe (exit status: 1)
Since our documentation says that POLLHUP is not fixed by this module
anyway (it does not work on AIX either), let me disable this part of the
test.
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.
diff --git a/doc/posix-functions/poll.texi b/doc/posix-functions/poll.texi
index 1fad8f85a9..ab7083c1c0 100644
--- a/doc/posix-functions/poll.texi
+++ b/doc/posix-functions/poll.texi
@@ -26,5 +26,5 @@
@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 716c38b492..f34f7f460a 100644
--- a/tests/test-poll.c
+++ b/tests/test-poll.c
@@ -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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- poll tests: Avoid test failure on native Windows,
Bruno Haible <=