]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Dump the backtrace to stdout when core is found in systest directory
authorOndřej Surý <ondrej@sury.org>
Mon, 18 Nov 2019 15:17:37 +0000 (23:17 +0800)
committerMichał Kępień <michal@isc.org>
Tue, 7 Jan 2020 13:42:06 +0000 (14:42 +0100)
(cherry picked from commit 512dadc8d10151530ca94b10e8fb9ee7170a036f)

bin/tests/system/run.gdb [new file with mode: 0644]
bin/tests/system/run.sh
util/copyrights

diff --git a/bin/tests/system/run.gdb b/bin/tests/system/run.gdb
new file mode 100644 (file)
index 0000000..60981e1
--- /dev/null
@@ -0,0 +1 @@
+thread apply all bt full
index a05caa01d4c90a114c737d3fe510cc9e89d61f48..9c546d1b8e320f1a2b4a4828009c94aa771443d4 100755 (executable)
@@ -200,6 +200,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"
index cc13628f7d1836421dc0f3c885aef85ff8bc4291..df6a62a1a70eaed2fcecd802f138481c471ad24c 100644 (file)
 ./bin/tests/system/rsabigexponent/prereq.sh    SH      2012,2014,2016,2017,2018,2019,2020
 ./bin/tests/system/rsabigexponent/setup.sh     SH      2012,2014,2016,2017,2018,2019,2020
 ./bin/tests/system/rsabigexponent/tests.sh     SH      2012,2016,2018,2019,2020
+./bin/tests/system/run.gdb                     X       2019,2020
 ./bin/tests/system/run.sh                      SH      2000,2001,2004,2007,2010,2012,2014,2015,2016,2017,2018,2019,2020
 ./bin/tests/system/runall.sh                   SH      2000,2001,2004,2007,2010,2011,2012,2014,2015,2016,2018,2019,2020
 ./bin/tests/system/runsequential.sh            SH      2018,2019,2020