summaryrefslogtreecommitdiff
path: root/src/test/test-boot-timestamps.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-09-13 13:34:12 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-09-14 09:29:57 +0200
commit317bb217d3f21312e58d9efdc6d3739f7895a08c (patch)
tree3915b40c31898e4b3b3e80406b9e53aa64446ac9 /src/test/test-boot-timestamps.c
parentc1cd674357f921136b1e74ece641288670de33c7 (diff)
downloadsystemd-317bb217d3f21312e58d9efdc6d3739f7895a08c.tar.gz
tests: add helper to unify skipping a test and exiting
Diffstat (limited to 'src/test/test-boot-timestamps.c')
-rw-r--r--src/test/test-boot-timestamps.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/test/test-boot-timestamps.c b/src/test/test-boot-timestamps.c
index e7deee5d5f..578aa5b304 100644
--- a/src/test/test-boot-timestamps.c
+++ b/src/test/test-boot-timestamps.c
@@ -4,6 +4,7 @@
#include "boot-timestamps.h"
#include "efivars.h"
#include "log.h"
+#include "tests.h"
#include "util.h"
static int test_acpi_fpdt(void) {
@@ -91,10 +92,8 @@ int main(int argc, char* argv[]) {
r = test_boot_timestamps();
assert(r >= 0);
- 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);
+ if (p == 0 && q == 0 && r == 0)
+ return log_tests_skipped("access to firmware variables not possible");
- return any ? EXIT_SUCCESS : EXIT_TEST_SKIP;
+ return EXIT_SUCCESS;
}