]> Savannah Git Hosting - gnulib.git/commitdiff
sigdescr_np tests: Avoid test failure on glibc/sparc.
authorBruno Haible <bruno@clisp.org>
Sun, 25 Jun 2023 16:40:19 +0000 (18:40 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 1 Jul 2023 08:41:28 +0000 (10:41 +0200)
* tests/test-sigdescr_np.c (main): Accept the glibc result for SIGEMT.
* doc/glibc-functions/sigdescr_np.texi: Mention two glibc deficiencies.

ChangeLog
doc/glibc-functions/sigdescr_np.texi
tests/test-sigdescr_np.c

index 4134d895c8350b990517eb83d59ecbfe616f034d..c14a6dccf1e668cdaf89e8042017e7802ec11e86 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-06-25  Bruno Haible  <bruno@clisp.org>
+
+       sigdescr_np tests: Avoid test failure on glibc/sparc.
+       * tests/test-sigdescr_np.c (main): Accept the glibc result for SIGEMT.
+       * doc/glibc-functions/sigdescr_np.texi: Mention two glibc deficiencies.
+
 2023-06-25  Bruno Haible  <bruno@clisp.org>
 
        strerrorname_np: Work around glibc bug on PowerPC, SPARC systems.
index 2bd2633b5d736c72763332e85d0238de093f129d..123b16201363d88c6a133fcab9cc5a765d2bc3b7 100644 (file)
@@ -21,6 +21,12 @@ glibc 2.31, macOS 11.1, FreeBSD 13.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX
 
 Portability problems not fixed by Gnulib:
 @itemize
+@item
+The description of SIGCHLD is wrong on some platforms:
+glibc.
+@item
+The description of SIGEMT is completely unintelligible on some platforms:
+glibc.
 @end itemize
 
 Note: This function is hardly useful, because it returns English strings, not
index 243f4aac66f6eabc18993d2d544638f2f199e4b2..c816f6c64d09c972ed5b7a177f8cd74cecd188c1 100644 (file)
@@ -1,6 +1,6 @@
 /* Test of sigdescr_np() function.
 
-   Copyright (C) 2020-2022 Free Software Foundation, Inc.
+   Copyright (C) 2020-2023 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -126,9 +126,11 @@ main (void)
   #ifdef SIGDANGER
   ASSERT (strcmp (sigdescr_np (SIGDANGER), "Swap space nearly exhausted") == 0);
   #endif
-  /* Mac OS X, FreeBSD, NetBSD, OpenBSD, Minix, AIX, IRIX, Cygwin, mingw */
+  /* glibc, Mac OS X, FreeBSD, NetBSD, OpenBSD, Minix, AIX, IRIX, Cygwin, mingw */
   #ifdef SIGEMT
-  ASSERT (strcmp (sigdescr_np (SIGEMT), "Instruction emulation needed") == 0);
+  ASSERT (strcmp (sigdescr_np (SIGEMT), "Instruction emulation needed") == 0
+          /* This completely unintelligible message is seen in glibc.  */
+          || strcmp (sigdescr_np (SIGEMT), "EMT trap") == 0);
   #endif
   /* Mac OS X, FreeBSD, NetBSD, OpenBSD, Minix */
   #if defined SIGINFO && SIGINFO != SIGPWR