0.7.7.32:
authorWilliam Harold Newman <william.newman@airmail.net>
Thu, 19 Sep 2002 17:26:53 +0000 (17:26 +0000)
committerWilliam Harold Newman <william.newman@airmail.net>
Thu, 19 Sep 2002 17:26:53 +0000 (17:26 +0000)
added test case for can't-run-saved-.core bug

NEWS
src/code/defboot.lisp
tests/core.test.sh [new file with mode: 0644]
tests/run-tests.sh
version.lisp-expr

diff --git a/NEWS b/NEWS
index 254f4f5..d05cd03 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1273,8 +1273,8 @@ changes in sbcl-0.7.8 relative to sbcl-0.7.7:
   * fixed bug in compilation of functions as first class values
     (thanks to Antonio Martinez-Shotton)
   * The compiler's handling TYPE-ERRORs which it can prove will
-    inevitably happen at runtime has been cleaned up and corrected.
-    (thanks to Alexey Dejneka)
+    inevitably happen at runtime has been cleaned up and corrected
+    in several ways. (thanks to Alexey Dejneka)
 
 planned incompatible changes in 0.7.x:
 * When the profiling interface settles down, maybe in 0.7.x, maybe
index 53e1742..d9afbde 100644 (file)
 ;;; COND defined in terms of IF
 (defmacro-mundanely cond (&rest clauses)
   (if (endp clauses)
-    nil
-    (let ((clause (first clauses)))
-      (if (atom clause)
-       (error "Cond clause is not a list: ~S" clause)
-       (let ((test (first clause))
-             (forms (rest clause)))
-         (if (endp forms)
-           (let ((n-result (gensym)))
-             `(let ((,n-result ,test))
-                (if ,n-result
-                  ,n-result
-                  (cond ,@(rest clauses)))))
-           `(if ,test
-              (progn ,@forms)
-              (cond ,@(rest clauses)))))))))
+      nil
+      (let ((clause (first clauses)))
+       (if (atom clause)
+           (error "COND clause is not a list: ~S" clause)
+           (let ((test (first clause))
+                 (forms (rest clause)))
+             (if (endp forms)
+                 (let ((n-result (gensym)))
+                   `(let ((,n-result ,test))
+                      (if ,n-result
+                          ,n-result
+                          (cond ,@(rest clauses)))))
+                 `(if ,test
+                      (progn ,@forms)
+                      (cond ,@(rest clauses)))))))))
 
 ;;; other things defined in terms of COND
 (defmacro-mundanely when (test &body forms)
diff --git a/tests/core.test.sh b/tests/core.test.sh
new file mode 100644 (file)
index 0000000..2242470
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+# tests related to .core files
+
+# This software is part of the SBCL system. See the README file for
+# more information.
+#
+# While most of SBCL is derived from the CMU CL system, the test
+# files (like this one) were written from scratch after the fork
+# from CMU CL.
+# 
+# This software is in the public domain and is provided with
+# absolutely no warranty. See the COPYING and CREDITS files for
+# more information.
+
+tmpcore="core-test-sh-$$.core"
+rm -f $tmpcore
+
+# In sbcl-0.7.7 SAVE-LISP-AND-DIE didn't work at all because of
+# flakiness caused by consing/GC/purify twice-and-at-least-twice
+# mismatch grot.
+#
+# "serves yall right for fiddling with too much stuff"
+#   -- Eric Marsden, <http://tunes.org/~nef/logs/lisp/02.09.15>
+#
+# diagnosed and fixed by Dan Barlow in sbcl-0.7.7.29
+$SBCL <<EOF
+  (defun foo (x) (+ x 11))
+  (save-lisp-and-die "$tmpcore")
+EOF
+$SBCL_ALLOWING_CORE --core "$tmpcore" <<EOF
+  (quit :unix-status (foo 10))
+EOF
+if [ $? = 21 ]; then
+    echo "/Basic SAVE-LISP-AND-DIE worked, good."
+else
+    echo "failure in basic SAVE-LISP-AND-DIE: $?"
+    exit 1
+fi
+
+rm -f $tmpcore
+echo "/returning success from core.test.sh"
+exit 104
index df6d40e..541a24a 100644 (file)
 # pathname, but now we take care to bind it to an absolute pathname (still
 # generated relative to `pwd` in the tests/ directory) so that tests
 # can chdir before invoking SBCL and still work.
-SBCL="${1:-`pwd`/../src/runtime/sbcl --core `pwd`/../output/sbcl.core --noinform --sysinit /dev/null --userinit /dev/null --noprint --disable-debugger}"
+sbclstem=`pwd`/../src/runtime/sbcl
+SBCL="${1:-$sbclstem --core `pwd`/../output/sbcl.core --noinform --sysinit /dev/null --userinit /dev/null --noprint --disable-debugger}"
 export SBCL
 echo /running tests on SBCL=\'$SBCL\'
+# more or less like SBCL, but without enough grot removed that appending
+# a --core command line argument works
+SBCL_ALLOWING_CORE=${1:-$sbclstem}
+export SBCL_ALLOWING_CORE
+echo /with SBCL_ALLOWING_CORE=\'$SBCL_ALLOWING_CORE\'
 
 # "Ten four" is the closest numerical slang I can find to "OK", so
 # it's the Unix status value that we expect from a successful test.
index f923a5f..47cfeff 100644 (file)
@@ -18,4 +18,4 @@
 ;;; internal versions off the main CVS branch, it gets hairier, e.g.
 ;;; "0.pre7.14.flaky4.13".)
 
-"0.7.7.31"
+"0.7.7.32"