Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cgroup: Handle trailing new line in cgroup.controllers
The last item in cgroup.controllers (misc or rdma in my case) contained a new line character which caused the controller search to fail. This commit avoids including the newline character inside the name comparison. The search failure caused the "cgroup_regression_test.sh" test to fail with a confusing error when it tries to mount a V1 subsys thus removing the V2 and causing the available set of V2s to change between scans. According to the V2 docs subsys names can only include lowercase characters and '_'. So we strictly look for those characters. The newline (and delimiting space) is just what the kernel currently prints. IDK if it is specified anywhere, but if it changes then the error should be obvious. Fixes: 310da37 ("Add new CGroups APIs") Signed-off-by: Richard Palethorpe <[email protected]> Reviewed-by: Petr Vorel <[email protected]> Reviewed-by: Marius Kittler <[email protected]>
- Loading branch information