sbcl.sbcl/tests/save4.test.sh
Douglas Katzman ea0e1f96e1 Use /tmp more in shell tests
Anything that invokes 'use_test_subdirectory' should go to /tmp, not just
a few scripts that overrode TEST_BASEDIR. After this there are approximately
6 files that will fail if pwd isn't writable. Most involve run-compiler.sh
and also filesys tests. Plus there's a hack in run-sbcl.sh without which
it would already fail when writing into /tmp.
2022-10-07 13:54:25 -04:00

21 lines
521 B
Bash

. ./subr.sh
use_test_subdirectory
tmpcore=$TEST_FILESTEM.core
# test for lp#1983248 - gc_close_region on an unopen region
run_sbcl <<EOF
(defparameter *keepme* (make-array 15500 :fill-pointer 0))
(let ((s (find-symbol "*COMPILE-TO-MEMORY-SPACE*" "SB-C")))
(when s
(set s :immobile)
(dotimes (i (array-dimension *keepme* 0))
(vector-push-extend (compile nil \`(lambda () ,i)) *keepme*))))
(save-lisp-and-die "$tmpcore")
EOF
check_status_maybe_lose "LOTS-OF-CODE" $? 0 "(saved OK)"
exit $EXIT_TEST_WIN