3 # This test is as convoluted as it is to avoid having failing tests
4 # hang the test-suite, as the typical failure mode used to be SBCL
5 # hanging uninterruptible in GC.
7 echo //entering finalize.
test.sh
9 rm -f finalize-test-passed finalize-test-failed
11 ${SBCL:-sbcl} <<EOF > /dev/null &
19 (let ((junk (mapcar (compile nil '(lambda (_)
22 (finalize x (lambda ()
24 (setf *tmp* (make-list 10000))
28 (setf junk (foo junk))
35 (with-open-file (f "finalize-test-passed" :direction :output)
37 (with-open-file (f "finalize-test-failed" :direction :output)
38 (format f "OOPS: ~A~%" *count*)))
46 echo "Waiting for SBCL to finish stress-testing finalizers"
48 if [ -f finalize-test-passed
]; then
50 rm finalize-test-passed
52 elif [ -f finalize-test-failed
]; then
54 rm finalize-test-failed
59 if [ $WAITED = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ]; then
61 echo "timeout, killing SBCL"
63 exit 1 # Failure, SBCL probably hanging in GC