summaryrefslogtreecommitdiff
path: root/src/test/test-log.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-08-03 16:09:52 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-08-07 08:50:27 +0200
commit169d980bc86ccec7923578bf12cab23178dfa1de (patch)
treec7f8be892965f4c2be946c2ae1b0d5bce2d6d45e /src/test/test-log.c
parent700ea5048266ae0c0783bc6127adf531be2f871a (diff)
downloadsystemd-169d980bc86ccec7923578bf12cab23178dfa1de.tar.gz
test-log: move logging call where we can still see it
We crank the level up in the loop, so we wouldn't see message from log_info_errno(). Also move the loop iterator declaration inline.
Diffstat (limited to 'src/test/test-log.c')
-rw-r--r--src/test/test-log.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/test/test-log.c b/src/test/test-log.c
index 861309eb3a..de8399dea8 100644
--- a/src/test/test-log.c
+++ b/src/test/test-log.c
@@ -66,11 +66,11 @@ static void test_log_syntax(void) {
}
int main(int argc, char* argv[]) {
- int target;
-
test_file();
- for (target = 0; target < _LOG_TARGET_MAX; target++) {
+ assert_se(log_info_errno(SYNTHETIC_ERRNO(EUCLEAN), "foo") == -EUCLEAN);
+
+ for (int target = 0; target < _LOG_TARGET_MAX; target++) {
log_set_target(target);
log_open();
@@ -79,7 +79,5 @@ int main(int argc, char* argv[]) {
test_log_syntax();
}
- assert_se(log_info_errno(SYNTHETIC_ERRNO(EUCLEAN), "foo") == -EUCLEAN);
-
return 0;
}