bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pthread_sigmask: avoid test failure on NetBSD 8.0


From: Bruno Haible
Subject: pthread_sigmask: avoid test failure on NetBSD 8.0
Date: Sun, 22 Dec 2019 08:08:03 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-166-generic; KDE/5.18.0; x86_64; ; )

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  <address@hidden>

        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);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]