From 2569e790f6352797f8e326ed472f49479791a2ac Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 19 May 2024 04:54:25 +0900 Subject: [PATCH 1/2] test: install modinfo to test image Follow-up for 6c2d47d6d3ad25ffd7527c7f4de31457ee1b25d8. Fixes the following unexpected skip: ``` [ 6.163670] TEST-64-UDEV-STORAGE.sh[596]: + modinfo btrfs [ 6.164102] TEST-64-UDEV-STORAGE.sh[726]: /usr/lib/systemd/tests/testdata/units/TEST-64-UDEV-STORAGE.sh: line 726: modinfo: command not found [ 6.164683] TEST-64-UDEV-STORAGE.sh[727]: + echo 'This test requires the btrfs kernel module but it is not installed, skipping the test' [ 6.165069] TEST-64-UDEV-STORAGE.sh[728]: + tee --append /skipped [ 6.166801] TEST-64-UDEV-STORAGE.sh[728]: This test requires the btrfs kernel module but it is not installed, skipping the test [ 6.167177] TEST-64-UDEV-STORAGE.sh[596]: + exit 77 ``` --- test/test-functions | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test-functions b/test/test-functions index e1f65e26a1..a34438b051 100644 --- a/test/test-functions +++ b/test/test-functions @@ -203,6 +203,7 @@ BASICTOOLS=( mkfifo mknod mktemp + modinfo modprobe mount mountpoint From 301d7ee6112c6f766ee63d1daed3cd9535a65053 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 19 May 2024 05:10:28 +0900 Subject: [PATCH 2/2] test: wipe filesystem before moving to the next test case --- test/units/TEST-64-UDEV-STORAGE.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/units/TEST-64-UDEV-STORAGE.sh b/test/units/TEST-64-UDEV-STORAGE.sh index c97db41da6..087968f42d 100755 --- a/test/units/TEST-64-UDEV-STORAGE.sh +++ b/test/units/TEST-64-UDEV-STORAGE.sh @@ -772,6 +772,8 @@ EOF btrfs filesystem show helper_check_device_symlinks helper_check_device_units + wipefs -a -f "${devices[@]}" + udevadm wait --settle --timeout=30 --removed "/dev/disk/by-uuid/$uuid" "/dev/disk/by-label/$label" echo "Multiple devices: using LUKS encrypted disks, data: raid1, metadata: raid1, mixed mode" uuid="deadbeef-dead-dead-beef-000000000003"