From: Yu Watanabe Date: Sun, 24 Nov 2024 04:57:37 +0000 (+0900) Subject: TEST-17: add reproducer for issue #35329 X-Git-Tag: v257-rc3~29^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=675feaf521316670f85f4de1b7241a9958e79c03;p=thirdparty%2Fsystemd.git TEST-17: add reproducer for issue #35329 Without the previous commit, the test case will fail. --- diff --git a/test/units/TEST-17-UDEV.device_is_processing.sh b/test/units/TEST-17-UDEV.device_is_processing.sh new file mode 100755 index 00000000000..88e4b5a6bd3 --- /dev/null +++ b/test/units/TEST-17-UDEV.device_is_processing.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: LGPL-2.1-or-later +# shellcheck disable=SC2317 +set -ex +set -o pipefail + +# This is a reproducer of issue #35329, +# which is a regression caused by 405be62f05d76f1845f347737b5972158c79dd3e. + +IFNAME=udevtestnetif + +at_exit() { + set +e + + systemctl stop testsleep.service + rm -f /run/udev/udev.conf.d/timeout.conf + rm -f /run/udev/rules.d/99-testsuite.rules + # Forcibly kills sleep command invoked by the udev rule before restarting, + # otherwise systemctl restart below will takes longer. + killall -KILL sleep + systemctl restart systemd-udevd.service + ip link del "$IFNAME" +} + +trap at_exit EXIT + +udevadm settle + +mkdir -p /run/udev/udev.conf.d/ +cat >/run/udev/udev.conf.d/timeout.conf </run/udev/rules.d/99-testsuite.rules <