]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
gunit/test-012: Create subtree_control for leaf cgroup
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Tue, 20 Dec 2022 16:09:13 +0000 (21:39 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Fri, 6 Jan 2023 15:07:27 +0000 (08:07 -0700)
commitc567528cdb9c8394c9c61c906e68daa0d91a80d8
tree0e0a3e358c423520df9e3653b95b11956f4f6431
parent39012eeefa454e09fc4192cacddb508ee00abee6
gunit/test-012: Create subtree_control for leaf cgroup

The test case relies on the parent cgroup's subtree_control file, while
creating a cgroup to verify the controllers enabled in created cgroup v2
and the current code cleverly emulates it.  With the change to enable
the controller at the leaf cgroup this emulation gets difficult, so
introduce a dummy cgroup v2 mount that will help in the construction of
the path when the cgroup v2 is created with the empty controller because
the brilliance lies in emulating it by manually creating the
subtree_control file to give the impression of enabling the controller
in the cgroup v2 cgroup.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
tests/gunit/012-cgroup_create_cgroup.cpp