selftests: cgroup: skip test_cgcore_lesser_ns_open when cgroup2 mounted without nsdel...
authorTianchen Ding <dtcccc@linux.alibaba.com>
Wed, 27 Mar 2024 02:44:37 +0000 (10:44 +0800)
committerTejun Heo <tj@kernel.org>
Wed, 3 Apr 2024 19:42:13 +0000 (09:42 -1000)
commit4793cb599b1bdc3d356f0374c2c99ffe890ae876
tree9c3e0e58082806555b2a4cf7afa69cdaaa5f825e
parent20d46283f5d679338ec2bbd734f46f900557fb97
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>
tools/testing/selftests/cgroup/cgroup_util.c
tools/testing/selftests/cgroup/cgroup_util.h
tools/testing/selftests/cgroup/test_core.c
tools/testing/selftests/cgroup/test_cpu.c
tools/testing/selftests/cgroup/test_cpuset.c
tools/testing/selftests/cgroup/test_freezer.c
tools/testing/selftests/cgroup/test_hugetlb_memcg.c
tools/testing/selftests/cgroup/test_kill.c
tools/testing/selftests/cgroup/test_kmem.c
tools/testing/selftests/cgroup/test_memcontrol.c
tools/testing/selftests/cgroup/test_zswap.c