diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index 0fa2fe557..af62c0326 100644 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -337,6 +337,24 @@ function create_test_list() { sed 's/\"//g' | sort > $output_dir/all_tests.txt || true } +function gdb_attach() { + gdb -q --batch \ + -ex 'handle SIGHUP nostop pass' \ + -ex 'handle SIGQUIT nostop pass' \ + -ex 'handle SIGPIPE nostop pass' \ + -ex 'handle SIGALRM nostop pass' \ + -ex 'handle SIGTERM nostop pass' \ + -ex 'handle SIGUSR1 nostop pass' \ + -ex 'handle SIGUSR2 nostop pass' \ + -ex 'handle SIGCHLD nostop pass' \ + -ex 'set print thread-events off' \ + -ex 'cont' \ + -ex 'thread apply all bt' \ + -ex 'quit' \ + --tty=/dev/stdout \ + -p $1 +} + function process_core() { ret=0 while IFS= read -r -d '' core; diff --git a/test/iscsi_tgt/common.sh b/test/iscsi_tgt/common.sh index d1c2c95d3..36b7d1bdd 100644 --- a/test/iscsi_tgt/common.sh +++ b/test/iscsi_tgt/common.sh @@ -102,24 +102,6 @@ function iscsitestfini() { fi } -function gdb_attach() { - gdb -q --batch \ - -ex 'handle SIGHUP nostop pass' \ - -ex 'handle SIGQUIT nostop pass' \ - -ex 'handle SIGPIPE nostop pass' \ - -ex 'handle SIGALRM nostop pass' \ - -ex 'handle SIGTERM nostop pass' \ - -ex 'handle SIGUSR1 nostop pass' \ - -ex 'handle SIGUSR2 nostop pass' \ - -ex 'handle SIGCHLD nostop pass' \ - -ex 'set print thread-events off' \ - -ex 'cont' \ - -ex 'thread apply all bt' \ - -ex 'quit' \ - --tty=/dev/stdout \ - -p $1 -} - function start_vpp() { # We need to make sure that posix side doesn't send jumbo packets while # for VPP side maximal size of MTU for TCP is 1460 and tests doesn't work