1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

tests: update to md dev name

Restore WAIT_MD_DEV in teardown.

NOTE: The name of MD device may have changed.

(cherry picked from commit c2ff8876f9)
This commit is contained in:
David Teigland 2019-10-02 12:51:17 -05:00 committed by Marian Csontos
parent b690258518
commit bbd8badaef

View File

@ -421,13 +421,15 @@ teardown_devs() {
teardown_udev_cookies teardown_udev_cookies
test ! -f MD_DEV || cleanup_md_dev test ! -f MD_DEV || cleanup_md_dev
test ! -f WAIT_MD_DEV || mddev=$(< WAIT_MD_DEV)
udev_wait udev_wait
mdadm --stop --scan || true test ! -f WAIT_MD_DEV || mdadm --stop $mddev || true
udev_wait udev_wait
test ! -f DEVICES || teardown_devs_prefixed "$PREFIX" test ! -f DEVICES || teardown_devs_prefixed "$PREFIX"
test ! -f RAMDISK || { modprobe -r brd || true ; } test ! -f RAMDISK || { modprobe -r brd || true ; }
mdadm --stop --scan || true test ! -f WAIT_MD_DEV || mdadm --stop $mddev || true
# NOTE: SCSI_DEBUG_DEV test must come before the LOOP test because # NOTE: SCSI_DEBUG_DEV test must come before the LOOP test because
# prepare_scsi_debug_dev() also sets LOOP to short-circuit prepare_loop() # prepare_scsi_debug_dev() also sets LOOP to short-circuit prepare_loop()
@ -792,6 +794,7 @@ wait_md_create() {
break break
fi fi
done done
echo "$md" > WAIT_MD_DEV
} }
wipefs_a() { wipefs_a() {