[systemd-devel] Journal tests broken by commit 6573ef05a3cbe1 ("journal: keep per-JournalFile location info during iteration")

Filipe Brandenburger filbranden at google.com
Thu Dec 18 17:40:43 PST 2014


On Thu, Dec 18, 2014 at 4:58 PM, Filipe Brandenburger
<filbranden at google.com> wrote:
> But this does not work on trunk head, even after adapting it, the
> tests start to fail in a different location, probably because of the
> changes that come after it, so I think we'll need this and further
> changes to it. I'll keep looking.

Ok, so I found that reverting these three patches:

- Revert 58439db "journal: drop unnecessary parameters of
next_beyond_location()"
- Revert d8ae66d "journal: compare candidate entries using
JournalFiles' locations"
- Revert e499c99 "journal: remove redundant variable new_offset"

And applying the following patch:

diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index 8d63094..cabe080 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -860,8 +860,6 @@
                         found = true;

                 if (found) {
-                        journal_file_save_location(f, direction, c, cp);
-
                         if (ret)
                                 *ret = c;
                         if (offset)
@@ -918,6 +916,8 @@
         if (!new_file)
                 return 0;

+        journal_file_save_location(new_file, direction, o, new_offset);
+
         r = journal_file_move_to_object(new_file, OBJECT_ENTRY,
new_offset, &o);
         if (r < 0)
                 return r;


This seems to fix "test-journal-stream", but
"test-journal-interleaving" is still broken (assertion 'r == 1' failed
at src/journal/test-journal-interleaving.c:101, function
test_check_numbers_down.)

At this point, I'm leaning towards believeing that the logic of the
patchset doesn't really work with more than one journal file and I'd
be inclined to suggest reverting all of it.

Cheers,
Filipe


More information about the systemd-devel mailing list