]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests: Modify functional test 005 to support cgroup v2
authorTom Hromatka <tom.hromatka@oracle.com>
Wed, 2 Jun 2021 13:58:53 +0000 (13:58 +0000)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 3 Jun 2021 15:39:11 +0000 (09:39 -0600)
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 <tom.hromatka@oracle.com>
ftests/005-cgsnapshot-basic_snapshot_v2.py

index 1efab422a247a251418c0ac1674ee56702d82b62..d99eaea1e3081114f19ce65ddbd56c4413c7b121 100755 (executable)
@@ -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"