* tests/test-poll.c (test_pipe): Disable the "expecting POLLHUP after
shutdown" test on AIX.
* doc/posix-functions/poll.texi: Mention the AIX bug.
+2020-12-31 Bruno Haible <bruno@clisp.org>
+
+ poll tests: Avoid test failure on AIX.
+ * tests/test-poll.c (test_pipe): Disable the "expecting POLLHUP after
+ shutdown" test on AIX.
+ * doc/posix-functions/poll.texi: Mention the AIX bug.
+
2020-12-31 Bruno Haible <bruno@clisp.org>
poll tests: Avoid test failure on BSD and Solaris systems.
Under Windows, when passing a pipe, Gnulib's @code{poll} replacement might
return 0 even before the timeout has passed. Programs using it with pipes can
thus busy wait.
-
@item
-Under HP NonStop, file descriptors other than sockets do not support
-POLLHUP; they will return a "readable" status instead.
+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.
@end itemize
ASSERT (pipe (fd) >= 0);
test_pair (fd[0], fd[1]);
close (fd[0]);
- if ((poll1_wait (fd[1], POLLIN | POLLOUT) & (POLLHUP | POLLERR)) == 0)
+ int revents = poll1_wait (fd[1], POLLIN | POLLOUT);
+#if !defined _AIX
+ if ((revents & (POLLHUP | POLLERR)) == 0)
failed ("expecting POLLHUP after shutdown");
+#else
+ (void) revents;
+#endif
close (fd[1]);
}