[systemd-commits] 2 commits - src/test
Thomas H.P. Andersen
phomes at kemper.freedesktop.org
Tue Sep 30 14:41:12 PDT 2014
src/test/test-date.c | 6 ++++--
src/test/test-fileio.c | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
New commits:
commit 2b01a801f6c597a60a1e622978bf7ac0105b9666
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date: Tue Sep 30 23:37:10 2014 +0200
test-fileio: Remove dead check
t cannot be null here
diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c
index 1b99828..ad65abf 100644
--- a/src/test/test-fileio.c
+++ b/src/test/test-fileio.c
@@ -258,7 +258,7 @@ static void test_status_field(void) {
assert_se(safe_atollu(s, &buffers) == 0);
}
- if (p && t)
+ if (p)
assert(buffers < total);
/* Seccomp should be a good test for field full of zeros. */
commit 14c35ce7c1b9649bef14efeb3121660e541dd97a
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date: Tue Sep 30 23:30:30 2014 +0200
test-date: don't fail test if log_max_level is higher than LOG_INFO
diff --git a/src/test/test-date.c b/src/test/test-date.c
index 0586b78..00b5690 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);
}
More information about the systemd-commits
mailing list