-$SBCL_ALLOWING_CORE --core "$tmpcore" \
---userinit /dev/null --sysinit /dev/null <<EOF
- (quit :unix-status (foo 10))
+run_sbcl_with_core "$tmpcore" --no-userinit --no-sysinit <<EOF
+ (exit :code (foo 10))
+EOF
+check_status_maybe_lose "Basic SAVE-LISP-AND-DIE" $? 21 "(saved core ran)"
+
+# In sbcl-0.9.8 saving cores with callbacks didn't work on gencgc platforms
+run_sbcl <<EOF
+ (defun bar ()
+ (format t "~&Callbacks not supported, skipping~%")
+ (exit :code 42))
+ #+alien-callbacks
+ (progn
+ (sb-alien::define-alien-callback foo int () 42)
+ (defun bar () (exit :code (alien-funcall foo))))
+ (save-lisp-and-die "$tmpcore")
+EOF
+run_sbcl_with_core "$tmpcore" --no-userinit --no-sysinit <<EOF
+ (bar)
+EOF
+check_status_maybe_lose "Callbacks after SAVE-LISP-AND-DIE" $? \
+ 42 "(callback function ran)"
+
+# test suppression of banner in executable cores
+run_sbcl <<EOF
+ (save-lisp-and-die "$tmpcore" :executable t)