Commit 0b8e0d81 authored by Seth Howell's avatar Seth Howell Committed by Ben Walker
Browse files

test/nvmf: make nvme-* kmod removal optional.



When we insert the nvme-$TEST_TRANSPORT modules into the kernel, we
allow for it to fail. So, for the sake of symmetry, we should allow for
the opposite to be true.

Thanks to Maciej Wawryk for pointing out the discrepancy.

Change-Id: I3c551950cbe25382c2bbea4f390bead0ba6f2a37
Signed-off-by: default avatarSeth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460395


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 8b539eb5
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -141,7 +141,8 @@ function nvmfcleanup()
	sync
	set +e
	for i in {1..20}; do
		modprobe -v -r nvme-$TEST_TRANSPORT nvme-fabrics
		modprobe -v -r nvme-$TEST_TRANSPORT
		modprobe -v -r nvme-fabrics
		if [ $? -eq 0 ]; then
			set -e
			return
@@ -152,7 +153,10 @@ function nvmfcleanup()

	# So far unable to remove the kernel modules. Try
	# one more time and let it fail.
	modprobe -v -r nvme-$TEST_TRANSPORT nvme-fabrics
	# Allow the transport module to fail for now. See Jim's comment
	# about the nvme-tcp module below.
	modprobe -v -r nvme-$TEST_TRANSPORT || true
	modprobe -v -r nvme-fabrics
}

function nvmftestinit()