This is the mail archive of the gsl-discuss@sourceware.org mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: test release gsl-1.9.90.tar.gz



On 11 sep 2007, at 22.00, Aleksej Saushev wrote:


Brian Gough <bjg@network-theory.co.uk> writes:

I have made a test release for gsl-1.10.

gcc -DHAVE_CONFIG_H -I. -I.. -I.. -g -O2 -c test.c
/bin/ksh ../libtool --tag=CC --mode=link gcc -g -O2 -o test test.o libgslsys.la ../ieee-utils/libgslieeeutils.la ../err/ libgslerr.la ../test/libgsltest.la libgslsys.la ../utils/ libutils.la -lm
gcc -g -O2 -o test test.o ../ieee-utils/.libs/libgslieeeutils.a ../ err/.libs/libgslerr.a ../test/.libs/libgsltest.a ./.libs/ libgslsys.a ../utils/.libs/libutils.a -lm
make check-TESTS
FAIL: gsl_isinf(-inf) (1 observed vs -1 expected) [112]
FAIL: test
===================
1 of 1 tests failed
===================


Fix attached.

NetBSD 4.99.31 i386
cc (GCC) 4.1.3 20070620 prerelease (NetBSD nb1 20070620)

With fix all tests pass.

--- sys/test.c.orig	2007-06-11 12:57:34.000000000 +0400
+++ sys/test.c	2007-06-11 12:57:52.000000000 +0400
@@ -383,7 +383,7 @@
        negative).  (This is all that C99 requires.) */

     s = gsl_isinf (-inf);
-    gsl_test_int (s, -1, "gsl_isinf(-inf)");
+    gsl_test_int (s, 1, "gsl_isinf(-inf)");

     s = gsl_isinf (nan);
     gsl_test_int (s, 0, "gsl_isinf(nan)");

The following alternate patch will fix the test failure, without modifying the test cases.
--- /Users/emac/Desktop/infnan.c 2007-09-12 22:37:19.000000000 +0200
+++ /Softsys/gsl-1.9.90/sys/infnan.c 2007-09-12 22:44:30.000000000 +0200
@@ -118,7 +118,11 @@
int
gsl_isinf (const double x)
{
- return isinf(x);
+ int result = isinf(x);
+ if (result > 0 && x < 0) {
+ result = - result;
+ }
+ return result;
}
# else
Note: the one on the desktop is the unmodified file.
Also, with make -k check all other test cases pass.
-------------------------------------
This sig is dedicated to the advancement of Nuclear Power
Tommy Nordgren
tommy.nordgren@comhem.se





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]