diff --git a/test/units/TEST-64-UDEV-STORAGE.sh b/test/units/TEST-64-UDEV-STORAGE.sh index 856f44595d..b9769b0ff1 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" <