Skip to contentSkip to conversation

master - tests: add udev sync point

PATCH Zdenek Kabelac 1 participant 1 message Jun 20, 2014

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=93597bcbdc791daf7308c839f245f6951900d7a7
Commit:        93597bcbdc791daf7308c839f245f6951900d7a7
Parent:        548269a1ddeb8fa2cfc6a9fd95c5fb2c398914a7
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Fri Jun 20 11:11:39 2014 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Fri Jun 20 11:14:29 2014 +0200

tests: add udev sync point

Missed synchronization with udev may lead to error on vgcreate, if previous vgremove was not handled fast enough by udev.

---
 test/shell/snapshot-usage.sh |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
test/shell/snapshot-usage.sh +6 -0
index c0a14c6..dcf2886 100644
@@ -213,6 +213,12 @@ vgremove -ff $vg1
 # Can't test >= 16T devices on 32bit
 test "$TSIZE" = 15P || exit 0
 
+# synchronize with udev activity
+# FIXME - otherwise sequence of vgremove followed by vgcreate may fail...
+# as there could be still remaing links in /dev
+# Unusure if 'vgcreate' should do this type of detection in udev mode.
+aux udev_wait
+
 # Check usability with largest extent size
 pvcreate "$DM_DEV_DIR/$vg/$lv"
 vgcreate -s 4G $vg1 "$DM_DEV_DIR/$vg/$lv"