selftests: cgroup: Optionally set up v1 environment
authorMichal Koutný <mkoutny@suse.com>
Tue, 17 Jun 2025 13:36:55 +0000 (15:36 +0200)
committerTejun Heo <tj@kernel.org>
Tue, 17 Jun 2025 18:13:16 +0000 (08:13 -1000)
commitd74cd7864ffa6913f1d70f80858bd3fd19101cdf
tree02c97e3d494f34c6cd4b2b6507dec63ae4066490
parentdd7588e455f847d3b0108d9981b1fcff4441f77b
selftests: cgroup: Optionally set up v1 environment

Use the missing mount of the unifier hierarchy as a hint of legacy
system and prepare our own named v1 hierarchy for tests.

The code is only in test_core.c and not cgroup_util.c because other
selftests are related to controllers which will be exposed on v2
hierarchy but named hierarchies are only v1 thing.

Signed-off-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
tools/testing/selftests/cgroup/test_core.c