diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index a4c82b742..7f674eaf0 100755 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -439,6 +439,9 @@ function run_test() { } function print_backtrace() { + # if errexit is not enabled, don't print a backtrace + [[ "$-" =~ e ]] || return 0 + local shell_options="$-" set +x echo "========== Backtrace start: =========="