From 61b44c9fcd6485deb24d5791df04cfac550699ff Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Mon, 3 Jun 2019 09:37:06 -0700 Subject: [PATCH] test/nvmf: update nvmf_vhost test This script was developed in parallel to some of the script infrastructure improvements. So fix it up to match the more recent changes - including leveraging the common setup of the NVMF_FIRST_TARGET_IP, and removing the parameters to nvmftestinit/nvmftestfini. Signed-off-by: Jim Harris Change-Id: I6cc4ef30325961822014e2835e575a950c53ecc0 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456665 Tested-by: SPDK CI Jenkins Reviewed-by: Seth Howell Reviewed-by: Darek Stojaczyk Reviewed-by: Ben Walker --- test/nvmf/target/nvmf_vhost.sh | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/test/nvmf/target/nvmf_vhost.sh b/test/nvmf/target/nvmf_vhost.sh index 16c5a2e60..475fc770f 100755 --- a/test/nvmf/target/nvmf_vhost.sh +++ b/test/nvmf/target/nvmf_vhost.sh @@ -22,22 +22,15 @@ if [ ! -d $QEMU_PREFIX ]; then exit 0 fi -nvmftestinit $1 - -RDMA_IP_LIST=$(get_available_rdma_ips) -NVMF_FIRST_TARGET_IP=$(echo "$RDMA_IP_LIST" | head -n 1) -if [ -z $NVMF_FIRST_TARGET_IP ]; then - echo "no NIC for nvmf test" - exit 0 -fi - timing_enter nvmf_vhost +nvmftestinit + # Start Apps $NVMF_APP -r $NVMF_SOCK & nvmfpid=$! waitforlisten $nvmfpid $NVMF_SOCK -trap "process_shm --id $NVMF_APP_SHM_ID; killprocess $nvmfpid; nvmftestfini $1; exit 1" SIGINT SIGTERM EXIT +trap "process_shm --id $NVMF_APP_SHM_ID; nvmftestfini; exit 1" SIGINT SIGTERM EXIT mkdir -p "$(get_vhost_dir 3)" @@ -45,7 +38,7 @@ $VHOST_APP -S "$(get_vhost_dir 3)" & vhostpid=$! waitforlisten $vhostpid $NVMF_SOCK -trap "process_shm --id $NVMF_APP_SHM_ID; killprocess $nvmfpid; killprocess $vhostpid nvmftestfini $1; exit 1" SIGINT SIGTERM EXIT +trap "process_shm --id $NVMF_APP_SHM_ID; killprocess $vhostpid nvmftestfini; exit 1" SIGINT SIGTERM EXIT # Configure NVMF tgt on host machine malloc_bdev="$($NVMF_RPC construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE)" @@ -76,6 +69,5 @@ trap - SIGINT SIGTERM EXIT nvmfcleanup killprocess $vhostpid -killprocess $nvmfpid -nvmftestfini $1 +nvmftestfini timing_exit nvmf_vhost