From 8c0fc98fb371916e69806be17edca5a76edcc146 Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Tue, 28 Aug 2018 12:41:49 -0700 Subject: [PATCH] nvmf: Fix timing issue in shutdown test Change-Id: Ifaa33f85914e8b3abba424f1bfd3a6c03d7ca236 Signed-off-by: Ben Walker Reviewed-on: https://review.gerrithub.io/423750 Tested-by: SPDK CI Jenkins Chandler-Test-Pool: SPDK Automated Test System Reviewed-by: Changpeng Liu Reviewed-by: Jim Harris --- test/nvmf/common.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/test/nvmf/common.sh b/test/nvmf/common.sh index 1452ed5048..937b4b4288 100755 --- a/test/nvmf/common.sh +++ b/test/nvmf/common.sh @@ -133,7 +133,20 @@ function get_ip_address() function nvmfcleanup() { sync - rmmod nvme-rdma + set +e + for i in {1..20}; do + modprobe -v -r nvme-rdma nvme-fabrics + if [ $? -eq 0 ]; then + set -e + return + fi + sleep 1 + done + set -e + + # So far unable to remove the kernel modules. Try + # one more time and let it fail. + modprobe -v -r nvme-rdma nvme-fabrics } function nvmftestinit()