2020-03-04 09:35:06 +00:00
|
|
|
#!/usr/bin/env bash
|
2021-10-17 16:13:06 +00:00
|
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
2017-08-07 19:09:21 +00:00
|
|
|
set -e
|
2021-04-19 11:01:59 +00:00
|
|
|
|
2023-05-10 10:38:57 +00:00
|
|
|
TEST_DESCRIPTION="Tests for core PID1 functionality"
|
2015-11-23 17:56:45 +00:00
|
|
|
|
2021-04-19 11:01:59 +00:00
|
|
|
# shellcheck source=test/test-functions
|
|
|
|
. "${TEST_BASE_DIR:?}/test-functions"
|
2015-11-23 17:56:45 +00:00
|
|
|
|
2023-05-10 11:07:26 +00:00
|
|
|
test_append_files() {
|
|
|
|
local workspace="${1:?}"
|
|
|
|
|
2023-09-05 11:14:39 +00:00
|
|
|
# We might not be fast enough to hit the limit (20 triggers per 2 secs)
|
|
|
|
# in certain environments, i.e. when running without KVM or when collecting
|
|
|
|
# coverage. Let's help it a bit in such case.
|
|
|
|
if ! get_bool "$QEMU_KVM" || get_bool "$IS_BUILT_WITH_COVERAGE"; then
|
2023-05-10 11:41:03 +00:00
|
|
|
mkdir -p "$workspace/etc/systemd/system/issue2467.socket.d"
|
2023-09-05 11:14:39 +00:00
|
|
|
printf "[Socket]\nTriggerLimitIntervalSec=10\n" >"$workspace/etc/systemd/system/issue2467.socket.d/TriggerLimitInterval.conf"
|
2023-05-10 11:41:03 +00:00
|
|
|
fi
|
|
|
|
|
2023-05-10 11:07:26 +00:00
|
|
|
# Issue: https://github.com/systemd/systemd/issues/2730
|
|
|
|
mkdir -p "$workspace/etc/systemd/system/"
|
|
|
|
cat >"$workspace/etc/systemd/system/issue2730.mount" <<EOF
|
|
|
|
[Mount]
|
|
|
|
What=tmpfs
|
|
|
|
Where=/issue2730
|
|
|
|
Type=tmpfs
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=local-fs.target
|
|
|
|
Alias=issue2730-alias.mount
|
|
|
|
EOF
|
|
|
|
"${SYSTEMCTL:?}" enable --root="$workspace" issue2730.mount
|
|
|
|
ln -svrf "$workspace/etc/systemd/system/issue2730.mount" "$workspace/etc/systemd/system/issue2730-alias.mount"
|
2023-09-18 16:05:27 +00:00
|
|
|
|
|
|
|
image_install logger
|
2023-05-10 11:07:26 +00:00
|
|
|
}
|
|
|
|
|
2021-04-26 17:20:18 +00:00
|
|
|
do_test "$@"
|