diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-09-13 13:34:12 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-09-14 09:29:57 +0200 |
commit | 317bb217d3f21312e58d9efdc6d3739f7895a08c (patch) | |
tree | 3915b40c31898e4b3b3e80406b9e53aa64446ac9 /src/test/test-netlink-manual.c | |
parent | c1cd674357f921136b1e74ece641288670de33c7 (diff) | |
download | systemd-317bb217d3f21312e58d9efdc6d3739f7895a08c.tar.gz |
tests: add helper to unify skipping a test and exiting
Diffstat (limited to 'src/test/test-netlink-manual.c')
-rw-r--r-- | src/test/test-netlink-manual.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/test-netlink-manual.c b/src/test/test-netlink-manual.c index e887a9a780..39826dfdb9 100644 --- a/src/test/test-netlink-manual.c +++ b/src/test/test-netlink-manual.c @@ -10,6 +10,7 @@ #include "macro.h" #include "module-util.h" +#include "tests.h" #include "util.h" static int load_module(const char *mod_name) { @@ -57,10 +58,8 @@ static int test_tunnel_configure(sd_netlink *rtnl) { return EXIT_TEST_SKIP; } - if (getuid() != 0) { - log_info("Skipping tests: not root"); - return EXIT_TEST_SKIP; - } + if (getuid() != 0) + return log_tests_skipped("not root"); /* IPIP tunnel */ assert_se(sd_rtnl_message_new_link(rtnl, &m, RTM_NEWLINK, 0) >= 0); |