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 # $! is not set correctly when calling run_sbcl, do it directly
14 "$SBCL_RUNTIME" --core "$SBCL_CORE" $SBCL_ARGS <<EOF > /dev/null &
22 (let ((junk (mapcar (compile nil '(lambda (_)
25 (finalize x (lambda ()
27 (setf *tmp* (make-list 10000))
31 (setf junk (foo junk))
38 (with-open-file (f "finalize-test-passed" :direction :output)
40 (with-open-file (f "finalize-test-failed" :direction :output)
41 (format f "OOPS: ~A~%" *count*)))
49 echo "Waiting for SBCL to finish stress-testing finalizers"
51 if [ -f finalize-test-passed ]; then
53 rm finalize-test-passed
55 elif [ -f finalize-test-failed ]; then
57 rm finalize-test-failed
62 if [ $WAITED = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ]; then
64 echo "timeout, killing SBCL"
66 exit $EXIT_LOSE # Failure, SBCL probably hanging in GC