]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: add coverate for Compress=yes config option
authorLuca Boccassi <bluca@debian.org>
Thu, 16 May 2024 10:03:42 +0000 (11:03 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 16 May 2024 12:07:46 +0000 (14:07 +0200)
Avoid regressions like https://github.com/systemd/systemd/issues/32856

Follow-up for 2ef7cdc4255883d1c50860661248c9db69a86aa1

test/units/TEST-04-JOURNAL.SYSTEMD_JOURNAL_COMPRESS.sh

index 96d096d9adf95561f190eaa7b9504222dfe0bd91..6da9f5e4205d2b740ceacfc359d98458c1a77ff4 100755 (executable)
@@ -7,6 +7,12 @@ set -o pipefail
 mkdir /run/systemd/system/systemd-journald.service.d
 MACHINE_ID="$(</etc/machine-id)"
 
+mkdir -p /run/systemd/journald.conf.d
+cat <<EOF >/run/systemd/journald.conf.d/compress.conf
+[Journal]
+Compress=yes
+EOF
+
 # Reset the start-limit counters, as we're going to restart journald a couple of times
 systemctl reset-failed systemd-journald.service
 
@@ -35,6 +41,7 @@ EOF
     fi
 done
 
+rm /run/systemd/journald.conf.d/compress.conf
 rm /run/systemd/system/systemd-journald.service.d/compress.conf
 systemctl daemon-reload
 systemctl restart systemd-journald.service