From 226a705d830cc3bf931413aba3b13d2776d3be2c Mon Sep 17 00:00:00 2001 From: Karol Latecki Date: Thu, 12 Aug 2021 13:39:58 +0200 Subject: [PATCH] test/nvmf: reduce number of loops in rpc.sh test Running create/delete loop 50 times causes the test to take over 10 minutes and time out in nightly version. We have various code analyzer tests in place so running the same script block over 50 times in hope of detecting memory leak or some similar defect seems a bit redundant. Signed-off-by: Karol Latecki Change-Id: Icb2acb0ffbbe63d3004532d0b4a261152891216a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9166 Tested-by: SPDK CI Jenkins Community-CI: Broadcom CI Reviewed-by: Maciej Wawryk Reviewed-by: Tomasz Zawadzki Reviewed-by: Pawel Piatek Reviewed-by: Jim Harris --- test/nvmf/target/rpc.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/test/nvmf/target/rpc.sh b/test/nvmf/target/rpc.sh index 0c2be78d0b..0a1ea05339 100755 --- a/test/nvmf/target/rpc.sh +++ b/test/nvmf/target/rpc.sh @@ -6,6 +6,7 @@ source $rootdir/test/common/autotest_common.sh source $rootdir/test/nvmf/common.sh rpc_py="$rootdir/scripts/rpc.py" +loops=5 function jcount() { local filter=$1 @@ -40,13 +41,6 @@ if [ 'rdma' == $TEST_TRANSPORT ]; then [ "0" -lt $(jcount .poll_groups[0].transports[0].devices[].name <<< "$stats") ] fi -# set times for subsystem construct/delete -if [ $RUN_NIGHTLY -eq 1 ]; then - times=50 -else - times=3 -fi - MALLOC_BDEV_SIZE=64 MALLOC_BLOCK_SIZE=512 @@ -80,7 +74,7 @@ nvme disconnect -n nqn.2016-06.io.spdk:cnode1 $rpc_py nvmf_delete_subsystem nqn.2016-06.io.spdk:cnode1 # do frequent add delete of namespaces with different nsid. -for i in $(seq 1 $times); do +for i in $(seq 1 $loops); do $rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -s $NVMF_SERIAL $rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc1 -n 5 @@ -97,7 +91,7 @@ for i in $(seq 1 $times); do done # do frequent add delete. -for i in $(seq 1 $times); do +for i in $(seq 1 $loops); do $rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -s $NVMF_SERIAL $rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc1