diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-09-22 19:28:04 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-09-26 06:26:22 +0200 |
commit | 1fa2ebbec4a9a387c13eb7b556fb788eaf3288f0 (patch) | |
tree | f07e88a31fcf2f168737ee6438acfbb06eb4ef5a /src | |
parent | man: document SystemState's possible values (diff) | |
download | systemd-1fa2ebbec4a9a387c13eb7b556fb788eaf3288f0.tar.xz systemd-1fa2ebbec4a9a387c13eb7b556fb788eaf3288f0.zip |
test: fix header verification
Diffstat (limited to 'src')
-rw-r--r-- | src/journal/test-journal-interleaving.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/journal/test-journal-interleaving.c b/src/journal/test-journal-interleaving.c index 21c5bdddae..322bf4c7d7 100644 --- a/src/journal/test-journal-interleaving.c +++ b/src/journal/test-journal-interleaving.c @@ -354,9 +354,9 @@ static void test_sequence_numbers_one(void) { assert_se(two->file->header->state == STATE_ONLINE); assert_se(!sd_id128_equal(two->file->header->file_id, one->file->header->file_id)); - assert_se(sd_id128_equal(one->file->header->machine_id, one->file->header->machine_id)); - assert_se(sd_id128_equal(one->file->header->tail_entry_boot_id, one->file->header->tail_entry_boot_id)); - assert_se(sd_id128_equal(one->file->header->seqnum_id, one->file->header->seqnum_id)); + assert_se(sd_id128_equal(two->file->header->machine_id, one->file->header->machine_id)); + assert_se(sd_id128_is_null(two->file->header->tail_entry_boot_id)); /* Not written yet. */ + assert_se(sd_id128_equal(two->file->header->seqnum_id, one->file->header->seqnum_id)); append_number(two, 3, &seqnum); printf("seqnum=%"PRIu64"\n", seqnum); @@ -365,6 +365,9 @@ static void test_sequence_numbers_one(void) { printf("seqnum=%"PRIu64"\n", seqnum); assert_se(seqnum == 4); + /* Verify tail_entry_boot_id. */ + assert_se(sd_id128_equal(two->file->header->tail_entry_boot_id, one->file->header->tail_entry_boot_id)); + test_close(two); append_number(one, 5, &seqnum); |