1#!/usr/bin/env bash 2 3testdir=$(readlink -f $(dirname $0)) 4rootdir=$(readlink -f $testdir/../../..) 5source $rootdir/test/common/autotest_common.sh 6source $rootdir/test/nvmf/common.sh 7 8rpc_py="$rootdir/scripts/rpc.py" 9 10nvmftestinit 11nvmfappstart -m 0xE 12 13$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192 14$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 -m 10 15$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT 16$rpc_py bdev_null_create NULL1 1000 512 17 18$rootdir/test/nvme/connect_stress/connect_stress -c 0x1 -r "trtype:$TEST_TRANSPORT adrfam:IPv4 traddr:$NVMF_FIRST_TARGET_IP trsvcid:$NVMF_PORT subnqn:nqn.2016-06.io.spdk:cnode1" -t 10 & 19PERF_PID=$! 20 21rpcs=$SPDK_TEST_STORAGE/rpc.txt 22 23rm -f $rpcs 24 25for i in $(seq 1 20); do 26 cat <<- EOF >> $rpcs 27 nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 NULL1 28 nvmf_subsystem_remove_ns nqn.2016-06.io.spdk:cnode1 1 29 EOF 30done 31 32while kill -0 $PERF_PID; do 33 $rpc_py < $rpcs 34done 35 36wait $PERF_PID 37rm -f $rpcs 38 39trap - SIGINT SIGTERM EXIT 40 41nvmftestfini 42