Skip to contentSkip to conversation

master - tests: fix running tests on systems without udevd

PATCH Zdenek Kabelac 1 participant 1 message Mar 15, 2018

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=750fc2e876f49d48e8f883e4e342338b8c4676cd
Commit:        750fc2e876f49d48e8f883e4e342338b8c4676cd
Parent:        285413b502e1f0f5a016b24c93b871419381c1fc
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Wed Mar 14 11:23:14 2018 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Thu Mar 15 11:01:04 2018 +0100

tests: fix running tests on systems without udevd

Variable was unbound on systems without running udevd.

---
 test/lib/utils.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
test/lib/utils.sh +2 -2
index a1f7a01..b6c2ab0 100644
@@ -209,8 +209,8 @@ init_udev_transaction() {
 }
 
 finish_udev_transaction() {
-	if test "$DM_UDEV_SYNCHRONISATION" = 1 && test -n "$DM_UDEV_COOKIE" ; then
-		dmsetup udevreleasecookie
+	if test "$DM_UDEV_SYNCHRONISATION" = 1 && test -n "${DM_UDEV_COOKIE-}" ; then
+		dmsetup udevreleasecookie || true
 		unset DM_UDEV_COOKIE
 	fi
 }