Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=56e4e2ce2ba05990…
Commit: 56e4e2ce2ba05990eb4e8ced8a9a966b986f14ab
Parent: 273ccb11704075b1876f6931e9e8de19ff2b31a3
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Dec 11 10:25:15 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sun Dec 11 23:24:19 2016 +0100
tests: track leaked devices in tests
When test calls teardown, no devices created by test are expected
to be left in table. Trap such orphans and make the test fail.
---
test/lib/aux.sh | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 7f3c84a..4749f81 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -520,6 +520,8 @@ teardown() {
if test -f TESTNAME ; then
+ TEST_LEAKED_DEVICES=$(dmsetup table | grep "$PREFIX" | grep -v "${PREFIX}pv") || true
+
kill_tagged_processes
if test -n "$LVM_TEST_LVMLOCKD_TEST" ; then
@@ -567,6 +569,12 @@ teardown() {
fi
+ test -z "$TEST_LEAKED_DEVICES" || {
+ echo "Unexpected devices left dm table:"
+ echo "$TEST_LEAKED_DEVICES"
+ return 1
+ }
+
test -n "$TESTDIR" && {
cd "$TESTOLDPWD"
rm -rf "$TESTDIR" || echo BLA
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=198f335139f7a538…
Commit: 198f335139f7a538272c8cb6657ad4f5d58b01db
Parent: 4a33e4c509fb72bf3540d20bd35e1f0944e1d37a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Dec 10 15:07:14 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sun Dec 11 23:24:19 2016 +0100
tests: slower device
Some of test machines are too fast, slow raid syncing even more.
---
test/shell/lvchange-rebuild-raid.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/shell/lvchange-rebuild-raid.sh b/test/shell/lvchange-rebuild-raid.sh
index 6b91941..df6a8cb 100644
--- a/test/shell/lvchange-rebuild-raid.sh
+++ b/test/shell/lvchange-rebuild-raid.sh
@@ -21,7 +21,7 @@ aux prepare_vg 8
# Delay legs so that rebuilding status characters can be read
for d in $(< DEVICES)
do
- aux delay_dev "$d" 0 15 $(get first_extent_sector "$d")
+ aux delay_dev "$d" 0 20 $(get first_extent_sector "$d")
done
# rhbz 1064592