Commit 2ab0506e authored by Ben Walker's avatar Ben Walker Committed by Jim Harris
Browse files

test/nvmf: Don't load kernel modules for custom transports



For custom transports, skip the kernel module loading and
unloading steps.

Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Change-Id: I193c62ffa0a9a5060b4bc504b39db3b6f660e1a3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3584


Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatar <dongx.yi@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 01f45ecd
Loading
Loading
Loading
Loading
+28 −23
Original line number Diff line number Diff line
@@ -194,6 +194,8 @@ function get_ip_address() {

function nvmfcleanup() {
	sync

	if [ "$TEST_TRANSPORT" == "tcp" ] || [ "$TEST_TRANSPORT" == "rdma" ]; then
		set +e
		for i in {1..20}; do
			modprobe -v -r nvme-$TEST_TRANSPORT
@@ -211,6 +213,7 @@ function nvmfcleanup() {
		# about the nvme-tcp module below.
		modprobe -v -r nvme-$TEST_TRANSPORT || true
		modprobe -v -r nvme-fabrics
	fi
}

function nvmf_veth_init() {
@@ -329,12 +332,14 @@ function nvmftestinit() {
		NVMF_TRANSPORT_OPTS="$NVMF_TRANSPORT_OPTS -o"
	fi

	if [ "$TEST_TRANSPORT" == "tcp" ] || [ "$TEST_TRANSPORT" == "rdma" ]; then
		# currently we run the host/perf test for TCP even on systems without kernel nvme-tcp
		#  support; that's fine since the host/perf test uses the SPDK initiator
		# maybe later we will enforce modprobe to succeed once we have systems in the test pool
		#  with nvme-tcp kernel support - but until then let this pass so we can still run the
		#  host/perf test with the tcp transport
		modprobe nvme-$TEST_TRANSPORT || true
	fi
}

function nvmfappstart() {