Commit b76cb37c authored by Michal Berger's avatar Michal Berger Committed by Konrad Sztyber
Browse files

test/nvmf: Fix trap



Also, add at_app_exit() to make sure that all vhost and qemu
instances are terminated as well.

Signed-off-by: default avatarMichal Berger <michal.berger@intel.com>
Change-Id: I917f1cb1b02d18b78a482d754a19f509e580fc98
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15185


Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarPawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent 6a86385d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ mkdir -p "$(get_vhost_dir 3)"
vhostpid=$!
waitforlisten $vhostpid $NVMF_SOCK

trap 'process_shm --id $NVMF_APP_SHM_ID; killprocess $vhostpid nvmftestfini; exit 1' SIGINT SIGTERM EXIT
trap 'process_shm --id $NVMF_APP_SHM_ID; nvmftestfini; at_app_exit; exit 1' SIGINT SIGTERM EXIT

# Configure NVMF tgt on host machine
malloc_bdev="$($NVMF_RPC bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE)"