Commit 1599301b authored by Tomasz Zawadzki's avatar Tomasz Zawadzki Committed by Darek Stojaczyk
Browse files

test/blockdev: add trap for bdev_svc process



There was a gap where nbd tests could fail, but without
trap set the app would still be present.

When here removed trap from end of the script since,
no part of the script set it up.

Change-Id: I0c435c7cd603410c2cd7a034bf955ab424e413f0
Signed-off-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457615


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent e3d21c77
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ function nbd_function_test() {
		modprobe nbd
		$rootdir/test/app/bdev_svc/bdev_svc -r $rpc_server -i 0 -c ${conf} &
		nbd_pid=$!
		trap "killprocess $nbd_pid; exit 1" SIGINT SIGTERM EXIT
		echo "Process nbd pid: $nbd_pid"
		waitforlisten $nbd_pid $rpc_server

@@ -46,6 +47,7 @@ function nbd_function_test() {
		$rpc_py -s $rpc_server delete_passthru_bdev TestPT

		killprocess $nbd_pid
		trap - SIGINT SIGTERM EXIT
	fi

	return 0
@@ -174,7 +176,6 @@ fi
rm -f /tmp/aiofile
rm -f /tmp/spdk-pmem-pool
rm -f $testdir/bdev.conf
trap - SIGINT SIGTERM EXIT
rbd_cleanup
report_test_completion "bdev"
timing_exit bdev