test: redirect stdout/stderr of TEST-04-JOURNAL to console as well

This effectively reverts fa6f37c043 just for TEST-04, as we nuke the
journal repeatedly in this test which makes it particularly hard to
debug. Let's hope the issue behind fa6f37c043 won't bite us back in this
case.

Follow-up for: fa6f37c043
Reverts: 8f7c876bdc
This commit is contained in:
Frantisek Sumsal
2023-12-23 15:54:51 +01:00
parent eb3cdf49b1
commit b3ed0808d1
2 changed files with 9 additions and 8 deletions
-8
View File
@@ -22,9 +22,6 @@ at_exit() {
journalctl --flush
fi
rm -f /run/systemd/journald.conf.d/99-forward-to-console.conf
systemctl restart systemd-journald
return 0
}
@@ -52,12 +49,7 @@ vcs_dump_and_check() {
# current boot, let's temporarily overmount /var/log/journal with a tmpfs,
# as we're going to wipe it multiple times, but we need to keep the original
# journal intact for the other tests to work correctly.
#
# Also, since we'll eventually lose the journal from this test, let's temporarily
# forward everything to console, to make potential fails debug-able.
trap at_exit EXIT
mkdir -p /run/systemd/journald.conf.d/
echo -ne '[Journal]\nForwardToConsole=yes' >/run/systemd/journald.conf.d/99-forward-to-console.conf
mount -t tmpfs tmpfs /var/log/journal
systemctl restart systemd-journald