diff --git a/test/units/TEST-45-TIMEDATE.sh b/test/units/TEST-45-TIMEDATE.sh index c1fa30e206..820c3ae9f5 100755 --- a/test/units/TEST-45-TIMEDATE.sh +++ b/test/units/TEST-45-TIMEDATE.sh @@ -224,6 +224,9 @@ assert_timedated_signal() { for _ in {0..9}; do if journalctl "${args[@]}" --grep .; then + # Make the found entry in the archived journal, to avoid the following failure: + # Journal file /run/log/journal/.../system.journal is truncated, ignoring file. + journalctl --rotate [[ "$(journalctl "${args[@]}" -o cat | jq -r '.payload.data[1].NTP.data')" == "$value" ]]; return 0 fi @@ -304,6 +307,9 @@ assert_timesyncd_signal() { for _ in {0..9}; do if journalctl "${args[@]}" --grep .; then + # Make the found entry in the archived journal, to avoid the following failure: + # Journal file /run/log/journal/.../system.journal is truncated, ignoring file. + journalctl --rotate [[ "$(journalctl "${args[@]}" -o cat | jq -r ".payload.data[1].$property.data | join(\" \")")" == "$value" ]]; return 0 fi