From 79e48eb771f77a7d583d1e8c22e70d35b2ffd152 Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Thu, 18 Oct 2018 15:22:58 -0700 Subject: [PATCH] test/nvmf: Delete unneeded references to start_subsystem_init nvmf_create_transport can be run both before and after the subsystems have been initialized. Therefore, we don't need the --wait-for-rpc argument in most cases. This eliminates the need for calling start_subsystem_init. Change-Id: I35560fb968159b4796b1022b1de9cca4dfc5feeb Signed-off-by: Seth Howell Reviewed-on: https://review.gerrithub.io/429983 Chandler-Test-Pool: SPDK Automated Test System Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- test/nvmf/create_transport/create_transport.sh | 3 +-- test/nvmf/discovery/discovery.sh | 3 +-- test/nvmf/filesystem/filesystem.sh | 3 +-- test/nvmf/fio/fio.sh | 3 +-- test/nvmf/host/aer.sh | 3 +-- test/nvmf/host/bdevperf.sh | 3 +-- test/nvmf/host/fio.sh | 3 +-- test/nvmf/host/identify.sh | 3 +-- test/nvmf/host/perf.sh | 3 +-- test/nvmf/lvol/nvmf_lvol.sh | 3 +-- test/nvmf/multiconnection/multiconnection.sh | 3 +-- test/nvmf/nmic/nmic.sh | 3 +-- test/nvmf/nvme_cli/nvme_cli.sh | 3 +-- test/nvmf/rpc/rpc.sh | 3 +-- test/nvmf/shutdown/shutdown.sh | 3 +-- 15 files changed, 15 insertions(+), 30 deletions(-) diff --git a/test/nvmf/create_transport/create_transport.sh b/test/nvmf/create_transport/create_transport.sh index e746456d5..3514dbc10 100755 --- a/test/nvmf/create_transport/create_transport.sh +++ b/test/nvmf/create_transport/create_transport.sh @@ -31,13 +31,12 @@ fi timing_enter cr_trprt timing_enter start_nvmf_tgt # Start up the NVMf target in another process -$NVMF_APP -m 0xF --wait-for-rpc & +$NVMF_APP -m 0xF & nvmfpid=$! trap "killprocess $nvmfpid; nvmftestfini $1; exit 1" SIGINT SIGTERM EXIT waitforlisten $nvmfpid -$rpc_py start_subsystem_init # Use nvmf_create_transport call to create transport $rpc_py nvmf_create_transport -t RDMA -u 8192 -p 4 timing_exit start_nvmf_tgt diff --git a/test/nvmf/discovery/discovery.sh b/test/nvmf/discovery/discovery.sh index c68ac432e..f0db8ab36 100755 --- a/test/nvmf/discovery/discovery.sh +++ b/test/nvmf/discovery/discovery.sh @@ -31,13 +31,12 @@ fi timing_enter discovery timing_enter start_nvmf_tgt # Start up the NVMf target in another process -$NVMF_APP -m 0xF --wait-for-rpc & +$NVMF_APP -m 0xF & nvmfpid=$! trap "process_shm --id $NVMF_APP_SHM_ID; killprocess $nvmfpid; nvmftestfini $1; exit 1" SIGINT SIGTERM EXIT waitforlisten $nvmfpid -$rpc_py start_subsystem_init $rpc_py nvmf_create_transport -t RDMA -u 8192 -p 4 timing_exit start_nvmf_tgt diff --git a/test/nvmf/filesystem/filesystem.sh b/test/nvmf/filesystem/filesystem.sh index a00053ec2..057fc5793 100755 --- a/test/nvmf/filesystem/filesystem.sh +++ b/test/nvmf/filesystem/filesystem.sh @@ -27,13 +27,12 @@ timing_enter fs_test for incapsule in 0 4096; do # Start up the NVMf target in another process - $NVMF_APP -m 0xF --wait-for-rpc & + $NVMF_APP -m 0xF & nvmfpid=$! trap "process_shm --id $NVMF_APP_SHM_ID; killprocess $nvmfpid; nvmftestfini $1; exit 1" SIGINT SIGTERM EXIT waitforlisten $nvmfpid - $rpc_py start_subsystem_init $rpc_py nvmf_create_transport -t RDMA -u 8192 -p 4 -c $incapsule bdevs="$($rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE)" diff --git a/test/nvmf/fio/fio.sh b/test/nvmf/fio/fio.sh index 86a129102..ba3b12b31 100755 --- a/test/nvmf/fio/fio.sh +++ b/test/nvmf/fio/fio.sh @@ -26,13 +26,12 @@ fi timing_enter fio timing_enter start_nvmf_tgt # Start up the NVMf target in another process -$NVMF_APP -m 0xF --wait-for-rpc & +$NVMF_APP -m 0xF & nvmfpid=$! trap "process_shm --id $NVMF_APP_SHM_ID; killprocess $nvmfpid; nvmftestfini $1; exit 1" SIGINT SIGTERM EXIT waitforlisten $nvmfpid -$rpc_py start_subsystem_init $rpc_py nvmf_create_transport -t RDMA -u 8192 -p 4 timing_exit start_nvmf_tgt diff --git a/test/nvmf/host/aer.sh b/test/nvmf/host/aer.sh index 7803db3f7..66e597aa9 100755 --- a/test/nvmf/host/aer.sh +++ b/test/nvmf/host/aer.sh @@ -19,13 +19,12 @@ fi timing_enter aer timing_enter start_nvmf_tgt -$NVMF_APP -m 0xF --wait-for-rpc & +$NVMF_APP -m 0xF & nvmfpid=$! trap "process_shm --id $NVMF_APP_SHM_ID; killprocess $nvmfpid; exit 1" SIGINT SIGTERM EXIT waitforlisten $nvmfpid -$rpc_py start_subsystem_init $rpc_py nvmf_create_transport -t RDMA -u 8192 -p 4 timing_exit start_nvmf_tgt diff --git a/test/nvmf/host/bdevperf.sh b/test/nvmf/host/bdevperf.sh index f2e9b1189..1247177ff 100755 --- a/test/nvmf/host/bdevperf.sh +++ b/test/nvmf/host/bdevperf.sh @@ -22,13 +22,12 @@ fi timing_enter bdevperf timing_enter start_nvmf_tgt -$NVMF_APP -m 0xF --wait-for-rpc & +$NVMF_APP -m 0xF & nvmfpid=$! trap "process_shm --id $NVMF_APP_SHM_ID; killprocess $nvmfpid; exit 1" SIGINT SIGTERM EXIT waitforlisten $nvmfpid -$rpc_py start_subsystem_init $rpc_py nvmf_create_transport -t RDMA -u 8192 -p 4 timing_exit start_nvmf_tgt diff --git a/test/nvmf/host/fio.sh b/test/nvmf/host/fio.sh index b50fb1b76..ceed86b8d 100755 --- a/test/nvmf/host/fio.sh +++ b/test/nvmf/host/fio.sh @@ -25,13 +25,12 @@ fi timing_enter fio timing_enter start_nvmf_tgt -$NVMF_APP -m 0xF --wait-for-rpc & +$NVMF_APP -m 0xF & nvmfpid=$! trap "process_shm --id $NVMF_APP_SHM_ID; killprocess $nvmfpid; exit 1" SIGINT SIGTERM EXIT waitforlisten $nvmfpid -$rpc_py start_subsystem_init $rpc_py nvmf_create_transport -t RDMA -u 8192 -p 4 timing_exit start_nvmf_tgt diff --git a/test/nvmf/host/identify.sh b/test/nvmf/host/identify.sh index 7e9bc03b7..ad1019804 100755 --- a/test/nvmf/host/identify.sh +++ b/test/nvmf/host/identify.sh @@ -21,13 +21,12 @@ fi timing_enter identify timing_enter start_nvmf_tgt -$NVMF_APP -m 0xF --wait-for-rpc & +$NVMF_APP -m 0xF & nvmfpid=$! trap "process_shm --id $NVMF_APP_SHM_ID; killprocess $nvmfpid; exit 1" SIGINT SIGTERM EXIT waitforlisten $nvmfpid -$rpc_py start_subsystem_init $rpc_py nvmf_create_transport -t RDMA -u 8192 -p 4 timing_exit start_nvmf_tgt diff --git a/test/nvmf/host/perf.sh b/test/nvmf/host/perf.sh index fc4b4487d..24faed5be 100755 --- a/test/nvmf/host/perf.sh +++ b/test/nvmf/host/perf.sh @@ -22,13 +22,12 @@ fi timing_enter perf timing_enter start_nvmf_tgt -$NVMF_APP -m 0xF --wait-for-rpc -i 0 & +$NVMF_APP -m 0xF -i 0 & nvmfpid=$! trap "process_shm --id $NVMF_APP_SHM_ID; killprocess $nvmfpid; exit 1" SIGINT SIGTERM EXIT waitforlisten $nvmfpid -$rpc_py start_subsystem_init $rpc_py nvmf_create_transport -t RDMA -u 8192 -p 4 $rootdir/scripts/gen_nvme.sh --json | $rpc_py load_subsystem_config timing_exit start_nvmf_tgt diff --git a/test/nvmf/lvol/nvmf_lvol.sh b/test/nvmf/lvol/nvmf_lvol.sh index e171d92d3..7fe93a6ce 100755 --- a/test/nvmf/lvol/nvmf_lvol.sh +++ b/test/nvmf/lvol/nvmf_lvol.sh @@ -44,13 +44,12 @@ fi timing_enter lvol_integrity timing_enter start_nvmf_tgt # Start up the NVMf target in another process -$NVMF_APP -m 0xF --wait-for-rpc & +$NVMF_APP -m 0xF & pid=$! trap "process_shm --id $NVMF_APP_SHM_ID; disconnect_nvmf; killprocess $pid; nvmftestfini $1; exit 1" SIGINT SIGTERM EXIT waitforlisten $pid -$rpc_py start_subsystem_init $rpc_py nvmf_create_transport -t RDMA -u 8192 -p 4 timing_exit start_nvmf_tgt diff --git a/test/nvmf/multiconnection/multiconnection.sh b/test/nvmf/multiconnection/multiconnection.sh index fda2145de..97155e781 100755 --- a/test/nvmf/multiconnection/multiconnection.sh +++ b/test/nvmf/multiconnection/multiconnection.sh @@ -35,13 +35,12 @@ fi timing_enter multiconnection timing_enter start_nvmf_tgt # Start up the NVMf target in another process -$NVMF_APP -m 0xF --wait-for-rpc & +$NVMF_APP -m 0xF & pid=$! trap "process_shm --id $NVMF_APP_SHM_ID; killprocess $pid; nvmftestfini $1; exit 1" SIGINT SIGTERM EXIT waitforlisten $pid -$rpc_py start_subsystem_init $rpc_py nvmf_create_transport -t RDMA -u 8192 -p 4 timing_exit start_nvmf_tgt diff --git a/test/nvmf/nmic/nmic.sh b/test/nvmf/nmic/nmic.sh index 6133c29b5..7b66a9774 100755 --- a/test/nvmf/nmic/nmic.sh +++ b/test/nvmf/nmic/nmic.sh @@ -27,13 +27,12 @@ fi timing_enter nmic timing_enter start_nvmf_tgt # Start up the NVMf target in another process -$NVMF_APP -m 0xF --wait-for-rpc & +$NVMF_APP -m 0xF & pid=$! trap "killprocess $pid; nvmftestfini $1; exit 1" SIGINT SIGTERM EXIT waitforlisten $pid -$rpc_py start_subsystem_init $rpc_py nvmf_create_transport -t RDMA -u 8192 -p 4 timing_exit start_nvmf_tgt diff --git a/test/nvmf/nvme_cli/nvme_cli.sh b/test/nvmf/nvme_cli/nvme_cli.sh index 3d1c1afde..c8b40794e 100755 --- a/test/nvmf/nvme_cli/nvme_cli.sh +++ b/test/nvmf/nvme_cli/nvme_cli.sh @@ -32,13 +32,12 @@ fi timing_enter nvme_cli timing_enter start_nvmf_tgt -$NVMF_APP -m 0xF --wait-for-rpc & +$NVMF_APP -m 0xF & nvmfpid=$! trap "process_shm --id $NVMF_APP_SHM_ID; killprocess $nvmfpid; nvmftestfini $1; exit 1" SIGINT SIGTERM EXIT waitforlisten $nvmfpid -$rpc_py start_subsystem_init $rpc_py nvmf_create_transport -t RDMA -u 8192 -p 4 timing_exit start_nvmf_tgt diff --git a/test/nvmf/rpc/rpc.sh b/test/nvmf/rpc/rpc.sh index 467b1e9e6..5e8837d10 100755 --- a/test/nvmf/rpc/rpc.sh +++ b/test/nvmf/rpc/rpc.sh @@ -23,13 +23,12 @@ fi timing_enter rpc timing_enter start_nvmf_tgt # Start up the NVMf target in another process -$NVMF_APP -m 0xF --wait-for-rpc & +$NVMF_APP -m 0xF & pid=$! trap "process_shm --id $NVMF_APP_SHM_ID; killprocess $pid; nvmftestfini $1; exit 1" SIGINT SIGTERM EXIT waitforlisten $pid -$rpc_py start_subsystem_init $rpc_py nvmf_create_transport -t RDMA -u 8192 -p 4 timing_exit start_nvmf_tgt diff --git a/test/nvmf/shutdown/shutdown.sh b/test/nvmf/shutdown/shutdown.sh index d271cd24f..f68c4b21b 100755 --- a/test/nvmf/shutdown/shutdown.sh +++ b/test/nvmf/shutdown/shutdown.sh @@ -26,13 +26,12 @@ fi timing_enter shutdown timing_enter start_nvmf_tgt # Start up the NVMf target in another process -$NVMF_APP -m 0xF --wait-for-rpc & +$NVMF_APP -m 0xF & pid=$! trap "process_shm --id $NVMF_APP_SHM_ID; killprocess $pid; nvmfcleanup; nvmftestfini $1; exit 1" SIGINT SIGTERM EXIT waitforlisten $pid -$rpc_py start_subsystem_init $rpc_py nvmf_create_transport -t RDMA -u 8192 -p 4 timing_exit start_nvmf_tgt