diff --git a/autotest.sh b/autotest.sh index 3f1671535..846ac85fb 100755 --- a/autotest.sh +++ b/autotest.sh @@ -23,7 +23,7 @@ timing_enter afterboot ./scripts/configure_hugepages.sh 3072 timing_exit afterboot -lsmod | grep -q ^nvme && rmmod nvme || true +./scripts/unbind_nvme.sh ##################### # Unit Tests diff --git a/scripts/cleanup.sh b/scripts/cleanup.sh index 7f189429c..c522253de 100755 --- a/scripts/cleanup.sh +++ b/scripts/cleanup.sh @@ -18,6 +18,7 @@ function cleanup_linux() { function cleanup_freebsd { kldunload contigmem.ko || true + kldunload nic_uio.ko || true } if [ `uname` = Linux ]; then diff --git a/scripts/unbind_nvme.sh b/scripts/unbind_nvme.sh index 67af2547d..be35b0af6 100755 --- a/scripts/unbind_nvme.sh +++ b/scripts/unbind_nvme.sh @@ -3,7 +3,7 @@ set -e function configure_linux { - lsmod | grep nvme && rmmod nvme + rmmod nvme || true } function configure_freebsd { @@ -12,8 +12,9 @@ function configure_freebsd { echo $AWK_PROG > $TMP NVME_PCICONF=`pciconf -l | grep class=0x010802` BDFS=`echo $NVME_PCICONF | awk -F: -f $TMP` + kldunload nic_uio.ko || true kenv hw.nic_uio.bdfs=$BDFS - kldload `find . -name nic_uio.ko | head -1` + kldload nic_uio.ko rm $TMP }