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.hroma...@oracle.com>
---
 ftests/005-cgsnapshot-basic_snapshot_v2.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ftests/005-cgsnapshot-basic_snapshot_v2.py 
b/ftests/005-cgsnapshot-basic_snapshot_v2.py
index 1efab422a247..d99eaea1e308 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"
 
-- 
2.26.3



_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to