This patchset adds cgroup v2 support to the functional tests. Note that Travis CI doesn't provide a VM image with cgroup v2 on by default (e.g. Fedora), and Travis doesn't allow modifying the kernel boot parameters.
So to get this initial round of cgroup v2 functional test support working, I unmount the cgroup v1 cpuset controller, wait a bit, then add it to the cgroup v2 subtree control file. These gory details are hidden in the .travis.yml file though, so if/when a real v2 test system is available, the functional tests should remain largely unchanged. Changes from v1 to v2: * Rather than test both cgroup v1 and v2 in test 001, I made test 001 explicitly cgroup v1 and added test 003 for cgroup v2 The Travis CI changes associated with this patchset are available here: https://github.com/drakenclimber/libcgroup/tree/issues/ftests_cgv2 This test code is available here: https://github.com/drakenclimber/libcgroup-tests/tree/issues/ftests_cgv2 Automated test results passed and are available here: https://github.com/drakenclimber/libcgroup/runs/1419660949 Code coverage increased by 2.9% to 25.2%: https://coveralls.io/builds/35066937 Tom Hromatka (12): ftests: Remove unused config files ftests: Add symlink to sed ftests: Increase the display width for printing test results ftests: Cleanup printing of test timing ftests: Add a method to get a controller's cgroup version ftests: Add support for cgclassify to Cgroup class ftests: Add support for shell commands in containers ftests: Add class to create and manage child processes ftests: Run a cgv1 process in the recursive cgdelete test ftests: Fix config typo in test 001 ftests: Rename Test 001 to denote it is cgroup v1 only ftests: Add a cgroup v2 basic cgget test ...c_cgget.py => 001-cgget-basic_cgget_v1.py} | 17 +++- ftests/002-cgdelete-recursive_delete.py | 12 +++ ftests/003-cgget-basic_cgget_v2.py | 81 +++++++++++++++++++ ftests/Makefile.am | 5 +- ftests/cgroup.py | 47 ++++++++++- ftests/consts.py | 4 - ftests/container.py | 4 +- ftests/default.conf | 28 ------- ftests/ftests.py | 33 +++++--- ftests/process.py | 78 ++++++++++++++++++ 10 files changed, 258 insertions(+), 51 deletions(-) rename ftests/{001-cgget-basic_cgget.py => 001-cgget-basic_cgget_v1.py} (78%) create mode 100755 ftests/003-cgget-basic_cgget_v2.py delete mode 100644 ftests/default.conf create mode 100644 ftests/process.py -- 2.25.4 _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel