+2020-12-31 Bruno Haible <bruno@clisp.org>
+
+ poll tests: Avoid test failure on BSD and Solaris systems.
+ * tests/test-poll.c (test_accept_first, test_socket_pair): Disable the
+ "expecting POLLHUP after shutdown" test on all platforms except Linux.
+
2020-12-31 Paul Eggert <eggert@cs.ucla.edu>
fnmatch: merge from glibc + proposal
failed ("cannot read data left in the socket by closed process");
ASSERT (read (c, buf, 3) == 3);
ASSERT (write (c, "foo", 3) == 3);
- if ((poll1_wait (c, POLLIN | POLLOUT) & (POLLHUP | POLLERR)) == 0)
+ int revents = poll1_wait (c, POLLIN | POLLOUT);
+# ifdef __linux__
+ if ((revents & (POLLHUP | POLLERR)) == 0)
failed ("expecting POLLHUP after shutdown");
+# else
+ (void) revents;
+# endif
close (c);
}
#endif
test_pair (c1, c2);
close (c1);
ASSERT (write (c2, "foo", 3) == 3);
- if ((poll1_nowait (c2, POLLIN | POLLOUT) & (POLLHUP | POLLERR)) == 0)
+ int revents = poll1_nowait (c2, POLLIN | POLLOUT);
+#ifdef __linux__
+ if ((revents & (POLLHUP | POLLERR)) == 0)
failed ("expecting POLLHUP after shutdown");
+#else
+ (void) revents;
+#endif
close (c2);
}