summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/cgroup/test_memcontrol.c
diff options
context:
space:
mode:
authorTianchen Ding <dtcccc@linux.alibaba.com>2024-03-27 05:44:37 +0300
committerTejun Heo <tj@kernel.org>2024-04-03 22:42:13 +0300
commit4793cb599b1bdc3d356f0374c2c99ffe890ae876 (patch)
tree9c3e0e58082806555b2a4cf7afa69cdaaa5f825e /tools/testing/selftests/cgroup/test_memcontrol.c
parent20d46283f5d679338ec2bbd734f46f900557fb97 (diff)
downloadlinux-4793cb599b1bdc3d356f0374c2c99ffe890ae876.tar.xz
selftests: cgroup: skip test_cgcore_lesser_ns_open when cgroup2 mounted without nsdelegate
The test case test_cgcore_lesser_ns_open only tasks effect when cgroup2 is mounted with "nsdelegate" mount option. If it misses this option, or is remounted without "nsdelegate", the test case will fail. For example, running bpf/test_cgroup_storage first, and then run cgroup/test_core will fail on test_cgcore_lesser_ns_open. Skip it if "nsdelegate" is not detected in cgroup2 mount options. Fixes: bf35a7879f1d ("selftests: cgroup: Test open-time cgroup namespace usage for migration checks") Signed-off-by: Tianchen Ding <dtcccc@linux.alibaba.com> Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'tools/testing/selftests/cgroup/test_memcontrol.c')
-rw-r--r--tools/testing/selftests/cgroup/test_memcontrol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/cgroup/test_memcontrol.c b/tools/testing/selftests/cgroup/test_memcontrol.c
index c7c9572003a8..b462416b3806 100644
--- a/tools/testing/selftests/cgroup/test_memcontrol.c
+++ b/tools/testing/selftests/cgroup/test_memcontrol.c
@@ -1314,7 +1314,7 @@ int main(int argc, char **argv)
char root[PATH_MAX];
int i, proc_status, ret = EXIT_SUCCESS;
- if (cg_find_unified_root(root, sizeof(root)))
+ if (cg_find_unified_root(root, sizeof(root), NULL))
ksft_exit_skip("cgroup v2 isn't mounted\n");
/*