From 7d5b7f234f103525151f83108da1d1fb2673560c Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 5 Aug 2025 03:48:55 +0900 Subject: [PATCH] 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. (cherry picked from commit 3d4977a12b0ed298c02fb3b757961de3229ce025) --- test/units/TEST-64-UDEV-STORAGE.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 -- 2.47.3