mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
parent
68ca50d3ae
commit
a610ba00d9
@ -22,6 +22,11 @@ get_last_timestamp() {
|
||||
journalctl -b "${1:?}" -o json -n 1 | jq -r '.__REALTIME_TIMESTAMP'
|
||||
}
|
||||
|
||||
# There may be huge amount of pending messages in sockets. Processing them may cause journal rotation.
|
||||
# If the journal is rotated in the loop below, some journal file may not be loaded and an unexpected
|
||||
# result may be provided. To mitigate such, sync before reading journals. Workaround for #32890.
|
||||
journalctl --sync
|
||||
|
||||
# Issue: #29275, second part
|
||||
# Now let's check if the boot entries are in the correct/expected order
|
||||
index=0
|
||||
|
@ -47,6 +47,10 @@ if [ -f /run/TEST-82-SOFTREBOOT.touch3 ]; then
|
||||
[[ ! -e /run/credentials/TEST-82-SOFTREBOOT-nosurvive.service ]]
|
||||
assert_eq "$(cat /run/credentials/TEST-82-SOFTREBOOT-survive-argv.service/preserve)" "yay"
|
||||
|
||||
# There may be huge amount of pending messages in sockets. Processing them may cause journal rotation and
|
||||
# removal of old archived journal files. If a journal file is removed during journalctl reading it,
|
||||
# the command may fail. To mitigate such, sync before reading journals. Workaround for #32834.
|
||||
journalctl --sync
|
||||
# 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')" ""
|
||||
|
Loading…
Reference in New Issue
Block a user