diff --git a/test/nvmf/common.sh b/test/nvmf/common.sh index e30b8bd63..22ac9bf53 100755 --- a/test/nvmf/common.sh +++ b/test/nvmf/common.sh @@ -5,13 +5,8 @@ NVMF_IP_PREFIX="192.168.100" NVMF_IP_LEAST_ADDR=8 NVMF_TCP_IP_ADDRESS="127.0.0.1" -if [ -z "$NVMF_APP" ]; then - NVMF_APP=./app/nvmf_tgt/nvmf_tgt -fi - -if [ -z "$NVMF_TEST_CORE_MASK" ]; then - NVMF_TEST_CORE_MASK=0xFF -fi +: ${NVMF_APP_SHM_ID="0"}; export NVMF_APP_SHM_ID +: ${NVMF_APP="./app/nvmf_tgt/nvmf_tgt -i $NVMF_APP_SHM_ID -e 0xFFFF"}; export NVMF_APP function load_ib_rdma_modules() { diff --git a/test/nvmf/host/perf.sh b/test/nvmf/host/perf.sh index ee05af3e9..32202f0ab 100755 --- a/test/nvmf/host/perf.sh +++ b/test/nvmf/host/perf.sh @@ -24,7 +24,7 @@ fi timing_enter perf timing_enter start_nvmf_tgt -$NVMF_APP -m 0xF -i 0 & +$NVMF_APP -m 0xF & nvmfpid=$! trap "process_shm --id $NVMF_APP_SHM_ID; killprocess $nvmfpid; exit 1" SIGINT SIGTERM EXIT @@ -53,7 +53,7 @@ function test_perf() # Test multi-process access to local NVMe device if [ -n "$local_nvme_trid" ]; then - $rootdir/examples/nvme/perf/perf -i 0 -q 32 -o 4096 -w randrw -M 50 -t 1 -r "$local_nvme_trid" + $rootdir/examples/nvme/perf/perf -i $NVMF_APP_SHM_ID -q 32 -o 4096 -w randrw -M 50 -t 1 -r "$local_nvme_trid" fi $rootdir/examples/nvme/perf/perf -q 32 -o 4096 -w randrw -M 50 -t 1 -r "trtype:$TYPE adrfam:IPv4 traddr:$NVMF_TARGET_IP trsvcid:4420" diff --git a/test/nvmf/nvmf.sh b/test/nvmf/nvmf.sh index 700557775..386c78f8d 100755 --- a/test/nvmf/nvmf.sh +++ b/test/nvmf/nvmf.sh @@ -11,18 +11,7 @@ source $rootdir/test/nvmf/common.sh timing_enter nvmf_tgt -# NVMF_TEST_CORE_MASK is the biggest core mask specified by -# any of the nvmf_tgt tests. Using this mask for the stub -# ensures that if this mask spans CPU sockets, that we will -# allocate memory from both sockets. The stub will *not* -# run anything on the extra cores (and will sleep on master -# core 0) so there is no impact to the nvmf_tgt tests by -# specifying the bigger core mask. -start_stub "-s 2048 -i 0 -m $NVMF_TEST_CORE_MASK" -trap "kill_stub; exit 1" SIGINT SIGTERM EXIT - -export NVMF_APP_SHM_ID="0" -export NVMF_APP="./app/nvmf_tgt/nvmf_tgt -i $NVMF_APP_SHM_ID -e 0xFFFF" +trap "exit 1" SIGINT SIGTERM EXIT run_test suite test/nvmf/filesystem/filesystem.sh run_test suite test/nvmf/discovery/discovery.sh @@ -52,7 +41,6 @@ run_test suite test/nvmf/nmic/nmic.sh timing_exit host trap - SIGINT SIGTERM EXIT -kill_stub # TODO: enable nvme device detachment for multi-process so that # we can use the stub for this test diff --git a/test/nvmf/shutdown/shutdown.sh b/test/nvmf/shutdown/shutdown.sh index 0fa468abb..7d4a92af1 100755 --- a/test/nvmf/shutdown/shutdown.sh +++ b/test/nvmf/shutdown/shutdown.sh @@ -80,7 +80,7 @@ kill -0 $pid # Test 2: Kill the target unexpectedly # Run bdevperf -$rootdir/test/bdev/bdevperf/bdevperf -r /var/tmp/bdevperf.sock -i 0 -c $testdir/bdevperf.conf -q 64 -o 65536 -w verify -t 10 & +$rootdir/test/bdev/bdevperf/bdevperf -r /var/tmp/bdevperf.sock -c $testdir/bdevperf.conf -q 64 -o 65536 -w verify -t 10 & perfpid=$! waitforlisten $perfpid /var/tmp/bdevperf.sock $rpc_py -s /var/tmp/bdevperf.sock wait_subsystem_init