1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00
systemd-stable/test/TEST-63-ISSUE-17433/test.sh
Frantisek Sumsal 8470a16d6f test: tweak TriggerLimitIntervalSec= if we're running w/o KVM as well
since in that case we might be also slow enough to miss the rate-limit
window. However, let's not set the trigger limit unconditionally to
still have coverage for the unaltered path unit (but without sacrificing
CI stability).

See: https://github.com/systemd/systemd/pull/21808#issuecomment-998927401
2021-12-22 08:56:20 +09:00

24 lines
831 B
Bash
Executable File

#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1-or-later
set -e
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 "$@"