test/nvmf: call killprocess only when nvmfpid exists

In nvmftestfini we try to kill the nvmf application, but this doesn't
get set by nvmftestinit. I think that nvmftestfini and nvmftestinit
should be symmetric options, or at the very least, one should be able to
call fini right after calling init without fini failing.

Change-Id: I14f274f940ec20c2d5f8d831fed3f6d6c4c6d2ca
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476687
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>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
This commit is contained in:
Seth Howell 2019-12-03 13:14:20 -07:00 committed by Tomasz Zawadzki
parent 5bd76a1098
commit 15fd9afbad

View File

@ -214,7 +214,9 @@ function nvmfappstart()
function nvmftestfini() function nvmftestfini()
{ {
nvmfcleanup nvmfcleanup
if [ -n "$nvmfpid" ]; then
killprocess $nvmfpid killprocess $nvmfpid
fi
if [ "$TEST_MODE" == "iso" ]; then if [ "$TEST_MODE" == "iso" ]; then
$rootdir/scripts/setup.sh reset $rootdir/scripts/setup.sh reset
if [ "$TEST_TRANSPORT" == "rdma" ]; then if [ "$TEST_TRANSPORT" == "rdma" ]; then