On NetBSD 8.0, the test-pthread_sigmask2 fails: When the first argument is invalid, pthread_sigmask returns 0 instead of an error code.
This is not worth coding a override in gnulib. 2019-12-21 Bruno Haible <[email protected]> pthread_sigmask: Avoid test failure on NetBSD 8.0. * tests/test-pthread_sigmask2.c (main): Skip the error handling test on NetBSD. * doc/posix-functions/pthread_sigmask.texi: Mention the NetBSD problem. diff --git a/doc/posix-functions/pthread_sigmask.texi b/doc/posix-functions/pthread_sigmask.texi index dbee37f..2814662 100644 --- a/doc/posix-functions/pthread_sigmask.texi +++ b/doc/posix-functions/pthread_sigmask.texi @@ -34,4 +34,7 @@ Portability problems not fixed by Gnulib: @item On platforms that do not natively support this function, it has unspecified behavior in a multi-threaded process. +@item +This function may not fail when the first argument is invalid on some platforms: +NetBSD 8.0. @end itemize diff --git a/tests/test-pthread_sigmask2.c b/tests/test-pthread_sigmask2.c index 7209014..dfb3c01 100644 --- a/tests/test-pthread_sigmask2.c +++ b/tests/test-pthread_sigmask2.c @@ -59,7 +59,10 @@ main (int argc, char *argv[]) sigaddset (&set, SIGINT); /* Check error handling. */ + /* This call returns 0 on NetBSD 8.0. */ +#if !defined __NetBSD__ ASSERT (pthread_sigmask (1729, &set, NULL) == EINVAL); +#endif /* Block SIGINT. */ ASSERT (pthread_sigmask (SIG_BLOCK, &set, NULL) == 0);
