Skip to contentSkip to conversation

master - tests: no left devices check for skipped test

PATCH Zdenek Kabelac 1 participant 1 message Dec 12, 2016

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8c9c6ab66060cfc3383297a6baed229f9f341d4a
Commit:        8c9c6ab66060cfc3383297a6baed229f9f341d4a
Parent:        48d33e5fb671af16f84d74afab9f86d47ca112fc
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Mon Dec 12 11:22:10 2016 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Mon Dec 12 11:22:10 2016 +0100

tests: no left devices check for skipped test

---
 test/lib/aux.sh |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
test/lib/aux.sh +4 -1
index 4749f81..a195883 100644
@@ -520,7 +520,10 @@ teardown() {
 
 	if test -f TESTNAME ; then
 
-	TEST_LEAKED_DEVICES=$(dmsetup table | grep "$PREFIX" | grep -v "${PREFIX}pv") || true
+	if test ! -f SKIP_THIS_TEST ; then
+		# Evaluate left devices only for non-skipped tests
+		TEST_LEAKED_DEVICES=$(dmsetup table | grep "$PREFIX" | grep -v "${PREFIX}pv") || true
+	fi
 
 	kill_tagged_processes