[lvm-devel] master - tests: umount when above 95

Zdenek Kabelac zkabelac at fedoraproject.org
Sat Jan 21 21:56:21 UTC 2017


Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2d48317d3aa2283e606c9a200b68bd3eac67f0a4
Commit:        2d48317d3aa2283e606c9a200b68bd3eac67f0a4
Parent:        e2fa90bf38461a5de63cd11ffcc01fb984c8193b
Author:        Zdenek Kabelac <zkabelac at redhat.com>
AuthorDate:    Sat Jan 21 22:53:57 2017 +0100
Committer:     Zdenek Kabelac <zkabelac at redhat.com>
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(-)

diff --git a/test/shell/thin-autoumount-dmeventd.sh b/test/shell/thin-autoumount-dmeventd.sh
index eacad0a..b2b20a5 100644
--- a/test/shell/thin-autoumount-dmeventd.sh
+++ b/test/shell/thin-autoumount-dmeventd.sh
@@ -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




More information about the lvm-devel mailing list