1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

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.
This commit is contained in:
Zdenek Kabelac 2017-07-14 20:23:02 +02:00
parent ac0945bc4a
commit 2154f30a99

View File

@ -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