test/nvme: kill stub with -9 when a failure occurs

This ensures the stub gets killed so that we can
make forward progress on collecting a backtrace.

This requires adding an optional parameter to the
kill_stub function to specify a signal.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib46d07b6651c6f35382f38c97901def03f28289d

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452891
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
Jim Harris 2019-05-02 01:18:13 -07:00 committed by Darek Stojaczyk
parent bc49bbe232
commit ef6832ef56
2 changed files with 2 additions and 2 deletions

View File

@ -506,7 +506,7 @@ function start_stub() {
} }
function kill_stub() { function kill_stub() {
kill $stubpid kill $1 $stubpid
wait $stubpid wait $stubpid
rm -f /var/run/spdk_stub0 rm -f /var/run/spdk_stub0
# Re-enable ASLR now that we are done with multi-process testing # Re-enable ASLR now that we are done with multi-process testing

View File

@ -89,7 +89,7 @@ fi
if [ `uname` = Linux ]; then if [ `uname` = Linux ]; then
start_stub "-s 4096 -i 0 -m 0xF" start_stub "-s 4096 -i 0 -m 0xF"
trap "kill_stub; exit 1" SIGINT SIGTERM EXIT trap "kill_stub -9; exit 1" SIGINT SIGTERM EXIT
fi fi
if [ $RUN_NIGHTLY -eq 1 ]; then if [ $RUN_NIGHTLY -eq 1 ]; then