Skip to content

Commit

Permalink
libtest.sh: Add gdb_bt helper
Browse files Browse the repository at this point in the history
This is unused, but can be inserted in the tests if something is
segfaulting so that you can see the backtrace.
  • Loading branch information
alexlarsson committed Oct 16, 2019
1 parent caaeb53 commit 785d446
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/libtest.sh
Expand Up @@ -444,6 +444,10 @@ if ! /bin/kill -0 "$DBUS_SESSION_BUS_PID"; then
assert_not_reached "Failed to start dbus-daemon"
fi

gdb_bt () {
gdb -batch -ex "run" -ex "thread apply all bt" -ex "quit 1" --args "$@"
}

cleanup () {
/bin/kill -9 $DBUS_SESSION_BUS_PID
gpg-connect-agent --homedir "${FL_GPG_HOMEDIR}" killagent /bye || true
Expand Down

0 comments on commit 785d446

Please sign in to comment.