Skip to contentSkip to conversation

master - tests: add udev_wait before tearing scsi_debug

PATCH Zdenek Kabelac 1 participant 1 message Jul 14, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2154f30a996967fa192b33997704d47038b5f077
Commit:        2154f30a996967fa192b33997704d47038b5f077
Parent:        ac0945bc4a14dfe8def578f9132e7261f254a279
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Fri Jul 14 20:23:02 2017 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Fri Jul 14 20:30:04 2017 +0200

tests: add udev_wait before tearing scsi_debug

Make less probably there will be some udev work going while we try to remove scsi_debug target.

---
 test/lib/aux.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
test/lib/aux.sh +1 -0
index 9a48689..b7a9ad6 100644
@@ -462,6 +462,7 @@ teardown_devs() {
 	# NOTE: SCSI_DEBUG_DEV test must come before the LOOP test because
 	# prepare_scsi_debug_dev() also sets LOOP to short-circuit prepare_loop()
 	if test -f SCSI_DEBUG_DEV; then
+		udev_wait
 		test "${LVM_TEST_PARALLEL:-0}" -eq 1 || modprobe -r scsi_debug
 	else
 		test ! -f LOOP || losetup -d "$(< LOOP)" || true