test/nvmf: add || true to kill commands.

In the RDMA transport, the initiator doesn't properly pick up the lost
connection and we have to kill it. However for TCP, the initiator
realizes the closed socket and fails out. Then when we go to kill it, it
fails the test. So add and || true when killing the perf processes.

Change-Id: Ifed5d726946bad2e9396db40b40f1fee72b4597f
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461993
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Seth Howell 2019-07-15 19:14:26 -07:00 committed by Changpeng Liu
parent ecb4ea90ce
commit 4edb785f49

View File

@ -76,7 +76,7 @@ waitforlisten $perfpid /var/tmp/bdevperf.sock
$rpc_py -s /var/tmp/bdevperf.sock wait_subsystem_init $rpc_py -s /var/tmp/bdevperf.sock wait_subsystem_init
# Kill bdev_svc # Kill bdev_svc
kill -9 $perfpid kill -9 $perfpid || true
rm -f /var/run/spdk_bdev1 rm -f /var/run/spdk_bdev1
# Verify the target stays up # Verify the target stays up
@ -116,7 +116,7 @@ waitforlisten $perfpid /var/tmp/bdevperf.sock
$rpc_py -s /var/tmp/bdevperf.sock wait_subsystem_init $rpc_py -s /var/tmp/bdevperf.sock wait_subsystem_init
# Expand the trap to clean up bdevperf if something goes wrong # Expand the trap to clean up bdevperf if something goes wrong
trap "process_shm --id $NVMF_APP_SHM_ID; kill -9 $perfpid; nvmftestfini; exit 1" SIGINT SIGTERM EXIT trap "process_shm --id $NVMF_APP_SHM_ID; kill -9 $perfpid || true; nvmftestfini; exit 1" SIGINT SIGTERM EXIT
waitforio /var/tmp/bdevperf.sock Nvme1n1 waitforio /var/tmp/bdevperf.sock Nvme1n1
@ -127,7 +127,7 @@ killprocess $nvmfpid
sleep 1 sleep 1
# TODO: Right now the NVMe-oF initiator will not correctly detect broken connections # TODO: Right now the NVMe-oF initiator will not correctly detect broken connections
# and so it will never shut down. Just kill it. # and so it will never shut down. Just kill it.
kill -9 $perfpid kill -9 $perfpid || true
timing_exit test3 timing_exit test3
rm -f ./local-job0-0-verify.state rm -f ./local-job0-0-verify.state