From 0b8e0d81f2f21f8086bfff533df3b738ec7c938a Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Wed, 3 Jul 2019 17:59:13 -0700 Subject: [PATCH] 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: Seth Howell Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460395 Tested-by: SPDK CI Jenkins Reviewed-by: Changpeng Liu Reviewed-by: Darek Stojaczyk Reviewed-by: Shuhei Matsumoto Reviewed-by: Ben Walker --- test/nvmf/common.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/nvmf/common.sh b/test/nvmf/common.sh index 8227ef1680..97398a7390 100755 --- a/test/nvmf/common.sh +++ b/test/nvmf/common.sh @@ -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()