diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-11-26 01:25:22 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-11-28 10:28:18 +0100 |
commit | 5edb35ef7ac765a62653af3f7583e2523c6821a6 (patch) | |
tree | 08abab816688f315c3531fef8977c771f2a54c1a /test | |
parent | unit: make journald stopped on soft-reboot before broadcasting SIGKILL (diff) | |
download | systemd-5edb35ef7ac765a62653af3f7583e2523c6821a6.tar.xz systemd-5edb35ef7ac765a62653af3f7583e2523c6821a6.zip |
test: check journal files are not corrupted after soft-reboot
Diffstat (limited to 'test')
-rwxr-xr-x | test/units/testsuite-82.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/units/testsuite-82.sh b/test/units/testsuite-82.sh index e0f9573f54..b5e6dedfed 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 |