Dump the backtrace to stdout when core is found in systest directory
This commit is contained in:
1
bin/tests/system/run.gdb
Normal file
1
bin/tests/system/run.gdb
Normal file
@@ -0,0 +1 @@
|
||||
thread apply all bt full
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user