[lvm-devel] master - tests: fix running tests on systems without udevd

Zdenek Kabelac zkabelac at sourceware.org
Thu Mar 15 10:04:50 UTC 2018


Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=750fc2e876f49d48e8f883e4e342338b8c4676cd
Commit:        750fc2e876f49d48e8f883e4e342338b8c4676cd
Parent:        285413b502e1f0f5a016b24c93b871419381c1fc
Author:        Zdenek Kabelac <zkabelac at redhat.com>
AuthorDate:    Wed Mar 14 11:23:14 2018 +0100
Committer:     Zdenek Kabelac <zkabelac at redhat.com>
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(-)

diff --git a/test/lib/utils.sh b/test/lib/utils.sh
index a1f7a01..b6c2ab0 100644
--- a/test/lib/utils.sh
+++ b/test/lib/utils.sh
@@ -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
 }




More information about the lvm-devel mailing list