From ce37c9e65fb038c0a1f5d1350a9d0d2c4d6ac681 Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Thu, 19 Jan 2023 10:29:36 +0100 Subject: [PATCH] test/nvmf: Verify perf's exit status Since the perf application is run in the background the script would not pick up its potential crash - the main condition itself was simply checking if app is still running. Since there were occasions where the failure was missed up until the cleanup stage, try to catch it early on by verifying perf's exit status - hook it into NOT() as the app is expected to fail by the test but we need to filter out crash scenarios. Signed-off-by: Michal Berger Change-Id: I9a9304616c0a4dba42467f65c1a2c770352f08ea Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16345 Tested-by: SPDK CI Jenkins Reviewed-by: Konrad Sztyber Reviewed-by: Aleksey Marchuk --- test/nvmf/target/delete_subsystem.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/nvmf/target/delete_subsystem.sh b/test/nvmf/target/delete_subsystem.sh index 20edd697f..a67f6ad03 100755 --- a/test/nvmf/target/delete_subsystem.sh +++ b/test/nvmf/target/delete_subsystem.sh @@ -41,6 +41,9 @@ while kill -0 $perf_pid; do fi done +# Verify perf's exit status to make sure we catch a potential crash +NOT wait "$perf_pid" + #check that traffic goes when a new subsystem is created $rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 -m 10 $rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT @@ -60,6 +63,9 @@ while kill -0 $perf_pid; do fi done +# Verify perf's exit status to make sure we catch a potential crash +wait "$perf_pid" + trap - SIGINT SIGTERM EXIT nvmftestfini