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 <james.r.harris@intel.com> Change-Id: Ieddf5dcc9cb6132dff96c90db4ed97e67c328f56 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452773 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
parent
59955106a6
commit
654f5a8d9c
@ -72,15 +72,17 @@ echo "[Nvme]" > $testdir/bdevperf.conf
|
|||||||
|
|
||||||
timing_enter create_subsystems
|
timing_enter create_subsystems
|
||||||
# Create subsystems
|
# Create subsystems
|
||||||
|
rm -rf $testdir/rpcs.txt
|
||||||
for i in `seq 1 $num_subsystems`
|
for i in `seq 1 $num_subsystems`
|
||||||
do
|
do
|
||||||
$rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc$i
|
echo construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc$i >> $testdir/rpcs.txt
|
||||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode$i -a -s SPDK$i
|
echo nvmf_subsystem_create nqn.2016-06.io.spdk:cnode$i -a -s SPDK$i >> $testdir/rpcs.txt
|
||||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode$i Malloc$i
|
echo nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode$i Malloc$i >> $testdir/rpcs.txt
|
||||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode$i -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
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
|
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
|
done
|
||||||
|
$rpc_py < $testdir/rpcs.txt
|
||||||
timing_exit create_subsystems
|
timing_exit create_subsystems
|
||||||
|
|
||||||
# Test 1: Kill the initiator unexpectedly with no I/O outstanding
|
# 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 -f ./local-job0-0-verify.state
|
||||||
rm -rf $testdir/bdevperf.conf
|
rm -rf $testdir/bdevperf.conf
|
||||||
|
rm -rf $testdir/rpcs.txt
|
||||||
trap - SIGINT SIGTERM EXIT
|
trap - SIGINT SIGTERM EXIT
|
||||||
|
|
||||||
timing_enter cleanup
|
timing_enter cleanup
|
||||||
|
Loading…
Reference in New Issue
Block a user