summaryrefslogtreecommitdiff
path: root/src/test/test-netlink-manual.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-netlink-manual.c
parentc1cd674357f921136b1e74ece641288670de33c7 (diff)
downloadsystemd-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.c7
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);