Skip to contentSkip to conversation

master - tests: umount when above 95

PATCH Zdenek Kabelac 1 participant 1 message Jan 21, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2d48317d3aa2283e606c9a200b68bd3eac67f0a4
Commit:        2d48317d3aa2283e606c9a200b68bd3eac67f0a4
Parent:        e2fa90bf38461a5de63cd11ffcc01fb984c8193b
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Sat Jan 21 22:53:57 2017 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Sat Jan 21 22:53:57 2017 +0100

tests: umount when above 95

Add code to check if resulting data or metadata remained over 95% and in such case invoke umount.

---
 test/shell/thin-autoumount-dmeventd.sh |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
test/shell/thin-autoumount-dmeventd.sh +6 -0
index eacad0a..b2b20a5 100644
@@ -54,6 +54,12 @@ echo "Metadata: \$DMEVENTD_THIN_POOL_METADATA"
 $TESTDIR/lib/lvextend --use-policies \$1 || {
 	umount "$mntdir"  || true
 	umount "$mntusedir" || true
+	return 1
+}
+test \$($TESTDIR/lib/lvs -o selected -S "data_percent>95||metadata_percent>95" --noheadings \$1) -eq 0 || {
+	umount "$mntdir"  || true
+	umount "$mntusedir" || true
+	return 1
 }
 EOF
 chmod +x testcmd.sh