From: Tom Hromatka Date: Wed, 2 Jun 2021 13:58:53 +0000 (+0000) Subject: ftests: Modify functional test 005 to support cgroup v2 X-Git-Tag: v3.1.0~308^2~2^2~114^2~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e99444e282b1987db789d656b8d2aa6ba025aab4;p=thirdparty%2Flibcgroup.git ftests: Modify functional test 005 to support cgroup v2 Add support for a full cgroup v2 system to the 005-cgsnapshot-basic_snapshot_v2.py functional test. It continues to support cgroup v1 systems and mixed systems as well. Signed-off-by: Tom Hromatka --- diff --git a/ftests/005-cgsnapshot-basic_snapshot_v2.py b/ftests/005-cgsnapshot-basic_snapshot_v2.py index 1efab422..d99eaea1 100755 --- a/ftests/005-cgsnapshot-basic_snapshot_v2.py +++ b/ftests/005-cgsnapshot-basic_snapshot_v2.py @@ -56,7 +56,8 @@ def test(config): expected = Cgroup.snapshot_to_dict(CGSNAPSHOT) actual = Cgroup.snapshot(config, controller=CONTROLLER) - if expected[CGNAME] != actual[CGNAME]: + if expected[CGNAME].controllers[CONTROLLER] != \ + actual[CGNAME].controllers[CONTROLLER]: result = consts.TEST_FAILED cause = "Expected cgsnapshot result did not equal actual cgsnapshot"