summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/cgroup/lib/cgroup_util.c
AgeCommit message (Collapse)Author
2025-05-16cgroup: selftests: Add API to find root of specific controllerSean Christopherson
Add an API in the cgroups library to find the root of a specific controller. KVM selftests will use the API to find the memory controller. Search for the controller on both v1 and v2 mounts, as KVM selftests' usage will be completely oblivious of v1 versus v2. Signed-off-by: James Houghton <jthoughton@google.com> Link: https://lore.kernel.org/r/20250508184649.2576210-6-jthoughton@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
2025-05-16cgroup: selftests: Move cgroup_util into its own libraryJames Houghton
KVM selftests will soon need to use some of the cgroup creation and deletion functionality from cgroup_util. Suggested-by: David Matlack <dmatlack@google.com> Signed-off-by: James Houghton <jthoughton@google.com> Acked-by: Tejun Heo <tj@kernel.org> Link: https://lore.kernel.org/r/20250508184649.2576210-5-jthoughton@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>