From: Yu Watanabe Date: Wed, 5 Jul 2023 03:05:45 +0000 (+0900) Subject: test: change partition label to test if the outdated devlinks are removed X-Git-Tag: v254-rc1~27^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F28255%2Fhead;p=thirdparty%2Fsystemd.git test: change partition label to test if the outdated devlinks are removed The change is intended to reproduce the issue #27983, though the original issue is highly racy, and the test does not reproduce it reliably. But, anyway, it is better to change the partition label to test the devlink removal. --- diff --git a/test/units/testsuite-64.sh b/test/units/testsuite-64.sh index ad502a229c1..789f24f98d1 100755 --- a/test/units/testsuite-64.sh +++ b/test/units/testsuite-64.sh @@ -444,10 +444,14 @@ EOF } testcase_simultaneous_events_2() { - local disk expected i iterations key link num_part part partscript target timeout + local disk expected i iterations key link num_part part script_dir target timeout local -a devices symlinks local -A running + script_dir="$(mktemp --directory "/tmp/test-udev-storage.script.XXXXXXXXXX")" + # shellcheck disable=SC2064 + trap "rm -rf '$script_dir'" RETURN + if [[ -v ASAN_OPTIONS || "$(systemd-detect-virt -v)" == "qemu" ]]; then num_part=20 iterations=1 @@ -469,13 +473,11 @@ testcase_simultaneous_events_2() { devices+=("$target") done - symlinks=("/dev/disk/by-partlabel/testlabel") - - partscript="$(mktemp)" - - cat >"$partscript" <"$script_dir/partscript-$i" <