From 9c9709b9b1bf810a7160f7cd26397af886742048 Mon Sep 17 00:00:00 2001 From: Tomasz Kulasek Date: Mon, 10 Jun 2019 12:23:02 +0200 Subject: [PATCH] test/iscsi_tgt: run vpp with gdb Change-Id: Ibffdc0d198451d7ef891b4062205c5e0eaf79bee Signed-off-by: Tomasz Kulasek Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457471 Reviewed-by: Tomasz Zawadzki Reviewed-by: Shuhei Matsumoto Reviewed-by: Darek Stojaczyk Reviewed-by: Ben Walker Tested-by: SPDK CI Jenkins --- test/iscsi_tgt/common.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/iscsi_tgt/common.sh b/test/iscsi_tgt/common.sh index f64e24a99..32a574b1e 100644 --- a/test/iscsi_tgt/common.sh +++ b/test/iscsi_tgt/common.sh @@ -102,6 +102,24 @@ 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 @@ -125,6 +143,8 @@ function start_vpp() { vpp_pid=$! echo "VPP Process pid: $vpp_pid" + gdb_attach $vpp_pid & + # Wait until VPP starts responding xtrace_disable counter=40