From: Yu Watanabe Date: Tue, 29 Jul 2025 04:02:25 +0000 (+0900) Subject: TEST-64-UDEV-STORAGE: clear MD superblock on exit X-Git-Tag: v258-rc2~51^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F38397%2Fhead;p=thirdparty%2Fsystemd.git TEST-64-UDEV-STORAGE: clear MD superblock on exit Workaround for issue #38240. --- diff --git a/test/units/TEST-64-UDEV-STORAGE.sh b/test/units/TEST-64-UDEV-STORAGE.sh index 69ca6e4d7af..af935326252 100755 --- a/test/units/TEST-64-UDEV-STORAGE.sh +++ b/test/units/TEST-64-UDEV-STORAGE.sh @@ -1186,6 +1186,12 @@ EOF helper_check_device_units # Cleanup mdadm -v --stop "$raid_dev" + + # Clear superblocks to make the MD device will not be restarted even if the VM is restarted. + # This is a workaround for issue #38240. + mdadm -v --zero-superblock --force "${devices[@]}" + udevadm settle --timeout=30 + # Check if all expected symlinks were removed after the cleanup udevadm wait --settle --timeout=30 --removed "${expected_symlinks[@]}" helper_check_device_units @@ -1243,6 +1249,12 @@ testcase_mdadm_lvm() { # Cleanup lvm vgchange -an "$vgroup" mdadm -v --stop "$raid_dev" + + # Clear superblocks to make the MD device will not be restarted even if the VM is restarted. + # This is a workaround for issue #38240. + mdadm -v --zero-superblock --force "${devices[@]}" + udevadm settle --timeout=30 + # Check if all expected symlinks were removed after the cleanup udevadm wait --settle --timeout=30 --removed "${expected_symlinks[@]}" helper_check_device_units