The strtok logic in cgset was incompatible with settings that had an '=' sign in the value field of the name/value pair. While somewhat uncommon, this is required for some settings in the rdma cgroup v1 controller and the io cgroup v2 controller (and possibly elsewhere.)
This patchset adds support for '=' in the value field and creates a cgset testing library that will be used by gunit to verify this functionality. Thanks to github user @santiagorr for reporting this bug. Code is available here: https://github.com/drakenclimber/libcgroup/tree/issues/fixcgset Tests are available here: https://github.com/drakenclimber/libcgroup-tests/tree/issues/fixcgset Automated test results are here: https://github.com/drakenclimber/libcgroup/runs/2239041068 Code coverage increased from 50.2% to 50.4%: https://coveralls.io/builds/38396930/source?filename=src%2Ftools%2Fcgset.c#L76 Tom Hromatka (4): cgset: Refactor parsing of the '-r' flag cgset: Fix parsing of name/values with an '=' in the value tools: Create a cgset library for testing purposes cgset: Declare parse_r_flag() as STATIC src/tools/Makefile.am | 8 +++- src/tools/cgset.c | 79 +++++++++++++++++++++++++++------------- src/tools/tools-common.h | 16 ++++++++ 3 files changed, 77 insertions(+), 26 deletions(-) -- 2.26.2 _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel