]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-bpf-devices: skip test on !unified 13994/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 11 Nov 2019 20:04:25 +0000 (21:04 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 11 Nov 2019 20:05:08 +0000 (21:05 +0100)
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.

src/test/test-bpf-devices.c

index aaa2c3ce3a4392c0b2c05db6503b1675d3e764b5..1322af48122397ad5486c0d8ed9496624dc70f74 100644 (file)
@@ -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()");