summaryrefslogtreecommitdiff
path: root/src/journal/test-journal-verify.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-08-17 03:30:22 +0200
committerLennart Poettering <lennart@poettering.net>2012-08-17 03:30:22 +0200
commit6c7be122acd666d4e93541179d89747aa12efb67 (patch)
tree7c11b01dc0f418cafba78f6dd45376b703a6e083 /src/journal/test-journal-verify.c
parent356fe3e6c623c831050c835782aec9e50f6262ba (diff)
journal: after verification output validated time range
Diffstat (limited to 'src/journal/test-journal-verify.c')
-rw-r--r--src/journal/test-journal-verify.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/journal/test-journal-verify.c b/src/journal/test-journal-verify.c
index 9a99bcba4b..df0a5ddef9 100644
--- a/src/journal/test-journal-verify.c
+++ b/src/journal/test-journal-verify.c
@@ -36,6 +36,10 @@ int main(int argc, char *argv[]) {
unsigned n;
JournalFile *f;
const char *verification_key = argv[1];
+ usec_t from, to, total;
+ char a[FORMAT_TIMESTAMP_MAX];
+ char b[FORMAT_TIMESTAMP_MAX];
+ char c[FORMAT_TIMESPAN_MAX];
log_set_max_level(LOG_DEBUG);
@@ -71,7 +75,13 @@ int main(int argc, char *argv[]) {
journal_file_print_header(f);
- assert_se(journal_file_verify(f, verification_key) >= 0);
+ assert_se(journal_file_verify(f, verification_key, &from, &to, &total) >= 0);
+
+ log_info("=> Validated from %s to %s, %s missing",
+ format_timestamp(a, sizeof(a), from),
+ format_timestamp(b, sizeof(b), to),
+ format_timespan(c, sizeof(c), total > to ? total - to : 0));
+
journal_file_close(f);
log_info("Exiting...");