]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests/030: teach parsing v6.12 cpuset isolation
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Sat, 28 Sep 2024 09:14:58 +0000 (14:44 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Wed, 2 Oct 2024 15:25:55 +0000 (09:25 -0600)
Starting v6.12 cpuset code is split into v1 and v2 code, where v1 code
is only compiled when CONFIG_CPUSET_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 c83587d83dcba5f659f6a0138586ea4525e59400..b24db21d50926d205ec69093613d746902b1d8d6 100755 (executable)
@@ -10,6 +10,7 @@
 from cgroup import Cgroup
 import consts
 import ftests
+import utils
 import sys
 import os
 
@@ -51,6 +52,13 @@ def test(config):
                 found = True
                 break
 
+        if not found and mount.controller == 'cpuset':
+            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
+                found = True
+
         if not found:
             result = consts.TEST_FAILED
             cause = (