mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-14 20:02:38 +00:00
test: test-logger: ignore some systemd journal error codes
Some errors from `sd_journal_get_data()` are not (and should not be considered) fatal from the point of view of the test. Ignore them. See #1710
This commit is contained in:
parent
3d152db758
commit
0680e249e5
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "pwtest.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
@ -464,6 +465,9 @@ find_in_journal(sd_journal *journal, const char *needle, char *out, size_t out_s
|
|||
const char *d;
|
||||
size_t l;
|
||||
int r = sd_journal_get_data(journal, "MESSAGE", (const void **)&d, &l);
|
||||
if (r == -ENOENT || r == -E2BIG || r == -EBADMSG)
|
||||
continue;
|
||||
|
||||
pwtest_neg_errno_ok(r);
|
||||
spa_scnprintf(buffer, sizeof(buffer), "%.*s", (int) l, d);
|
||||
if (strstr(buffer, needle)) {
|
||||
|
|
Loading…
Reference in a new issue