]> git.ipfire.org Git - thirdparty/systemd.git/commit
journal: skip part of test-journal-interleaving if no machine-id exists 25732/head
authorNick Rosbrook <nick.rosbrook@canonical.com>
Wed, 14 Dec 2022 15:07:40 +0000 (10:07 -0500)
committerNick Rosbrook <nick.rosbrook@canonical.com>
Wed, 14 Dec 2022 18:58:12 +0000 (13:58 -0500)
commit3a9ca230363e6d1063a789492005d744723f5eed
tree09bcf912e9360bac6ad92f275793173d0df6a027
parent2c6b738badf1404b3ceb7e322eeeb736b57f6162
journal: skip part of test-journal-interleaving if no machine-id exists

When executed on a systemd with an empty /etc/machine-id,
test-journal-interleaving fails in test_sequence_numbers_one() when
re-opening the existing "two.journal". This is because opening the
existing journal file with managed_journal_file_open() causes
journal_file_verify_header() to be called. This function tries to
compare the current machine-id to the machine-id in the journal file
header, but does not handle the case where the machine-id is empty or
non-existent.

Check if we have an initialized machine-id before executing this portion
of the test.
src/journal/test-journal-interleaving.c