Loading scripts/autotest_common.sh +15 −0 Original line number Diff line number Diff line Loading @@ -112,3 +112,18 @@ function killprocess() { kill $1 wait $1 || true } function nvme_cleanup() { # Load the kernel driver ./scripts/setup.sh reset # Let the kernel discover any filesystems or partitions sleep 10 # Delete all partitions on NVMe devices devs=`lsblk -l -o NAME | grep nvme` for dev in $devs; do parted -s /dev/$dev mklabel msdos done } test/nvmf/filesystem/filesystem.sh +3 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ timing_enter fs_test $rootdir/app/nvmf_tgt/nvmf_tgt -c $testdir/../nvmf.conf & nvmfpid=$! trap "killprocess $nvmfpid; exit 1" SIGINT SIGTERM EXIT trap "killprocess $nvmfpid; nvme_cleanup; exit 1" SIGINT SIGTERM EXIT sleep 5 Loading Loading @@ -58,6 +58,8 @@ for dev in $devs; do umount /mnt/device timing_exit $fstype done parted -s /dev/$dev rm 1 done sync Loading Loading
scripts/autotest_common.sh +15 −0 Original line number Diff line number Diff line Loading @@ -112,3 +112,18 @@ function killprocess() { kill $1 wait $1 || true } function nvme_cleanup() { # Load the kernel driver ./scripts/setup.sh reset # Let the kernel discover any filesystems or partitions sleep 10 # Delete all partitions on NVMe devices devs=`lsblk -l -o NAME | grep nvme` for dev in $devs; do parted -s /dev/$dev mklabel msdos done }
test/nvmf/filesystem/filesystem.sh +3 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ timing_enter fs_test $rootdir/app/nvmf_tgt/nvmf_tgt -c $testdir/../nvmf.conf & nvmfpid=$! trap "killprocess $nvmfpid; exit 1" SIGINT SIGTERM EXIT trap "killprocess $nvmfpid; nvme_cleanup; exit 1" SIGINT SIGTERM EXIT sleep 5 Loading Loading @@ -58,6 +58,8 @@ for dev in $devs; do umount /mnt/device timing_exit $fstype done parted -s /dev/$dev rm 1 done sync Loading