mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04: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
1 changed files with 2 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue