From ddc069c5be377d4cb08a9e7f8ed4d94b72e4bde9 Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Wed, 18 Mar 2020 10:30:45 +0100 Subject: [PATCH] test/openstack: Don't trigger errexit from within finish_test() If, e.g., the rpc call fails the remaining parts of the function won't be called, resulting in lingering processes tainting the testing environment. Avoid the above scenario by intercepting single es from the entire list. Change-Id: Ie591935a3d868a1efa2890d1bb14776b0bdb6620 Signed-off-by: Michal Berger Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1356 Tested-by: SPDK CI Jenkins Reviewed-by: Tomasz Zawadzki Reviewed-by: Darek Stojaczyk --- test/openstack/run_openstack_tests.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/openstack/run_openstack_tests.sh b/test/openstack/run_openstack_tests.sh index adf63314e..892bdb960 100755 --- a/test/openstack/run_openstack_tests.sh +++ b/test/openstack/run_openstack_tests.sh @@ -10,10 +10,12 @@ TEST_TRANSPORT='rdma' nvmftestinit function finish_test { - $rpc_py bdev_lvol_delete_lvstore -l lvs0 - kill -9 $rpc_proxy_pid - killprocess $nvmfpid - rm $testdir/conf.json + { + "$rpc_py" bdev_lvol_delete_lvstore -l lvs0 + kill -9 $rpc_proxy_pid + killprocess $nvmfpid + rm "$testdir/conf.json" + } || : } trap "finish_test" SIGINT SIGTERM EXIT