Alex Richardson
b424e0038a
Improve test messages for msun tests
...
Also print the mismatched values when numbers compare not equal.
Reviewed By: dim
Differential Revision: https://reviews.freebsd.org/D29091
2021-03-22 11:55:06 +00:00
Alex Richardson
133bc64507
Convert the msun tests to ATF
...
This provides better error messages that just an assertion failure and
also makes it easier to mark individual tests as XFAIL.
It was also helpful when coming up with D28786 and D28787.
Differential Revision: https://reviews.freebsd.org/D28798
2021-03-22 11:55:06 +00:00
Alex Richardson
f3f7b0dc06
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
2021-02-23 09:39:40 +00:00
Alex Richardson
a7b42c4b7f
msun: ctanh/ctanhf: Import fix from musl libc
...
This applies musl commit b02eed9c4841913d690a2d0029737d72615384fe by
Szabolcs Nagy and updates the tests accordingly. This also allows
removing an XFAIL from the test.
musl commit message:
complex: fix ctanh(+-0+i*nan) and ctanh(+-0+-i*inf)
These cases were incorrect in C11 as described by
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1886.htm
PR: 217528
Reviewed By: dim
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D28578
2021-02-15 22:55:12 +00:00
Dimitry Andric
ac76bc1145
Fix lib/msun's ctrig_test/test_inf_inputs test case with clang >= 10
...
This sprinkles a few strategic volatiles in an attempt to defeat clang's
optimization interfering with the expected floating-point exception
flags.
Reported by: lwhsu
PR: 244732
MFC after: 3 days
2021-02-09 22:07:05 +01:00
Alex Richardson
4d2edf3af1
test_inf_inputs: Use atf_tc_expect_fail() instead of atf_tc_skip()
...
Reviewed By: lwhsu
Differential Revision: https://reviews.freebsd.org/D28396
2021-01-29 09:28:40 +00:00
Li-Wen Hsu
0fc06121ac
Temporarily skip 2 failing tests after llvm10 import
...
PR: 244732
Sponsored by: The FreeBSD Foundation
2020-03-11 12:43:54 +00:00
Enji Cooper
6cddacd039
Expect :test_zero_input to fail on amd64
...
The clang 4.x+ upgrade now causes this testcase to fail, but
only on amd64.
More investigation will be done to determine the cause.
MFC after: 1 week
Reported by: Jenkins
PR: 217528
Sponsored by: Dell EMC Isilon
2017-03-09 06:58:47 +00:00
Enji Cooper
b97b0df681
Don't expect :test_large_inputs to fail with i386 anymore
...
Recent changes (maybe a side-effect of the ATF-ification in r314649)
invalidate the failure expectation.
PR: 205446
MFC after: 1 week
Sponsored by: Dell EMC Isilon
2017-03-09 06:56:44 +00:00
Enji Cooper
abe427af75
Fix warnings in lib/msun/tests/... to help pave way for WARNS?= 6.
...
- Staticize variables.
- Use nitems liberally. Wherever nitems is used, use unsigned integers
- Remove unused variables (argc, argv, etc)
This fixes most issues -- some issues remain in logarithm_test though.
MFC after: 1 week
Sponsored by: Dell EMC Isilon
2017-03-04 10:07:46 +00:00
Enji Cooper
5c47281893
Convert lib/msun/ctrig_test from TAP to ATF
...
This is being done as a precursor for work needed to annontate failing
testcases with clang 4.0+.
MFC after: 1 week
PR: 217528
Sponsored by: Dell EMC Isilon
2017-03-04 09:16:51 +00:00
Enji Cooper
7a83ecc454
Skip :test_large on i386
...
More assertions are failing on ^/head now.
PR: 205446
Sponsored by: EMC / Isilon Storage Division
2016-09-02 08:17:43 +00:00
Enji Cooper
8a7d0e8ce3
Integrate the remaining tools/regression/lib/msun testcases into the
...
FreeBSD test suite under lib/msun/tests
MFC after: 3 weeks
X-MFC with: r292328
Sponsored by: EMC / Isilon Storage Division
2015-12-20 05:06:44 +00:00