On full cgroup v2 systems, skip 031-lscgroup-g_flag.py
due to Github Issue #50.  Currently lscgroup is doing path matching
on the mounts that have the same path as the cgroup rather than
reading cgroup.controllers for that particular cgroup.  I'm afraid
fixing it could involve a non-trivial rewrite of lscgroup since it
doesn't use any of the common structures used elsewhere in libcgroup.

Signed-off-by: Tom Hromatka <tom.hroma...@oracle.com>
---
 ftests/031-lscgroup-g_flag.py | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/ftests/031-lscgroup-g_flag.py b/ftests/031-lscgroup-g_flag.py
index 2f9b5d01f4f6..0b9dbc72f2cb 100755
--- a/ftests/031-lscgroup-g_flag.py
+++ b/ftests/031-lscgroup-g_flag.py
@@ -50,6 +50,21 @@ def prereqs(config):
     result = consts.TEST_PASSED
     cause = None
 
+    v2_cnt = 0
+    mount_list = Cgroup.get_cgroup_mounts(config)
+
+    for mount in mount_list:
+        if mount.version == CgroupVersion.CGROUP_V2:
+            v2_cnt += 1
+
+    if v2_cnt > 1:
+        # There is a bug in lscgroup - see issue #50 - where it doesn't
+        # properly list the enabled controllers for a cgroup v2 cgroup.
+        # Skip this test because of this
+        result = consts.TEST_SKIPPED
+        cause = "See Github Issue #50 - lscgroup lists controllers..."
+        return result, cause
+
     return result, cause
 
 def setup(config):
-- 
2.31.1



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

Reply via email to