Commit 79afa1cf authored by Ben Walker's avatar Ben Walker Committed by Jim Harris
Browse files

test/nvmf: Expand shutdown test



Also do a few connect/disconnect sequences before killing it.

Change-Id: Iaa36f259f43aa0896878432777458a3e0bed7ffd
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/425999


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent b65b0337
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
@@ -39,9 +39,9 @@ timing_exit start_nvmf_tgt
num_subsystems=10
# SoftRoce does not have enough queues available for
# this test. Detect if we're using software RDMA.
# If so, only use one subsystem.
# If so, only use four subsystems.
if check_ip_is_soft_roce "$NVMF_FIRST_TARGET_IP"; then
	num_subsystems=1
	num_subsystems=4
fi

# Create subsystems
@@ -58,10 +58,22 @@ done
modprobe -v nvme-rdma
modprobe -v nvme-fabrics

# Repeatedly connect and disconnect
for ((x=0; x<5;x++)); do
	# Connect kernel host to subsystems
	for i in `seq 1 $num_subsystems`; do
		nvme connect -t rdma -n "nqn.2016-06.io.spdk:cnode${i}" -a "$NVMF_FIRST_TARGET_IP" -s "$NVMF_PORT"
	done
	# Disconnect the subsystems in reverse order
	for i in `seq $num_subsystems -1 1`; do
		nvme disconnect -n nqn.2016-06.io.spdk:cnode${i}
	done
done

# Start a series of connects right before disconnecting
for i in `seq 1 $num_subsystems`; do
	nvme connect -t rdma -n "nqn.2016-06.io.spdk:cnode${i}" -a "$NVMF_FIRST_TARGET_IP" -s "$NVMF_PORT"
done

waitforblk "nvme0n1"