test/common: make gdb_attach global

Change-Id: Ib73bd9513681360f22251b54a2d15ca9807b72c2
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478807
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Tomasz Kulasek 2019-12-24 06:36:40 -05:00 committed by Tomasz Zawadzki
parent b27f6f9d80
commit 327668c8c9
2 changed files with 18 additions and 18 deletions

View File

@ -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;

View File

@ -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