diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-12-01 22:35:16 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-12-02 09:50:00 -0500 |
commit | 8b3aa503c171acdb9ec63484a8c50e2680d31e79 (patch) | |
tree | 36228a7d30e678c07637c897d39bd6388f8f1ef9 /src/test/test-path.c | |
parent | ade61d3b488c4c8db841c08fd60d051d44b9977f (diff) |
tests: turn check if manager cannot be intialized into macro
We need to check the same thing in multiple tests. Use a shared
macro to make it easier to update the list of errnos.
Change the errno code for "unitialized cgroup fs" for ENOMEDIUM.
Exec format error looks like something more serious.
This fixes test-execute invocation in mock.
Diffstat (limited to 'src/test/test-path.c')
-rw-r--r-- | src/test/test-path.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test-path.c b/src/test/test-path.c index 8302bdd283..6e6a72d8dc 100644 --- a/src/test/test-path.c +++ b/src/test/test-path.c @@ -29,6 +29,7 @@ #include "rm-rf.h" #include "string-util.h" #include "strv.h" +#include "test-helper.h" #include "unit.h" #include "util.h" @@ -44,7 +45,7 @@ static int setup_test(Manager **m) { assert_se(m); r = manager_new(MANAGER_USER, true, &tmp); - if (IN_SET(r, -EPERM, -EACCES, -EADDRINUSE, -EHOSTDOWN, -ENOENT, -ENOEXEC)) { + if (MANAGER_SKIP_TEST(r)) { printf("Skipping test: manager_new: %s", strerror(-r)); return -EXIT_TEST_SKIP; } |