diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-10-24 16:53:14 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-10-24 19:40:24 +0200 |
commit | 5f00dc4df6d036ab86f402830bdeed14659bf1ea (patch) | |
tree | 580cab47134c7980becceb0c052bd2404b5a7ed1 /src/test/test-seccomp.c | |
parent | a4bc3c1d250a7a751baacbc5a61975aa1dd6d3d5 (diff) | |
download | systemd-5f00dc4df6d036ab86f402830bdeed14659bf1ea.tar.gz |
test: skip various tests if namespacing is not available
Apparently on Debian LXC/AppArmor doesn't allow namespacing to container
payloads. Deal with it.
Fixes: #9700
Diffstat (limited to 'src/test/test-seccomp.c')
-rw-r--r-- | src/test/test-seccomp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/test-seccomp.c b/src/test/test-seccomp.c index 00cd216a4b..fbfeedd536 100644 --- a/src/test/test-seccomp.c +++ b/src/test/test-seccomp.c @@ -178,6 +178,11 @@ static void test_restrict_namespace(void) { unsigned long ul; pid_t pid; + if (!have_namespaces()) { + log_notice("Testing without namespaces, skipping %s", __func__); + return; + } + log_info("/* %s */", __func__); assert_se(namespace_flags_to_string(0, &s) == 0 && streq(s, "")); |