From 654f5a8d9c2d3c850f379cb370071abf13ff91f5 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Wed, 1 May 2019 09:03:09 -0700 Subject: [PATCH] test/nvmf: call rpc.py only once to build subsystems This leverages a new feature in rpc.py for piping a large number of commands at once. This will cut down the amount of time it takes to run the affected tests. Signed-off-by: Jim Harris Change-Id: Ieddf5dcc9cb6132dff96c90db4ed97e67c328f56 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452773 Tested-by: SPDK CI Jenkins Reviewed-by: Darek Stojaczyk --- test/nvmf/shutdown/shutdown.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/nvmf/shutdown/shutdown.sh b/test/nvmf/shutdown/shutdown.sh index aad392265..b157b3165 100755 --- a/test/nvmf/shutdown/shutdown.sh +++ b/test/nvmf/shutdown/shutdown.sh @@ -72,15 +72,17 @@ echo "[Nvme]" > $testdir/bdevperf.conf timing_enter create_subsystems # Create subsystems +rm -rf $testdir/rpcs.txt for i in `seq 1 $num_subsystems` do - $rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc$i - $rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode$i -a -s SPDK$i - $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode$i Malloc$i - $rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode$i -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT + echo construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc$i >> $testdir/rpcs.txt + echo nvmf_subsystem_create nqn.2016-06.io.spdk:cnode$i -a -s SPDK$i >> $testdir/rpcs.txt + echo nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode$i Malloc$i >> $testdir/rpcs.txt + echo nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode$i -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT >> $testdir/rpcs.txt echo " TransportID \"trtype:RDMA adrfam:IPv4 subnqn:nqn.2016-06.io.spdk:cnode$i traddr:$NVMF_FIRST_TARGET_IP trsvcid:$NVMF_PORT hostaddr:$NVMF_FIRST_TARGET_IP\" Nvme$i" >> $testdir/bdevperf.conf done +$rpc_py < $testdir/rpcs.txt timing_exit create_subsystems # Test 1: Kill the initiator unexpectedly with no I/O outstanding @@ -149,6 +151,7 @@ timing_exit test3 rm -f ./local-job0-0-verify.state rm -rf $testdir/bdevperf.conf +rm -rf $testdir/rpcs.txt trap - SIGINT SIGTERM EXIT timing_enter cleanup