Skip to contentSkip to conversation

test/btt-errors.sh: unmount the namespace before disabling

PATCH New Vishal Verma 1 participant 1 message Dec 4, 2017 libnvdimm: non-volatile memory device

lore
Share & tools
lore

Vishal Verma

author maintainer
#0 lore raw

PATCH 1/1 test/btt-errors.sh: unmount the namespace before disabling

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.

---
 test/btt-errors.sh | 1 +
 1 file changed, 1 insertion(+)
test/btt-errors.sh +1 -0
index d3a4694..68e3652 100755
@@ -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
Signature · 6 lines
2.14.3

_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm