]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: make TEST-63 more reliable on slower machines
authorFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 25 Aug 2022 10:05:53 +0000 (12:05 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 25 Aug 2022 16:21:39 +0000 (16:21 +0000)
Otherwise we might never hit the trigger limit and wait indefinitely.

Found when trying to run the test on an EC2 xen machine without a nested
virt in CentOS CI (in preparations for some ... unforseseen consequences).

test/TEST-63-PATH/test.sh
test/testsuite-63.units/test63.path

index 65f41ed1deb6bc32162b7de28900c61945130c13..4d132ba9396d4223a3109c08d3cbd2d64753b033 100755 (executable)
@@ -7,17 +7,4 @@ TEST_DESCRIPTION="https://github.com/systemd/systemd/issues/17433"
 # shellcheck source=test/test-functions
 . "${TEST_BASE_DIR:?}/test-functions"
 
-test_append_files() {
-    (
-        # Tweak the trigger limit interval in case we are collecting coverage
-        # or running without KVM - in both cases we might be slow enough that
-        # we could miss the default rate-limit window and cause the test to fail
-        # unexpectedly.
-        if get_bool "$IS_BUILT_WITH_COVERAGE" || ! get_bool "$QEMU_KVM"; then
-            mkdir -p "${initdir:?}/etc/systemd/system/test63.path.d"
-            printf "[Path]\nTriggerLimitIntervalSec=10\n" >"${initdir:?}/etc/systemd/system/test63.path.d/triggerlimitinterval-override.conf"
-        fi
-    )
-}
-
 do_test "$@"
index 3f31a1800077ba8e8ae4d6776218ce9bc64773e7..64d5ed6157ea9bc05fdb720f0310fb99dee909fe 100644 (file)
@@ -1,3 +1,6 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 [Path]
 PathExists=/tmp/test63
+# Make the unit friendly to slower machines
+TriggerLimitIntervalSec=10
+TriggerLimitBurst=10