]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests/030: teach parsing v6.12 memory isolation
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Sun, 29 Sep 2024 09:18:03 +0000 (14:48 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Wed, 2 Oct 2024 15:26:15 +0000 (09:26 -0600)
Starting v6.12 memory code is split into v1 and v2 code, where v1 code
is only compiled when CONFIG_MEMCG_V1 is set. Which defaults to
disabled, teach the test case to ignore such failure.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
tests/ftests/030-lssubsys-lssubsys_all.py

index b24db21d50926d205ec69093613d746902b1d8d6..0a5e65f2b53122d34b04ad4daa60f6c57a60fd32 100755 (executable)
@@ -52,11 +52,13 @@ def test(config):
                 found = True
                 break
 
-        if not found and mount.controller == 'cpuset':
+        if not found and (mount.controller == 'cpuset' or
+                          mount.controller == 'memory'):
             kernel_ver = utils.get_kernel_version(config)
             if int(kernel_ver[0]) >= 6 and int(kernel_ver[1]) >= 12:
-                # Starting 6.12 cpuset is split into v1 and v2, where
-                # v1 is compiled only when CONFIG_CPUSET_V1 is enabled
+                # Starting 6.12 cpuset and memory split into v1 and v2,
+                # where v1 is compiled only when CONFIG_CPUSET_V1 and
+                # CONFIG_MEMCG_v1 is enabled respectively.
                 found = True
 
         if not found: