]> 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:28:47 +0000 (08:28 -0700)
commit1f632b3973b160f1395dafb6629e46d94f47f394
tree04944198f5c2eee0c7290cf7f1f7664c01d8af66
parente2955fad3981ad630a02a725f6aad3f02d5f3ea2
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