Skip to content

Commit

Permalink
Merge pull request #5049 from HuijingHei/ci-check-duplicate-line
Browse files Browse the repository at this point in the history
ci: fix test failing for Duplicate lines in journal
  • Loading branch information
jmarrero authored Aug 15, 2024
2 parents adc4c42 + aea2d53 commit af87ec5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/kolainst/nondestructive/misc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@ assert_not_file_has_content $tmpfiles 'd /var/tmp'
assert_not_file_has_content $tmpfiles 'd /var/cache '
assert_file_has_content_literal $tmpfiles 'd /var/lib/chrony 0750 chrony chrony - -'

# https://github.com/coreos/rpm-ostree/issues/5040
# only check logs after switchroot
curosr=$(journalctl -u initrd-switch-root.service -o json -n 1 | jq -r '.["__CURSOR"]')
set +x # so our grepping doesn't get a hit on itself
if journalctl --grep 'Duplicate line'; then
if journalctl -u systemd-tmpfiles-setup.service --after-cursor ${curosr} --grep 'Duplicate line'; then
fatal "Should not get logs (Duplicate line)"
fi
set -x # restore
Expand Down

0 comments on commit af87ec5

Please sign in to comment.