The branch stable/13 has been updated by arichardson:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=04b1a333b7443c7f37e140a176a0daa6617a3a79

commit 04b1a333b7443c7f37e140a176a0daa6617a3a79
Author:     Alex Richardson <[email protected]>
AuthorDate: 2021-02-23 09:38:57 +0000
Commit:     Alex Richardson <[email protected]>
CommitDate: 2021-04-22 09:42:06 +0000

    lib/msun/ctrig_test: Print the mismatched values on failure
    
    This test fails on aarch64 but debugging it is difficult without the
    results being printed.
    
    Now the failing AArch64 test prints:
    root@freebsd-aarch64:/nfsroot/usr/tests/lib/msun # kyua debug 
ctrig_test:test_nan_inputs
    *** Check failed: 
/local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: (ctan)(_d) 
(0 + -1 I) != expected (-0 + -1 I)
    *** Check failed: 
/local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: ctan 
fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) 
(0x10) != 0
    *** Check failed: 
/local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: (ctan)(_d) 
(0 + 1 I) != expected (-0 + 1 I)
    *** Check failed: 
/local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: ctan 
fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) 
(0x10) != 0
    *** Check failed: 
/local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: (ctanf)(_d) 
(0 + -1 I) != expected (-0 + -1 I)
    *** Check failed: 
/local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: ctanf 
fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) 
(0x10) != 0
    *** Check failed: 
/local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: (ctanf)(_d) 
(0 + 1 I) != expected (-0 + 1 I)
    *** Check failed: 
/local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: ctanf 
fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) 
(0x10) != 0
    *** Check failed: 
/local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: (ctanh)(_d) 
(1 + 0 I) != expected (1 + -0 I)
    *** Check failed: 
/local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: ctanh 
fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) 
(0x10) != 0
    *** Check failed: 
/local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: 
(ctanhf)(_d) (1 + 0 I) != expected (1 + -0 I)
    *** Check failed: 
/local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: ctanhf 
fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) 
(0x10) != 0
    *** Check failed: 
/local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: (ctanh)(_d) 
(-1 + 0 I) != expected (-1 + -0 I)
    *** Check failed: 
/local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: ctanh 
fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) 
(0x10) != 0
    *** Check failed: 
/local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: 
(ctanhf)(_d) (-1 + 0 I) != expected (-1 + -0 I)
    *** Check failed: 
/local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: ctanhf 
fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) 
(0x10) != 0
    ctrig_test:test_nan_inputs  ->  failed: 16 checks failed; see output for 
more details
    
    Reviewed By:    ngie
    Differential Revision: https://reviews.freebsd.org/D28788
    
    (cherry picked from commit f3f7b0dc065ce30f29b221788c58079d78931a77)
---
 lib/msun/tests/ctrig_test.c | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/lib/msun/tests/ctrig_test.c b/lib/msun/tests/ctrig_test.c
index b40373fed29b..2499e53ab4d5 100644
--- a/lib/msun/tests/ctrig_test.c
+++ b/lib/msun/tests/ctrig_test.c
@@ -58,14 +58,22 @@ __FBSDID("$FreeBSD$");
  * XXX The volatile here is to avoid gcc's bogus constant folding and work
  *     around the lack of support for the FENV_ACCESS pragma.
  */
-#define        test_p(func, z, result, exceptmask, excepts, checksign) do {    
\
-       volatile long double complex _d = z;                            \
-       debug("  testing %s(%Lg + %Lg I) == %Lg + %Lg I\n", #func,      \
-           creall(_d), cimagl(_d), creall(result), cimagl(result));    \
-       ATF_CHECK(feclearexcept(FE_ALL_EXCEPT) == 0);                   \
-       ATF_CHECK(cfpequal_cs((func)(_d), (result), (checksign)));              
\
-       ATF_CHECK(((void)(func), fetestexcept(exceptmask) == (excepts)));       
\
-} while (0)
+#define test_p(func, z, result, exceptmask, excepts, checksign)                
        \
+       do {                                                                    
\
+               volatile long double complex _d = z;                            
\
+               debug("  testing %s(%Lg + %Lg I) == %Lg + %Lg I\n", #func,      
\
+                   creall(_d), cimagl(_d), creall(result), cimagl(result));    
\
+               ATF_CHECK(feclearexcept(FE_ALL_EXCEPT) == 0);                   
\
+               volatile long double complex _r = (func)(_d);                   
\
+               ATF_CHECK_MSG(cfpequal_cs(_r, (result), (checksign)),           
\
+                   "%s (%Lg + %Lg I) != expected (%Lg + %Lg I)",               
\
+                   __XSTRING((func)(_d)), creall(_r), cimagl(_r),              
\
+                   creall(result), cimagl(result));                            
\
+               volatile int _e = fetestexcept(exceptmask);                     
\
+               ATF_CHECK_MSG(_e == (excepts),                                  
\
+                   "%s fetestexcept(%s) (%#x) != %#x", __XSTRING(func),        
\
+                   __XSTRING(exceptmask), _e, (excepts));                      
\
+       } while (0)
 
 /*
  * Test within a given tolerance.  The tolerance indicates relative error
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to