Improve Travis script to show multiple core dump stacks

This commit is contained in:
Jon Siwek 2018-11-02 09:36:30 -05:00
parent 3251792ddb
commit 802b4f876e
3 changed files with 14 additions and 10 deletions

View file

@ -1,4 +1,8 @@
2.6-beta2-65 | 2018-11-02 09:36:30 -0500
* Improve Travis script to show multiple core dump stacks (Jon Siwek, Corelight)
2.6-beta2-64 | 2018-11-02 08:56:59 -0500 2.6-beta2-64 | 2018-11-02 08:56:59 -0500
* Improve a weird stats unit test (Jon Siwek, Corelight) * Improve a weird stats unit test (Jon Siwek, Corelight)

View file

@ -1 +1 @@
2.6-beta2-64 2.6-beta2-65

View file

@ -254,20 +254,20 @@ run() {
echo "Result code after running tests: $ret" echo "Result code after running tests: $ret"
if [ $ret -ne 0 ]; then if [ $ret -ne 0 ]; then
COREDUMP_FIND=`find testing/btest/.tmp testing/external/*/.tmp -name core*` COREFILES=`find testing/btest/.tmp testing/external/*/.tmp -type f -name core*`
COREFILE=`find testing/btest/.tmp testing/external/*/.tmp -name core* | head -n 1`
echo echo
echo "Search for core dumps ##############################################" echo "Search for core dumps ##############################################"
echo echo
echo `pwd` echo $COREFILES
echo
echo $COREDUMP_FIND
if [ -f "$COREFILE" ]; then for cf in $COREFILES; do
echo "Getting stack trace from $COREFILE" echo
gdb build/src/bro -c "$COREFILE" -ex "thread apply all bt" -ex "set pagination 0" -batch; echo "############# Begin stack trace for $cf ###############"
fi gdb build/src/bro -c "$cf" -ex "thread apply all bt" -ex "set pagination 0" -batch;
echo "############# End stack trace for $cf #################"
echo
done
fi fi
# If we get here, then external tests were successful. # If we get here, then external tests were successful.