From: Marian Csontos Date: Mon, 25 Nov 2019 08:23:02 +0000 (+0100) Subject: Partial revert "tests: update to md dev name" X-Git-Tag: v2_03_07~25 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=4757ce4c2a4d67ca7170fd25a5dc6e160fb7a788;p=lvm2.git Partial revert "tests: update to md dev name" This partially reverts commit c2ff8876f97a5840cd9d6fcda1bec55ef6220dc3. Not all MD devices are stopped. Something is missing there... --- diff --git a/test/lib/aux.sh b/test/lib/aux.sh index 566e9b52e..19365cd71 100644 --- a/test/lib/aux.sh +++ b/test/lib/aux.sh @@ -421,15 +421,13 @@ teardown_devs() { teardown_udev_cookies test ! -f MD_DEV || cleanup_md_dev - - test ! -f WAIT_MD_DEV || mddev=$(< WAIT_MD_DEV) udev_wait - test ! -f WAIT_MD_DEV || mdadm --stop $mddev || true + mdadm --stop --scan || true udev_wait test ! -f DEVICES || teardown_devs_prefixed "$PREFIX" test ! -f RAMDISK || { modprobe -r brd || true ; } - test ! -f WAIT_MD_DEV || mdadm --stop $mddev || true + mdadm --stop --scan || true # NOTE: SCSI_DEBUG_DEV test must come before the LOOP test because # prepare_scsi_debug_dev() also sets LOOP to short-circuit prepare_loop() @@ -794,7 +792,6 @@ wait_md_create() { break fi done - echo "$md" > WAIT_MD_DEV } wipefs_a() { diff --git a/test/shell/duplicate-pvs-md0.sh b/test/shell/duplicate-pvs-md0.sh index 21f1442b2..036f5707c 100644 --- a/test/shell/duplicate-pvs-md0.sh +++ b/test/shell/duplicate-pvs-md0.sh @@ -369,6 +369,7 @@ aux aux udev_wait cat /proc/mdstat # for some reason enabling dev2 starts an odd md dev mdadm --stop "$mddev" || true +mdadm --stop --scan cat /proc/mdstat aux wipefs_a "$dev1" || true aux wipefs_a "$dev2" || true @@ -434,6 +435,7 @@ aux aux udev_wait cat /proc/mdstat # for some reason enabling dev2 starts an odd md dev mdadm --stop "$mddev" || true +mdadm --stop --scan cat /proc/mdstat aux wipefs_a "$dev1" || true aux wipefs_a "$dev2" || true diff --git a/test/shell/duplicate-pvs-md1.sh b/test/shell/duplicate-pvs-md1.sh index be223df30..64d9b98ef 100644 --- a/test/shell/duplicate-pvs-md1.sh +++ b/test/shell/duplicate-pvs-md1.sh @@ -416,6 +416,7 @@ aux udev_wait cat /proc/mdstat # for some reason enabling dev2 starts an odd md dev mdadm --stop "$mddev" || true +mdadm --stop --scan cat /proc/mdstat aux wipefs_a "$dev1" || true aux wipefs_a "$dev2" || true @@ -480,6 +481,7 @@ aux udev_wait cat /proc/mdstat # for some reason enabling dev2 starts an odd md dev mdadm --stop "$mddev" || true +mdadm --stop --scan cat /proc/mdstat aux wipefs_a "$dev1" || true aux wipefs_a "$dev2" || true @@ -618,6 +620,7 @@ aux udev_wait cat /proc/mdstat # for some reason enabling dev2 starts an odd md dev mdadm --stop "$mddev" || true +mdadm --stop --scan cat /proc/mdstat aux wipefs_a "$dev1" || true aux wipefs_a "$dev2" || true