mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
So that a backtrace goes to an appropriate OS channel when a script trips a lose() scenario. The LDB command continues to write to stdout. lisp_backtrace() and backtrace_from_fp() retain their existing signatures & write-to-stdout behavior, since people might call them from external debuggers. (But rename log_backtrace_from_fp() to print_backtrace_from_fp(), for similarity with other printing routines in LDB.)
37 lines
1.2 KiB
Bash
37 lines
1.2 KiB
Bash
#!/bin/sh
|
|
|
|
# tests related to miscellaneous runtime option behavior.
|
|
|
|
# This software is part of the SBCL system. See the README file for
|
|
# more information.
|
|
#
|
|
# While most of SBCL is derived from the CMU CL system, the test
|
|
# files (like this one) were written from scratch after the fork
|
|
# from CMU CL.
|
|
#
|
|
# This software is in the public domain and is provided with
|
|
# absolutely no warranty. See the COPYING and CREDITS files for
|
|
# more information.
|
|
|
|
. ./subr.sh
|
|
|
|
use_test_subdirectory
|
|
|
|
tmpout=$TEST_FILESTEM.lisp-out
|
|
tmperr=$TEST_FILESTEM.lisp-err
|
|
|
|
# Test that under --lose-on-corruption and --disable-ldb, in case of
|
|
# corruption, (a) the process exits non-zero, (b) all
|
|
# lose-on-corruption diagnostics go to stderr, and (c) not stdout.
|
|
run_sbcl --noinform --lose-on-corruption --disable-ldb --eval '(labels ((foo () (list (foo)))) (foo))' >$tmpout 2>$tmperr
|
|
# default_lossage_handler() calls exit(1).
|
|
check_status_maybe_lose "--script exit after corruption" $? 1 "(ok)"
|
|
[ -s $tmperr ]
|
|
check_status_maybe_lose "--script corruption lossage to stderr" $? 0 "(ok)"
|
|
[ -s $tmpout ]
|
|
check_status_maybe_lose "--script corruption lossage not to stdout" $? 1 "(ok)"
|
|
|
|
rm -f $tmpout $tmperr
|
|
|
|
exit $EXIT_TEST_WIN
|