From: Yu Watanabe Date: Sun, 26 Nov 2023 00:25:22 +0000 (+0900) Subject: test: check journal files are not corrupted after soft-reboot X-Git-Tag: v255-rc4~41^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F30220%2Fhead;p=thirdparty%2Fsystemd.git test: check journal files are not corrupted after soft-reboot --- diff --git a/test/units/testsuite-82.sh b/test/units/testsuite-82.sh index e0f9573f541..b5e6dedfed5 100755 --- a/test/units/testsuite-82.sh +++ b/test/units/testsuite-82.sh @@ -3,6 +3,9 @@ set -ex set -o pipefail +# shellcheck source=test/units/util.sh +. "$(dirname "$0")"/util.sh + at_exit() { # Since the soft-reboot drops the enqueued end.service, we won't shutdown # the test VM if the test fails and have to wait for the watchdog to kill @@ -39,6 +42,10 @@ if [ -f /run/testsuite82.touch3 ]; then test "$(systemctl show -P ActiveState testsuite-82-nosurvive-sigterm.service)" != "active" test "$(systemctl show -P ActiveState testsuite-82-nosurvive.service)" != "active" + # Check journals + journalctl -o short-monotonic --no-hostname --grep '(will soft-reboot|KILL|corrupt)' + assert_eq "$(journalctl -q -o short-monotonic -u systemd-journald.service --grep 'corrupt')" "" + # All succeeded, exit cleanly now elif [ -f /run/testsuite82.touch2 ]; then