diff options
author | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2014-09-30 23:30:30 +0200 |
---|---|---|
committer | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2014-09-30 23:40:40 +0200 |
commit | 14c35ce7c1b9649bef14efeb3121660e541dd97a (patch) | |
tree | b4570e94b8559f6ba3deaa58406e6c89a37053c2 /src/test | |
parent | 59ae3a957388bb057c3388ee288c8fc96c2b0098 (diff) | |
download | systemd-14c35ce7c1b9649bef14efeb3121660e541dd97a.tar.gz systemd-14c35ce7c1b9649bef14efeb3121660e541dd97a.tar.bz2 systemd-14c35ce7c1b9649bef14efeb3121660e541dd97a.zip |
test-date: don't fail test if log_max_level is higher than LOG_INFO
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-date.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/test-date.c b/src/test/test-date.c index 0586b78b6d..00b569080c 100644 --- a/src/test/test-date.c +++ b/src/test/test-date.c @@ -28,7 +28,8 @@ static void test_one(const char *p) { char buf[FORMAT_TIMESTAMP_MAX], buf_relative[FORMAT_TIMESTAMP_RELATIVE_MAX]; assert_se(parse_timestamp(p, &t) >= 0); - log_info("%s", format_timestamp(buf, sizeof(buf), t)); + format_timestamp(buf, sizeof(buf), t); + log_info("%s", buf); /* Chop off timezone */ *strrchr(buf, ' ') = 0; @@ -36,7 +37,8 @@ static void test_one(const char *p) { assert_se(parse_timestamp(buf, &q) >= 0); assert_se(q == t); - log_info("%s", strna(format_timestamp_relative(buf_relative, sizeof(buf_relative), t))); + format_timestamp_relative(buf_relative, sizeof(buf_relative), t); + log_info("%s", strna(buf_relative)); assert_se(parse_timestamp(buf, &q) >= 0); } |