diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2017-01-21 22:53:57 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2017-01-21 22:53:57 +0100 |
commit | 2d48317d3aa2283e606c9a200b68bd3eac67f0a4 (patch) | |
tree | c121b2011eec2b4f90f4e88eec0ce9a80a4c0767 | |
parent | e2fa90bf38461a5de63cd11ffcc01fb984c8193b (diff) | |
download | lvm2-2d48317d3aa2283e606c9a200b68bd3eac67f0a4.tar.gz |
tests: umount when above 95
Add code to check if resulting data or metadata remained over 95%
and in such case invoke umount.
-rw-r--r-- | 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 eacad0a9c..b2b20a5f4 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 |