diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-09-12 13:25:45 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-09-13 12:07:34 +0200 |
commit | 08d541ca06c75c8539206c60eba975fb3ecd6460 (patch) | |
tree | 59fb44e75054adecadcf80dda43310ad3043b0ec /src/test/test-boot-timestamps.c | |
parent | meson: disable _all_ tests when -Dtests=false (diff) | |
download | systemd-08d541ca06c75c8539206c60eba975fb3ecd6460.tar.xz 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.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/test/test-boot-timestamps.c b/src/test/test-boot-timestamps.c index ef39304b9f..e7deee5d5f 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; } |