|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From 14c35ce7c1b9649bef14efeb3121660e541dd97a Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Date: Tue, 30 Sep 2014 23:30:30 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Subject: [PATCH] test-date: don't fail test if log_max_level is higher than
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
LOG_INFO
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
src/test/test-date.c | 6 ++++--
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
diff --git a/src/test/test-date.c b/src/test/test-date.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
index 0586b78b6d..00b569080c 100644
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
--- a/src/test/test-date.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+++ b/src/test/test-date.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -28,7 +28,8 @@ static void test_one(const char *p) {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
char buf[FORMAT_TIMESTAMP_MAX], buf_relative[FORMAT_TIMESTAMP_RELATIVE_MAX];
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
assert_se(parse_timestamp(p, &t) >= 0);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- log_info("%s", format_timestamp(buf, sizeof(buf), t));
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ format_timestamp(buf, sizeof(buf), t);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ log_info("%s", buf);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
/* Chop off timezone */
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
*strrchr(buf, ' ') = 0;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -36,7 +37,8 @@ static void test_one(const char *p) {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
assert_se(parse_timestamp(buf, &q) >= 0);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
assert_se(q == t);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- log_info("%s", strna(format_timestamp_relative(buf_relative, sizeof(buf_relative), t)));
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ format_timestamp_relative(buf_relative, sizeof(buf_relative), t);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ log_info("%s", strna(buf_relative));
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
assert_se(parse_timestamp(buf, &q) >= 0);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|