From: Yu Watanabe Date: Wed, 30 Jul 2025 12:44:04 +0000 (+0900) Subject: TEST-64-UDEV-STORAGE: add stress tests for creating/removing device node symlinks X-Git-Tag: v258-rc2~25^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdb86005755ab0e6764696e1c862ec25bf1bca60;p=thirdparty%2Fsystemd.git TEST-64-UDEV-STORAGE: add stress tests for creating/removing device node symlinks For issue #37823. --- diff --git a/test/units/TEST-64-UDEV-STORAGE.sh b/test/units/TEST-64-UDEV-STORAGE.sh index 856f44595d1..b9769b0ff15 100755 --- a/test/units/TEST-64-UDEV-STORAGE.sh +++ b/test/units/TEST-64-UDEV-STORAGE.sh @@ -559,9 +559,61 @@ EOF udevadm wait --timeout=10 --removed "/dev/disk/by-partlabel/testlabel-$iterations" } +testcase_simultaneous_events_3() { + local device i iterations link num_part part script_dir target timeout + + # for issue #37823 + + script_dir="$(mktemp --directory "/tmp/test-udev-storage.script.XXXXXXXXXX")" + # shellcheck disable=SC2064 + trap "rm -rf '$script_dir'" RETURN + + num_part=5 + iterations=30 + if [[ -v ASAN_OPTIONS || "$(systemd-detect-virt -v)" == "qemu" ]]; then + timeout=120 + else + timeout=60 + fi + + link="/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_deadbeeftest0" + device="$(readlink -f "$link")" + if [[ ! -b "$device" ]]; then + echo "ERROR: failed to find the test SCSI block device $link" + return 1 + fi + + for ((i = 1; i <= iterations; i++)); do + cat >"$script_dir/partscript-$i" <