]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
gunit/012: populate root_cgroup.controllers file
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Mon, 16 Oct 2023 08:43:56 +0000 (14:13 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Wed, 25 Oct 2023 20:23:20 +0000 (14:23 -0600)
commitb1c1bb5e83d0cec2a941622cad1cd471ff22b551
treee5a5765a96782c0af2b947cf4930d098ecf3e5e5
parent539d07eae4d5963c3bddd821f7c5f02db2476741
gunit/012: populate root_cgroup.controllers file

To enable a controller in a cgroup, its parent's subtree_control file is
read to check if the controller is enabled, if not enabled, parent's
cgroup.controllers is checked for the supported controllers, before
enabling it in the cgroup.subtree_control.

Populate controllers in the root_cgroup.controllers file, to help with
the check for supported controllers, without this
cgroupv2_subtree_control_recursive() will fail, when it is checked for
controller existence.

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