test/nvmf: Don't load kernel modules for custom transports
For custom transports, skip the kernel module loading and unloading steps. Signed-off-by: Ben 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: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: <dongx.yi@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
01f45ecd8c
commit
2ab0506ef7
@ -194,23 +194,26 @@ function get_ip_address() {
|
|||||||
|
|
||||||
function nvmfcleanup() {
|
function nvmfcleanup() {
|
||||||
sync
|
sync
|
||||||
set +e
|
|
||||||
for i in {1..20}; do
|
|
||||||
modprobe -v -r nvme-$TEST_TRANSPORT
|
|
||||||
if modprobe -v -r nvme-fabrics; then
|
|
||||||
set -e
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# So far unable to remove the kernel modules. Try
|
if [ "$TEST_TRANSPORT" == "tcp" ] || [ "$TEST_TRANSPORT" == "rdma" ]; then
|
||||||
# one more time and let it fail.
|
set +e
|
||||||
# Allow the transport module to fail for now. See Jim's comment
|
for i in {1..20}; do
|
||||||
# about the nvme-tcp module below.
|
modprobe -v -r nvme-$TEST_TRANSPORT
|
||||||
modprobe -v -r nvme-$TEST_TRANSPORT || true
|
if modprobe -v -r nvme-fabrics; then
|
||||||
modprobe -v -r nvme-fabrics
|
set -e
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# So far unable to remove the kernel modules. Try
|
||||||
|
# one more time and let it fail.
|
||||||
|
# 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
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function nvmf_veth_init() {
|
function nvmf_veth_init() {
|
||||||
@ -329,12 +332,14 @@ function nvmftestinit() {
|
|||||||
NVMF_TRANSPORT_OPTS="$NVMF_TRANSPORT_OPTS -o"
|
NVMF_TRANSPORT_OPTS="$NVMF_TRANSPORT_OPTS -o"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# currently we run the host/perf test for TCP even on systems without kernel nvme-tcp
|
if [ "$TEST_TRANSPORT" == "tcp" ] || [ "$TEST_TRANSPORT" == "rdma" ]; then
|
||||||
# support; that's fine since the host/perf test uses the SPDK initiator
|
# currently we run the host/perf test for TCP even on systems without kernel nvme-tcp
|
||||||
# maybe later we will enforce modprobe to succeed once we have systems in the test pool
|
# support; that's fine since the host/perf test uses the SPDK initiator
|
||||||
# with nvme-tcp kernel support - but until then let this pass so we can still run the
|
# maybe later we will enforce modprobe to succeed once we have systems in the test pool
|
||||||
# host/perf test with the tcp transport
|
# with nvme-tcp kernel support - but until then let this pass so we can still run the
|
||||||
modprobe nvme-$TEST_TRANSPORT || true
|
# host/perf test with the tcp transport
|
||||||
|
modprobe nvme-$TEST_TRANSPORT || true
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function nvmfappstart() {
|
function nvmfappstart() {
|
||||||
|
Loading…
Reference in New Issue
Block a user