From: Ondřej Surý Date: Mon, 18 Nov 2019 15:17:37 +0000 (+0800) Subject: Dump the backtrace to stdout when core is found in systest directory X-Git-Tag: v9.17.0~4^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=512dadc8d10151530ca94b10e8fb9ee7170a036f;p=thirdparty%2Fbind9.git Dump the backtrace to stdout when core is found in systest directory --- diff --git a/bin/tests/system/run.gdb b/bin/tests/system/run.gdb new file mode 100644 index 00000000000..60981e1e9b8 --- /dev/null +++ b/bin/tests/system/run.gdb @@ -0,0 +1 @@ +thread apply all bt full diff --git a/bin/tests/system/run.sh b/bin/tests/system/run.sh index 4344b4412e5..7eada691a16 100755 --- a/bin/tests/system/run.sh +++ b/bin/tests/system/run.sh @@ -195,6 +195,18 @@ else echoinfo "I:$systest:Test claims success despite crashes: $core_dumps" echofail "R:$systest:FAIL" # Do not clean up - we need the evidence. + find "$systest/" -name 'core*' | while read -r coredump; do + SYSTESTDIR="$systest" + echoinfo "D:$systest:backtrace from $coredump start" + binary=$(gdb --batch --core="$coredump" | sed -ne "s/Core was generated by \`//;s/ .*'.$//p;") + "$TOP/libtool" --mode=execute gdb \ + --batch \ + --command=run.gdb \ + --core="$coredump" \ + -- \ + "$binary" + echoinfo "D:$systest:backtrace from $coredump end" + done elif [ $assertion_failures -ne 0 ]; then echoinfo "I:$systest:Test claims success despite $assertion_failures assertion failure(s)" echofail "R:$systest:FAIL" diff --git a/util/copyrights b/util/copyrights index f517500290f..9369dabb740 100644 --- a/util/copyrights +++ b/util/copyrights @@ -1002,6 +1002,7 @@ ./bin/tests/system/rsabigexponent/prereq.sh SH 2012,2014,2016,2017,2018,2019 ./bin/tests/system/rsabigexponent/setup.sh SH 2012,2014,2016,2017,2018,2019 ./bin/tests/system/rsabigexponent/tests.sh SH 2012,2016,2018,2019 +./bin/tests/system/run.gdb X 2019 ./bin/tests/system/run.sh SH 2000,2001,2004,2007,2010,2012,2014,2015,2016,2017,2018,2019 ./bin/tests/system/runall.sh SH 2000,2001,2004,2007,2010,2011,2012,2014,2015,2016,2018,2019 ./bin/tests/system/runsequential.sh SH 2018,2019