The out of the box FreeBSD SBCL scares off new users, e.g., me
when I ran the self tests. Here follow patches to ...
* Reassure users
* Improve tests
* Fix typos
... share and enjoy!
--- tests.orig/run-tests.sh Sun Jul 20 20:57:06 2003
+++ tests/run-tests.sh Tue Dec 7 15:21:01 2004
@@ -13,6 +13,11 @@
# absolutely no warranty. See the COPYING and CREDITS files for
# more information.
+echo <<EOF
+Do not be alarmed if a test fails, remove that file and re-test.
+The regression suite is constantly growing, so a "new" failure
+most likely is just something the older suite did not test for.
+EOF
# how we invoke SBCL in the tests
#
# Until sbcl-0.6.12.8, the shell variable SBCL was bound to a relative
--- tests.orig/float-modes.impure.lisp Tue Dec 7 14:24:03 2004
+++ tests/float-modes.impure.lisp Tue Dec 7 14:23:53 2004
@@ -0,0 +1,22 @@
+;;;; These tests check for known bugs which wrongly change
+;;;; floating point arithmetic modes such as whether to
+;;;; signal an overflow error or return an infinite value.
+
+;;;; Known broken in SBCL 0.8.16 under FreeBSD 5.2-RELEASE
+;;;; so uncomment the next line to disable this test file.
+; #+SBCL (quit :unix-status 104) ; fake success
+
+(load "assertoid.lisp")
+(use-package "ASSERTOID")
+
+(assert (and (raises-error? (float-radix 0)
+ type-error)
+ (raises-error? (/ 1.0 0.0)
+ floating-point-overflow)))
+(assert (and (raises-error? (/ 1.0 0.0)
+ floating-point-overflow)
+ (raises-error? (/ 1.0 0.0)
+ floating-point-overflow)))
+
+;;; success
+(quit :unix-status 104)
--- tests.orig/float-overflow.impure.lisp Tue Dec 7 14:24:03 2004
+++ tests/float-overflow.impure.lisp Tue Dec 7 14:23:53 2004
@@ -0,0 +1,22 @@
+;;;; This file is for tests which may lose after prior tests
+;;;; tickle bugs that break floating point arithmetic.
+;;;; See float-modes.impure.lisp
+;;;; and float.pure.lisp
+;;;; for details.
+
+(load "assertoid.lisp")
+(use-package "ASSERTOID")
+
+;;; This test requires a freshly loaded lisp
+;;; to avoid persistent floating point bugs,
+;;; e.g., in SBCL 0.8.16 under FreeBSD 5.2-RELEASE
+;;; operations like (float-radix 0) and (/ 1 0) ...
+;;; change subsequent floating point arithmetic that should
+;;; signal an overflow error to instead return an infinite value.
+(assert (raises-error? (scale-float 1.0 most-positive-fixnum)
+ floating-point-overflow))
+(assert (raises-error? (scale-float 1.0d0 (1+ most-positive-fixnum))
+ floating-point-overflow))
+
+;;; success
+(quit :unix-status 104)
--- tests.orig/float.pure.lisp Wed Jul 14 02:21:11 2004
+++ tests/float.pure.lisp Mon Nov 22 17:29:31 2004
@@ -91,7 +91,3 @@
least-positive-double-float))
(assert (= 0.0 (scale-float 1.0 most-negative-fixnum)))
(assert (= 0.0d0 (scale-float 1.0d0 (1- most-negative-fixnum))))
-(assert (raises-error? (scale-float 1.0 most-positive-fixnum)
- floating-point-overflow))
-(assert (raises-error? (scale-float 1.0d0 (1+ most-positive-fixnum))
- floating-point-overflow))
--- INSTALL.~0~ Sun Aug 8 08:32:04 2004
+++ INSTALL Wed Nov 24 11:55:25 2004
@@ -94,7 +94,7 @@
passed their tests. If you need to install by hand, see "install.sh"
for details.
- Documentation concists of a man-page, the SBCL Manual (in info, pdf
+ Documentation consists of a man-page, the SBCL Manual (in info, pdf
and html formats), and a few additional text files.
2. SOURCE DISTRIBUTION
--- doc/manual/ffi.texinfo.~0~ Tue Sep 14 02:51:13 2004
+++ doc/manual/ffi.texinfo Wed Nov 24 18:01:32 2004
@@ -824,7 +824,7 @@
specifies an argument to the foreign function, and is
of the form
@lisp
-(aname atype &optional style)
+(aname atype &optional style)
@end lisp
@var{aname} is the symbol name of the argument to the constructed
@@ -1119,7 +1119,7 @@
printf("s = %s\n", s);
printf("r->x = %d\n", r->x);
printf("r->s = %s\n", r->s);
- for (j = 0; j < 10; j++) printf("a[%d] = %d.\n", j, a[j]);
+ for (j = 0; j < 10; j++) printf("a[%d] = %d.\n", j, a[j]);
r2 = (struct c_struct *) malloc (sizeof(struct c_struct));
r2->x = i + 5;
r2->s = "a C string";
@@ -1167,7 +1167,7 @@
(with-alien ((res (* (struct c-struct))
(c-function 5 "another Lisp string" (addr c-struct) ar)))
- (format t "~&back from C function~%")
+ (format t "~&back from C function~%")
(multiple-value-prog1
(values (slot res 'x)
(slot res 's))
Peace
--Devon
/~\
\ / Health Care
X not warfare
/ \
Kerry won the popular vote
Dubya won the digital vote
Date: Tue, 7 Dec 2004 16:31:03 +0200 (EET)
From: Nikodemus Siivola <tsiivola@...>
cc: sbcl-help@...
On Sun, 21 Nov 2004, Devon Sean McCullough wrote:
> FreeBSD SBCL test failed
> 4.10-RELEASE 0.8.12 smoke.impure.lisp
> 5.2-RELEASE 0.8.16 float.pure.lisp
>
> The newer SBCL distribution fails it's own self test sooner,
> a discouraging trend.
This is slightly OT, but to clarify: the tests are run in essentially
alphabetical order, so failing "sooner" doesn't really say anything. If a
test file fails you can delete it, and run the tests again to see if
anything else fails (yes, a more sophisticated harness would be nice --
patches welcome.)
Furthermore, the regression suite is constantly groving, so a "new"
failure most likely isn't one, just something the older regression suite
did not test for.
|