]> sourceware.org Git - lvm2.git/commitdiff
tests: mdadm stop in test cleanup
authorDavid Teigland <teigland@redhat.com>
Fri, 27 Sep 2019 17:51:34 +0000 (12:51 -0500)
committerDavid Teigland <teigland@redhat.com>
Fri, 27 Sep 2019 17:51:34 +0000 (12:51 -0500)
try to clear any existing md devs remaining after
a test

test/lib/aux.sh

index 9c9e1fda392615c0d358cfa4afbe604145118531..7b0ef22348a6efa30bfb7d142b27554e6a438523 100644 (file)
@@ -421,9 +421,14 @@ teardown_devs() {
        teardown_udev_cookies
 
        test ! -f MD_DEV || cleanup_md_dev
+       udev_wait
+       mdadm --stop --scan || true
+       udev_wait
        test ! -f DEVICES || teardown_devs_prefixed "$PREFIX"
        test ! -f RAMDISK || { modprobe -r brd || 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()
        if test -f SCSI_DEBUG_DEV; then
This page took 0.036374 seconds and 5 git commands to generate.