1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-24 14:50:17 +03:00

test-journal-flush: allow testing against specific files

>=0 → ==0 because sd_journal_open* are documented to return 0.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-11-26 09:40:51 +01:00
parent f6048e5e56
commit 0fa167cd58

View File

@ -29,8 +29,11 @@ int main(int argc, char *argv[]) {
r = journal_file_open(-1, fn, O_CREAT|O_RDWR, 0644, false, 0, false, NULL, NULL, NULL, NULL, &new_journal);
assert_se(r >= 0);
r = sd_journal_open(&j, 0);
assert_se(r >= 0);
if (argc > 1)
r = sd_journal_open_files(&j, (const char **) strv_skip(argv, 1), 0);
else
r = sd_journal_open(&j, 0);
assert_se(r == 0);
sd_journal_set_data_threshold(j, 0);