aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-09-12 13:25:45 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-09-13 12:07:34 +0200
commit08d541ca06c75c8539206c60eba975fb3ecd6460 (patch)
tree59fb44e75054adecadcf80dda43310ad3043b0ec /src/test/test-boot-timestamps.c
parentmeson: disable _all_ tests when -Dtests=false (diff)
downloadsystemd-08d541ca06c75c8539206c60eba975fb3ecd6460.tar.gz
systemd-08d541ca06c75c8539206c60eba975fb3ecd6460.tar.bz2
systemd-08d541ca06c75c8539206c60eba975fb3ecd6460.zip
test: when skipping tests, always print something
It is quite confusing if the test "fails" without printing anything at all. A typo in an 'if' statement is also fixed.
Diffstat (limited to 'src/test/test-boot-timestamps.c')
-rw-r--r--src/test/test-boot-timestamps.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/test/test-boot-timestamps.c b/src/test/test-boot-timestamps.c
index ef39304b9..e7deee5d5 100644
--- a/src/test/test-boot-timestamps.c
+++ b/src/test/test-boot-timestamps.c
@@ -91,5 +91,10 @@ int main(int argc, char* argv[]) {
r = test_boot_timestamps();
assert(r >= 0);
- return (p > 0 || q > 0 || r >> 0) ? EXIT_SUCCESS : EXIT_TEST_SKIP;
+ bool any = p > 0 || q > 0 || r > 0;
+ if (!any)
+ log_notice("%s: access to firmware variable not possible, skipping tests.",
+ program_invocation_short_name);
+
+ return any ? EXIT_SUCCESS : EXIT_TEST_SKIP;
}