From 4edb785f49869cba92bde637bdf6534d6fd7f530 Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Mon, 15 Jul 2019 19:14:26 -0700 Subject: [PATCH] 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 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461993 Tested-by: SPDK CI Jenkins Reviewed-by: Darek Stojaczyk Reviewed-by: Shuhei Matsumoto --- test/nvmf/target/shutdown.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/nvmf/target/shutdown.sh b/test/nvmf/target/shutdown.sh index cf062e8b3..6faa02e9f 100755 --- a/test/nvmf/target/shutdown.sh +++ b/test/nvmf/target/shutdown.sh @@ -76,7 +76,7 @@ waitforlisten $perfpid /var/tmp/bdevperf.sock $rpc_py -s /var/tmp/bdevperf.sock wait_subsystem_init # Kill bdev_svc -kill -9 $perfpid +kill -9 $perfpid || true rm -f /var/run/spdk_bdev1 # 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 # 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 @@ -127,7 +127,7 @@ killprocess $nvmfpid sleep 1 # TODO: Right now the NVMe-oF initiator will not correctly detect broken connections # and so it will never shut down. Just kill it. -kill -9 $perfpid +kill -9 $perfpid || true timing_exit test3 rm -f ./local-job0-0-verify.state