]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-64-UDEV-STORAGE: do not use -f/--force option for wipefs
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 31 Aug 2025 00:30:22 +0000 (09:30 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 10 Oct 2025 08:36:48 +0000 (10:36 +0200)
When -f/--force is used, wipefs does not call ioctl(BLKRRPART), hence
the partitions will remain in sysfs. Let's not use the option.

This also makes it use 'udevadm lock' for safety.

(cherry picked from commit 0f8706915a5a8aae4791e09af12f81386ec9cc35)

test/units/TEST-64-UDEV-STORAGE.sh

index c29731e62324255df63fd6c079a3bdf2d85ee01f..d04189d3c5c62cb6236760720afe3e167833d762 100755 (executable)
@@ -836,7 +836,7 @@ EOF
     btrfs filesystem show
     helper_check_device_symlinks
     helper_check_device_units
-    wipefs -a -f "${devices[0]}"
+    udevadm lock --timeout=30 --device="${devices[0]}" wipefs -a "${devices[0]}"
     udevadm wait --settle --timeout=30 --removed /dev/disk/by-partlabel/diskpart{1..4}
 
     echo "Multiple devices: using disks, data: raid10, metadata: raid10, mixed mode"