chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update TODO
[elogind.git]
/
src
/
journal
/
test-journal-flush.c
diff --git
a/src/journal/test-journal-flush.c
b/src/journal/test-journal-flush.c
index 0ca24e0cb5a971d0aa78080cc77f7ff0273669f0..914ca0b4d1da1313078d5090c5b7bf0e986e75b8 100644
(file)
--- a/
src/journal/test-journal-flush.c
+++ b/
src/journal/test-journal-flush.c
@@
-22,6
+22,7
@@
#include <fcntl.h>
#include "sd-journal.h"
#include <fcntl.h>
#include "sd-journal.h"
+#include "macro.h"
#include "journal-file.h"
#include "journal-internal.h"
#include "journal-file.h"
#include "journal-internal.h"
@@
-39,8
+40,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);
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);
r = sd_journal_open(&j, 0);
assert_se(r >= 0);
@@
-51,13
+50,13
@@
int main(int argc, char *argv[]) {
JournalFile *f;
f = j->current_file;
JournalFile *f;
f = j->current_file;
- assert(f && f->current_offset > 0);
+ assert
_se
(f && f->current_offset > 0);
r = journal_file_move_to_object(f, OBJECT_ENTRY, f->current_offset, &o);
r = journal_file_move_to_object(f, OBJECT_ENTRY, f->current_offset, &o);
- assert(r >= 0);
+ assert
_se
(r >= 0);
r = journal_file_copy_entry(f, new_journal, o, f->current_offset, NULL, NULL, NULL);
r = journal_file_copy_entry(f, new_journal, o, f->current_offset, NULL, NULL, NULL);
- assert(r >= 0);
+ assert
_se
(r >= 0);
n++;
if (n > 10000)
n++;
if (n > 10000)
@@
-68,6
+67,7
@@
int main(int argc, char *argv[]) {
journal_file_close(new_journal);
journal_file_close(new_journal);
+ unlink(fn);
assert_se(rmdir(dn) == 0);
return 0;
assert_se(rmdir(dn) == 0);
return 0;