Commit Graph
3 Commits
Author SHA1 Message Date
Michal Koutný 0925275a17 selftests: cgroup_util: Add helpers for testing named v1 hierarchies
Non-functional change, the control variable will be wired in a separate
commit.

Signed-off-by: Michal Koutný <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
2025-06-17 08:13:01 -10:00
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
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 <[email protected]>
Signed-off-by: James Houghton <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
2025-05-16 11:45:15 -07:00