From 1631ebd26712b2f5f41285c8cada819bebed294c Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sat, 30 Oct 2010 19:40:35 +0200 Subject: test/math/*: unbreak test/math was not running at all, presume it has bit rotted: It was trying to run libm-test.c as if it is a binary. It was looking for libm-test-ulps (file with allowed errors in lower bits) in arch-specific dirs which do not exist in uclibc, as a result wrong file (libm-test.inc) was used instead. Test failure was not showing the error result, user had to fish it out from some .out files. I added libm-test-ulps-ARCH files from recent glibc, this filtered out a lot of false positives. For example, cosf(M_PI_6l * 4.0) ideally should be -0.5, we are getting -0.50000005047356477217, and this isn't a failure (the difference is one lowest bit of mantissa). "make check UCLIBC_ONLY=1 VERBOSE=1" still fails, but not as catastrophically as before. For the record, the failure occurs on the stage where we check 32-bit float functions, these tests fail: Failure: Test: modf (NaN, &x) == NaN Failure: Test: ilogb (NaN) == FP_ILOGBNAN plus exceptions allowed Failure: Test: scalb (2.0, 0.5) == NaN plus invalid exception Failure: Test: scalb (3.0, -2.5) == NaN plus invalid exception Failure: Test: scalb (0, NaN) == NaN Failure: Test: scalb (1, NaN) == NaN Failure: Test: scalb (0, inf) == NaN plus invalid exception Failure: Test: scalb (-0, inf) == NaN plus invalid exception Failure: Test: scalb (1, inf) == inf Failure: Test: scalb (-1, inf) == -inf Failure: Test: scalb (inf, -inf) == NaN plus invalid exception Failure: Test: scalb (-inf, -inf) == NaN plus invalid exception Failure: Test: scalb (1, NaN) == NaN Failure: Test: scalb (0, NaN) == NaN Failure: Test: scalb (inf, NaN) == NaN Failure: Test: pow (1, NaN) == 1 Failure: Test: pow (1, inf) == 1 Failure: Test: pow (-1, inf) == 1 Failure: Test: pow (1, -inf) == 1 Failure: Test: pow (-1, -inf) == 1 Failure: Test: rint (0.5) == 0.0 Failure: Test: rint (1.5) == 2.0 Failure: Test: rint (2.5) == 2.0 Failure: Test: rint (3.5) == 4.0 Failure: Test: rint (4.5) == 4.0 Failure: Test: rint (-0.5) == -0.0 Failure: Test: rint (-1.5) == -2.0 Failure: Test: rint (-2.5) == -2.0 Failure: Test: rint (-3.5) == -4.0 Failure: Test: rint (-4.5) == -4.0 Signed-off-by: Denys Vlasenko --- test/math/Makefile.in | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'test/math/Makefile.in') diff --git a/test/math/Makefile.in b/test/math/Makefile.in index 8a46e77db..e801112c6 100644 --- a/test/math/Makefile.in +++ b/test/math/Makefile.in @@ -20,9 +20,10 @@ EXTRA_CFLAGS := -fno-builtin EXTRA_LDFLAGS := -lm PERL := /usr/bin/perl -ulps-file := $(firstword $(wildcard $(config-sysdirs:%=$(..)%/libm-test-ulps))) -libm-test.c: $(ulps-file) libm-test.inc gen-libm-test.pl - $(Q)$(PERL) ./gen-libm-test.pl -u $< ./libm-test.inc -o "." 2>&1 > /dev/null -EXTRA_CLEAN := libm-test.c libm-test-ulps.h -TARGETS=libm-test.c +$(TESTS): libm-test.c + +libm-test.c: libm-test.inc gen-libm-test.pl + $(Q)$(PERL) ./gen-libm-test.pl -u libm-test-ulps-$(TARGET_ARCH) ./libm-test.inc -o "." 2>&1 > /dev/null + +EXTRA_CLEAN := libm-test.c libm-test-ulps.h -- cgit v1.2.3