On NetBSD 9.3/arm64, I see the attached test failures of fenv* tests.

This patch fixes them all.


2024-01-19  Bruno Haible  <br...@clisp.org>

        fenv-*: Fix test failures on NetBSD 9.3/arm64.
        * m4/fenv-exceptions-trapping.m4 (gl_FENV_EXCEPTIONS_TRAPPING): Override
        feenableexcept() also on NetBSD/arm64.
        * doc/glibc-functions/feenableexcept.texi: Update platforms list.

diff --git a/doc/glibc-functions/feenableexcept.texi 
b/doc/glibc-functions/feenableexcept.texi
index 0c98c5c844..a306a904e5 100644
--- a/doc/glibc-functions/feenableexcept.texi
+++ b/doc/glibc-functions/feenableexcept.texi
@@ -26,7 +26,7 @@
 macOS 11.1, musl libc, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, 
AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11.4, Cygwin 1.7.7, mingw, MSVC 14, 
Android 4.4.
 @item
 This function does not detect failures on
-glibc 2.19/aarch64, FreeBSD 12.2/arm, FreeBSD 12.2/arm64.
+glibc 2.19/aarch64, FreeBSD 12.2/arm, FreeBSD 12.2/arm64, NetBSD 9.3/arm64.
 @end itemize
 
 Portability problems not fixed by Gnulib:
diff --git a/m4/fenv-exceptions-trapping.m4 b/m4/fenv-exceptions-trapping.m4
index 784bed1697..cd9c96674f 100644
--- a/m4/fenv-exceptions-trapping.m4
+++ b/m4/fenv-exceptions-trapping.m4
@@ -1,4 +1,4 @@
-# fenv-exceptions-trapping.m4 serial 1
+# fenv-exceptions-trapping.m4 serial 2
 dnl Copyright (C) 2023-2024 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,7 @@ AC_DEFUN_ONCE([gl_FENV_EXCEPTIONS_TRAPPING]
     dnl On glibc 2.19/aarch64, feenableexcept does not detect failures.
     dnl Fixed through
     dnl 
<https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=302949e2940a9da3f6364a1574619e621b7e1e71>.
-    dnl Similarly on FreeBSD 12.2/arm and FreeBSD 12.2/arm64.
+    dnl Similarly on FreeBSD 12.2/arm, FreeBSD 12.2/arm64, NetBSD 9.3/arm64.
     case "$host" in
       aarch64*-*-linux*)
         AC_CACHE_CHECK([whether feenableexcept works],
@@ -41,7 +41,7 @@ AC_DEFUN_ONCE([gl_FENV_EXCEPTIONS_TRAPPING]
           *) REPLACE_FEENABLEEXCEPT=1 ;;
         esac
         ;;
-      arm*-*-freebsd* | aarch64*-*-freebsd*)
+      arm*-*-freebsd* | aarch64*-*-freebsd* | aarch64*-*-netbsd*)
         REPLACE_FEENABLEEXCEPT=1
         ;;
     esac
=====================================
   dummy 0: gltests/test-suite.log
=====================================

# TOTAL: 22
# PASS:  13
# SKIP:  0
# XFAIL: 0
# FAIL:  9
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: test-fenv-env-2
=====================

../../gltests/test-fenv-env-2.c:54: assertion 'fegetexcept () == (supports_trapping ? FE_DIVBYZERO : 0)' failed
FAIL test-fenv-env-2 (exit status: 134)

FAIL: test-fenv-env-3
=====================

../../gltests/test-fenv-env-3.c:54: assertion 'fegetexcept () == (supports_trapping ? FE_DIVBYZERO : 0)' failed
FAIL test-fenv-env-3 (exit status: 134)

FAIL: test-fenv-env-4
=====================

../../gltests/test-fenv-env-4.c:74: assertion 'fegetexcept () == (supports_trapping ? FE_INVALID : 0)' failed
FAIL test-fenv-env-4 (exit status: 134)

FAIL: test-fenv-env-5
=====================

../../gltests/test-fenv-env-5.c:76: assertion 'fegetexcept () == (supports_trapping ? FE_INVALID : 0)' failed
FAIL test-fenv-env-5 (exit status: 134)

FAIL: test-fenv-env-6.sh
========================

Failed: ./test-fenv-env-6
FAIL test-fenv-env-6.sh (exit status: 1)

FAIL: test-fenv-except-tracking-2.sh
====================================

Failed: ./test-fenv-except-tracking-2 f
FAIL test-fenv-except-tracking-2.sh (exit status: 1)

FAIL: test-fenv-except-tracking-3.sh
====================================

Failed: ./test-fenv-except-tracking-3 FE_INVALID
FAIL test-fenv-except-tracking-3.sh (exit status: 1)

FAIL: test-fenv-except-trapping-1
=================================

../../gltests/test-fenv-except-trapping-1.c:64: assertion 'fedisableexcept (uint_to_exceptions (b)) == uint_to_exceptions (a)' failed
FAIL test-fenv-except-trapping-1 (exit status: 134)

FAIL: test-fenv-except-trapping-2.sh
====================================

Failed (got no trap): ./test-fenv-except-trapping-2 1 p f
Failed (got no trap): ./test-fenv-except-trapping-2 1 p d
Failed (got no trap): ./test-fenv-except-trapping-2 1 p l
Failed (got no trap): ./test-fenv-except-trapping-2 1 q f
Failed (got no trap): ./test-fenv-except-trapping-2 1 q d
Failed (got no trap): ./test-fenv-except-trapping-2 1 q l
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
Failed (got no trap): ./test-fenv-except-trapping-2 2 p f
Failed (got no trap): ./test-fenv-except-trapping-2 2 p d
Failed (got no trap): ./test-fenv-except-trapping-2 2 p l
Failed (got no trap): ./test-fenv-except-trapping-2 2 q f
Failed (got no trap): ./test-fenv-except-trapping-2 2 q d
Failed (got no trap): ./test-fenv-except-trapping-2 2 q l
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
Failed (got no trap): ./test-fenv-except-trapping-2 3 p f
Failed (got no trap): ./test-fenv-except-trapping-2 3 p d
Failed (got no trap): ./test-fenv-except-trapping-2 3 p l
Failed (got no trap): ./test-fenv-except-trapping-2 3 q f
Failed (got no trap): ./test-fenv-except-trapping-2 3 q d
Failed (got no trap): ./test-fenv-except-trapping-2 3 q l
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
Failed (got no trap): ./test-fenv-except-trapping-2 4 p f
Failed (got no trap): ./test-fenv-except-trapping-2 4 p d
Failed (got no trap): ./test-fenv-except-trapping-2 4 p l
Failed (got no trap): ./test-fenv-except-trapping-2 4 q f
Failed (got no trap): ./test-fenv-except-trapping-2 4 q d
Failed (got no trap): ./test-fenv-except-trapping-2 4 q l
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
Failed (got no trap): ./test-fenv-except-trapping-2 5 p f
Failed (got no trap): ./test-fenv-except-trapping-2 5 p d
Failed (got no trap): ./test-fenv-except-trapping-2 5 p l
Failed (got no trap): ./test-fenv-except-trapping-2 5 q f
Failed (got no trap): ./test-fenv-except-trapping-2 5 q d
Failed (got no trap): ./test-fenv-except-trapping-2 5 q l
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
Failed (got no trap): ./test-fenv-except-trapping-2 6 p f
Failed (got no trap): ./test-fenv-except-trapping-2 6 p d
Failed (got no trap): ./test-fenv-except-trapping-2 6 p l
Failed (got no trap): ./test-fenv-except-trapping-2 6 q f
Failed (got no trap): ./test-fenv-except-trapping-2 6 q d
Failed (got no trap): ./test-fenv-except-trapping-2 6 q l
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
Failed (got no trap): ./test-fenv-except-trapping-2 7 p f
Failed (got no trap): ./test-fenv-except-trapping-2 7 p d
Failed (got no trap): ./test-fenv-except-trapping-2 7 p l
Failed (got no trap): ./test-fenv-except-trapping-2 7 q f
Failed (got no trap): ./test-fenv-except-trapping-2 7 q d
Failed (got no trap): ./test-fenv-except-trapping-2 7 q l
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
Failed (got no trap): ./test-fenv-except-trapping-2 8 p f
Failed (got no trap): ./test-fenv-except-trapping-2 8 p d
Failed (got no trap): ./test-fenv-except-trapping-2 8 p l
Failed (got no trap): ./test-fenv-except-trapping-2 8 q f
Failed (got no trap): ./test-fenv-except-trapping-2 8 q d
Failed (got no trap): ./test-fenv-except-trapping-2 8 q l
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
Failed (got no trap): ./test-fenv-except-trapping-2 9 p f
Failed (got no trap): ./test-fenv-except-trapping-2 9 p d
Failed (got no trap): ./test-fenv-except-trapping-2 9 p l
Failed (got no trap): ./test-fenv-except-trapping-2 9 q f
Failed (got no trap): ./test-fenv-except-trapping-2 9 q d
Failed (got no trap): ./test-fenv-except-trapping-2 9 q l
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
../../gltests/test-fenv-except-trapping-2.c:417: assertion 'fedisableexcept (FE_ALL_EXCEPT & ~expected_exceptions) == FE_ALL_EXCEPT' failed
[1]   Abort trap (core dumped) ${CHECKER} ./test-fenv-except-trapping-2${EXEE...
FAIL test-fenv-except-trapping-2.sh (exit status: 1)

Reply via email to