summaryrefslogtreecommitdiff
path: root/src/journal/test-journal-flush.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-01-05 02:09:01 +0100
committerLennart Poettering <lennart@poettering.net>2015-01-05 02:57:36 +0100
commit2678031a179a9b91fc799f8ef951a548c66c4b49 (patch)
treeaf167864ad6f6110bb3a2343f8c58f0bfa53e07d /src/journal/test-journal-flush.c
parentaba843317d8acc4634417becebaedcfe5805d49d (diff)
journald: when we detect the journal file we are about to write to has been deleted, rotate
https://bugzilla.redhat.com/show_bug.cgi?id=1171719
Diffstat (limited to 'src/journal/test-journal-flush.c')
-rw-r--r--src/journal/test-journal-flush.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/journal/test-journal-flush.c b/src/journal/test-journal-flush.c
index 0ca24e0cb5..40ede4a926 100644
--- a/src/journal/test-journal-flush.c
+++ b/src/journal/test-journal-flush.c
@@ -39,8 +39,6 @@ int main(int argc, char *argv[]) {
r = journal_file_open(fn, O_CREAT|O_RDWR, 0644, false, false, NULL, NULL, NULL, &new_journal);
assert_se(r >= 0);
- unlink(fn);
-
r = sd_journal_open(&j, 0);
assert_se(r >= 0);
@@ -68,6 +66,7 @@ int main(int argc, char *argv[]) {
journal_file_close(new_journal);
+ unlink(fn);
assert_se(rmdir(dn) == 0);
return 0;