summaryrefslogtreecommitdiffstats
path: root/src/test/test-bpf-devices.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-11-11 21:04:25 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-11-11 21:05:08 +0100
commit26444635eabf481dfa05d18cc552cb90a6885a54 (patch)
tree7224fe17e6635559462b87b541c41fc170c88718 /src/test/test-bpf-devices.c
parentbpf: make sure the kernel do not submit an invalid program if no pattern matched (diff)
downloadsystemd-26444635eabf481dfa05d18cc552cb90a6885a54.tar.xz
systemd-26444635eabf481dfa05d18cc552cb90a6885a54.zip
test-bpf-devices: skip test on !unified
The code in cgroup.c has support for all hierarchies, but the test, as written, will only work on unified. Since the test is really about bpf code, and not the legacy devices controller, let's just skip the test.
Diffstat (limited to 'src/test/test-bpf-devices.c')
-rw-r--r--src/test/test-bpf-devices.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test-bpf-devices.c b/src/test/test-bpf-devices.c
index aaa2c3ce3a..1322af4812 100644
--- a/src/test/test-bpf-devices.c
+++ b/src/test/test-bpf-devices.c
@@ -263,6 +263,10 @@ int main(int argc, char *argv[]) {
rl.rlim_cur = rl.rlim_max = MAX(rl.rlim_max, CAN_MEMLOCK_SIZE);
(void) setrlimit(RLIMIT_MEMLOCK, &rl);
+ r = cg_all_unified();
+ if (r <= 0)
+ return log_tests_skipped("We don't seem to be running with unified cgroup hierarchy");
+
if (!can_memlock())
return log_tests_skipped("Can't use mlock()");