When cleaning up after the first part of the test, the disable-region
and subsequent zero-labels would fail if the namespace was mounted. Fix
this by unmounting the namespace before trying to disable it.
Cc: Dan Williams <dan.j.williams(a)intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma(a)intel.com>
---
test/btt-errors.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/test/btt-errors.sh b/test/btt-errors.sh
index d3a4694..68e3652 100755
--- a/test/btt-errors.sh
+++ b/test/btt-errors.sh
@@ -146,6 +146,7 @@ dd if=$MNT/$FILE of=/dev/null iflag=direct bs=4096 count=1
## ensure we get an EIO for errors in namespace metadata
# reset everything to get a clean log
+if grep -q "$MNT" /proc/mounts; then umount $MNT; fi
$NDCTL disable-region -b "$BUS" all
$NDCTL zero-labels -b "$BUS" all
$NDCTL enable-region -b "$BUS" all
--
2.14.3
Show replies by date