test: properly handle the killprocess case
To check whether the process already killed and if the process is not there, return error. This is to fix the below issue: https://github.com/spdk/spdk/issues/1066 Change-Id: I5f36213237a4b0eed8edbc69e666037cf17488b2 Signed-off-by: GangCao <gang.cao@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476127 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
f506cc42bd
commit
82f60376ae
@ -483,6 +483,10 @@ function killprocess() {
|
|||||||
# wait for the process regardless if its the dummy sudo one
|
# wait for the process regardless if its the dummy sudo one
|
||||||
# or the actual app - it should terminate anyway
|
# or the actual app - it should terminate anyway
|
||||||
wait $1
|
wait $1
|
||||||
|
else
|
||||||
|
# the process is not there anymore
|
||||||
|
echo "Process with pid $1 is not found"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,6 +75,7 @@ function nvmf_filesystem_part {
|
|||||||
trap - SIGINT SIGTERM EXIT
|
trap - SIGINT SIGTERM EXIT
|
||||||
|
|
||||||
killprocess $nvmfpid
|
killprocess $nvmfpid
|
||||||
|
nvmfpid=
|
||||||
}
|
}
|
||||||
|
|
||||||
run_test "suite" "nvmf_filesystem_no_incapsule" nvmf_filesystem_part 0
|
run_test "suite" "nvmf_filesystem_no_incapsule" nvmf_filesystem_part 0
|
||||||
|
@ -38,5 +38,6 @@ trap - SIGINT SIGTERM EXIT
|
|||||||
|
|
||||||
nvmfcleanup
|
nvmfcleanup
|
||||||
killprocess $nvmfpid
|
killprocess $nvmfpid
|
||||||
|
nvmfpid=
|
||||||
|
|
||||||
nvmftestfini
|
nvmftestfini
|
||||||
|
@ -87,6 +87,7 @@ function nvmf_shutdown_tc3 {
|
|||||||
|
|
||||||
# Kill the target half way through
|
# Kill the target half way through
|
||||||
killprocess $nvmfpid
|
killprocess $nvmfpid
|
||||||
|
nvmfpid=
|
||||||
|
|
||||||
# Verify bdevperf exits successfully
|
# Verify bdevperf exits successfully
|
||||||
sleep 1
|
sleep 1
|
||||||
|
Loading…
Reference in New Issue
Block a user