Skip to contentSkip to conversation

master - tests: fix check lv_not_exist

PATCH Zdenek Kabelac 1 participant 1 message Sep 10, 2015

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e94ab01940828f471a9498f112d2023c3bf06ffd
Commit:        e94ab01940828f471a9498f112d2023c3bf06ffd
Parent:        54c982081fa6617c511e2a7d61dbe3b4e9c7d315
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Thu Sep 10 17:19:30 2015 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Thu Sep 10 17:28:47 2015 +0200

tests: fix check lv_not_exist

Use 'not' to set proper 'expected return status' so we do not 'leak' debug logs printed for failing case.

---
 test/lib/check.sh |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
test/lib/check.sh +1 -2
index 9d48851..b47bc8b 100644
@@ -268,8 +268,7 @@ lv_not_exists() {
 	else
 		while [ $# -gt 1 ]; do
 			shift
-			lvl $vg/$1 &>/dev/null || continue
-			die "$vg/$1 expected to not exist but it does!"
+			not lvl $vg/$1 &>/dev/null || die "$vg/$1 expected to not exist but it does!"
 		done
 	fi
 	rm -f debug.log