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 <karol.latecki@intel.com>
Change-Id: Icb2acb0ffbbe63d3004532d0b4a261152891216a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9166
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Karol Latecki 2021-08-12 13:39:58 +02:00 committed by Tomasz Zawadzki
parent 2a67deefc0
commit 226a705d83

View File

@ -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