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.
11 echo //entering finalize.
test.sh
13 run_sbcl
<<EOF > /dev/null &
21 (let ((junk (mapcar (compile nil '(lambda (_)
24 (finalize x (lambda ()
26 (setf *tmp* (make-list 10000))
30 (setf junk (foo junk))
37 (with-open-file (f "finalize-test-passed" :direction :output)
39 (with-open-file (f "finalize-test-failed" :direction :output)
40 (format f "OOPS: ~A~%" *count*)))
48 echo "Waiting for SBCL to finish stress-testing finalizers"
50 if [ -f finalize-test-passed
]; then
52 rm finalize-test-passed
54 elif [ -f finalize-test-failed
]; then
56 rm finalize-test-failed
61 if [ $WAITED = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ]; then
63 echo "timeout, killing SBCL"
65 exit $EXIT_LOSE # Failure, SBCL probably hanging in GC