Commit Graph

2 Commits (46bcce5dfd330c233e59cd5efd7eb43f049b0a82)

Author SHA1 Message Date
Sean Christopherson 38e1dd5781 cgroup: selftests: Add API to find root of specific controller
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-16 11:45:15 -07:00
James Houghton 2c754a84ff cgroup: selftests: Move cgroup_util into its own library
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>
2025-05-16 11:45:15 -07:00