NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
misc/57422: Test for long double omitted in t_fpclassify automated framework cases
>Number: 57422
>Category: misc
>Synopsis: Test for long double omitted in t_fpclassify automated framework cases
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: misc-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 19 15:15:00 +0000 2023
>Originator: Jim Spath
>Release: 10.0_BETA
>Organization:
>Environment:
NetBSD net.bsd 10.0_BETA NetBSD 10.0_BETA (GENERIC) #0: Sun Feb 12 12:39:37 UTC 2023 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64 x86_64 AMD 686-class NetBSD
>Description:
I read up on floating point and math operations after finding an issue with an earmv6hf system, and noticed test cases for "long double" were commented out in the t_fpclassify test case. There are tests for double and float.
lib/libc/gen/t_fpclassify:fpclassify_double,
lib/libc/gen/t_fpclassify:fpclassify_float,
In some tests, 3 "flavours" are covered:
lib/libc/gen/t_fpsetmask:fpsetmask_unmasked_double,
lib/libc/gen/t_fpsetmask:fpsetmask_unmasked_float,
lib/libc/gen/t_fpsetmask:fpsetmask_unmasked_long_double,
tc-end: 1684374620.392177, fpsetmask_unmasked_double, skipped, FPU does not implement traps on FP exceptions
tc-end: 1684374620.666940, fpsetmask_unmasked_float, skipped, FPU does not implement traps on FP exceptions
tc-end: 1684374621.37833, fpsetmask_unmasked_long_double, skipped, FPU does not implement traps on FP exceptions
PR 50937 relates to long double math ops, and was closed around the NetBSD 7 release time [2016].
"Unexpected and wrong result when print subnormal long double value"
(src/lib/libc/gdtoa: ldtoa.c; also noticed PR 57250, in 2023--"./test 1e309")
The t_fpclassify code says:
/*
* XXX NetBSD doesn't have long-double flavors of frexp, ldexp, and modf,
* XXX so this test is disabled.
*/
But now we do, from what the man says, e.g.:
double
frexp(double value, int *exp);
float
frexpf(float value, int *exp);
long double
frexpl(long double value, int *exp);
>How-To-Repeat:
cd /usr/tests
Run:
atf-run lib/libc/gen/t_fpclassify
Note missing long double test case results.
>Fix:
Remove the skipper:
define TEST_LONG_DOUBLE
$ grep "LONG_DOUBLE" t_fpclassify.c
#ifdef TEST_LONG_DOUBLE
#endif /* TEST_LONG_DOUBLE */
#ifdef TEST_LONG_DOUBLE
#endif /* TEST_LONG_DOUBLE */
Home |
Main Index |
Thread Index |
Old Index