On full cgroup v2 systems, skip 032-lscgroup-multiple_g_flags.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.hromatka@oracle.com>
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):