From: Yu Watanabe Date: Mon, 4 Aug 2025 18:48:55 +0000 (+0900) Subject: TEST-64-UDEV-STORAGE: mdadm --zero-superblock seems to not support symlink X-Git-Tag: v258-rc2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d4977a12b0ed298c02fb3b757961de3229ce025;p=thirdparty%2Fsystemd.git TEST-64-UDEV-STORAGE: mdadm --zero-superblock seems to not support symlink On CentOS 9: ``` TEST-64-UDEV-STORAGE.sh[522]: + mdadm -v --zero-superblock --force /dev/disk/by-id/scsi-0systemd_foobar_deadbeefmdadmlvm0 ... TEST-64-UDEV-STORAGE.sh[1014]: mdadm: Unrecognised md component device - /dev/disk/by-id/scsi-0systemd_foobar_deadbeefmdadmlvm4 ``` This also adds `udevadm settle` before clearing superblocks for safety. Follow-up for 5ad6fe9850e0ecad7415bfbdd547d07b9b1177c7. --- diff --git a/test/units/TEST-64-UDEV-STORAGE.sh b/test/units/TEST-64-UDEV-STORAGE.sh index b9769b0ff15..7ee606e6975 100755 --- a/test/units/TEST-64-UDEV-STORAGE.sh +++ b/test/units/TEST-64-UDEV-STORAGE.sh @@ -1259,7 +1259,9 @@ EOF # 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 + # shellcheck disable=SC2046 + mdadm -v --zero-superblock --force $(readlink -f "${devices[@]}") udevadm settle --timeout=30 # Check if all expected symlinks were removed after the cleanup @@ -1322,7 +1324,9 @@ testcase_mdadm_lvm() { # 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 + # shellcheck disable=SC2046 + mdadm -v --zero-superblock --force $(readlink -f "${devices[@]}") udevadm settle --timeout=30 # Check if all expected symlinks were removed after the cleanup