mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-14 20:02:38 +00:00
test: fix a race condition with the journal test
The docs are slightly ambiguous here but it appears a call to sd_journal_next() is required at least once before the actual data message. journalctl positions the cursor with sd_journal_seek_tail() followed by sd_journal_seek_previous(). The actual enty is then fetched with sd_journal_next(). Let's do the same here and let's hope this fixes the current race condition with the test sometimes failing.
This commit is contained in:
parent
4b831021fb
commit
6df8ce3031
|
@ -478,6 +478,7 @@ PWTEST(logger_journal)
|
|||
}
|
||||
|
||||
sd_journal_seek_tail(journal);
|
||||
sd_journal_next(journal);
|
||||
|
||||
spa_logt_info(iface, &topic, "MARK\n");
|
||||
while ((rc = sd_journal_next(journal)) > 0) {
|
||||
|
@ -555,6 +556,7 @@ PWTEST(logger_journal_chain)
|
|||
}
|
||||
|
||||
sd_journal_seek_tail(journal);
|
||||
sd_journal_next(journal);
|
||||
|
||||
spa_logt_info(iface, &topic, "MARK\n");
|
||||
while ((rc = sd_journal_next(journal)) > 0) {
|
||||
|
|
Loading…
Reference in a new issue