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
|
|
|
|
2015-11-17 11:21:23 +00:00
|
|
|
TEST_DESCRIPTION="Journal-related tests"
|
|
|
|
|
2021-04-19 11:01:59 +00:00
|
|
|
# shellcheck source=test/test-functions
|
|
|
|
. "${TEST_BASE_DIR:?}/test-functions"
|
2015-11-17 11:21:23 +00:00
|
|
|
|
2023-02-08 10:29:49 +00:00
|
|
|
test_append_files() {
|
|
|
|
local workspace="${1:?}"
|
2023-12-23 14:35:26 +00:00
|
|
|
local dropin_dir
|
2023-02-08 10:29:49 +00:00
|
|
|
|
2023-10-06 15:14:34 +00:00
|
|
|
image_install curl setterm unzstd
|
2023-06-16 16:50:08 +00:00
|
|
|
image_install -o openssl
|
|
|
|
# Necessary for RH-based systems, otherwise MHD fails with:
|
|
|
|
# microhttpd: Failed to initialise TLS session.
|
|
|
|
image_install -o /etc/crypto-policies/back-ends/gnutls.config
|
2023-12-23 14:35:26 +00:00
|
|
|
|
|
|
|
# Since we nuke the journal repeatedly during this test, let's redirect
|
|
|
|
# stdout/stderr to the console as well to make the test a bit more debug-able.
|
|
|
|
if ! get_bool "${INTERACTIVE_DEBUG:-}"; then
|
2024-05-11 17:17:13 +00:00
|
|
|
dropin_dir="${workspace:?}/etc/systemd/system/TEST-04-JOURNAL.service.d/"
|
2023-12-23 14:35:26 +00:00
|
|
|
mkdir -p "$dropin_dir"
|
|
|
|
printf '[Service]\nStandardOutput=journal+console\nStandardError=journal+console' >"$dropin_dir/99-stdout.conf"
|
|
|
|
fi
|
2023-02-08 10:29:49 +00:00
|
|
|
}
|
|
|
|
|
2021-04-26 17:20:18 +00:00
|
|
|
do_test "$@"
|