From: Alasdair Kergon Date: Wed, 29 Jun 2011 18:18:18 +0000 (+0000) Subject: make udev teardown conditional on using udev X-Git-Tag: v2_02_91~786 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=5ffa914c5983afc7ed95eff44fa371496be7801a;p=lvm2.git make udev teardown conditional on using udev --- diff --git a/test/lib/aux.sh b/test/lib/aux.sh index 9ad628169..6f671855d 100644 --- a/test/lib/aux.sh +++ b/test/lib/aux.sh @@ -62,7 +62,7 @@ prepare_dmeventd() { teardown_devs() { # Delete any remaining dm/udev semaphores - dmsetup udevcomplete_all -y + teardown_udev_cookies test -n "$PREFIX" && { rm -rf $TESTDIR/dev/$PREFIX* diff --git a/test/lib/utils.sh b/test/lib/utils.sh index ee04fa2d6..b2a7af6eb 100644 --- a/test/lib/utils.sh +++ b/test/lib/utils.sh @@ -147,6 +147,12 @@ finish_udev_transaction() { fi } +teardown_udev_cookies() { + if test "$DM_UDEV_SYNCHRONISATION" = 1; then + dmsetup udevcomplete_all -y + fi +} + skip() { touch SKIP_THIS_TEST exit 200