]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests/010: add cpu controller format (v2)
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Fri, 29 Mar 2024 07:18:59 +0000 (12:48 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Mon, 15 Apr 2024 19:10:41 +0000 (13:10 -0600)
Starting Linux Kernel version 6.0, the cpu controller cpu.stat (v2)
additionally displays force_idle statistics. It was introduced by
upstream commit 1fcf54deb767 ("sched/core: add forced idle accounting
for cgroups"). Append a new expected output with the field
'core_sched.force_idle_usec' to cgroup v2 valid output.

-----------------------------------------------------------------
Test Results:
        Run Date:                          Apr 03 15:48:51
        Passed:                                  1 test(s)
        Skipped:                                 0 test(s)
        Failed:                                  0 test(s)
-----------------------------------------------------------------
Timing Results:
        Test                                          Time (sec)
        --------------------------------------------------------
        setup                                               0.00
        010-cgget-g_flag_controller_and_cgroup.py           0.09
        teardown                                            0.00
        --------------------------------------------------------
        Total Run Time                                      0.09

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
tests/ftests/010-cgget-g_flag_controller_and_cgroup.py

index 469e3c64c5907eddcaf784f3d99c684a1656e19a..6533f2f1a32d0d67012b2e0fd6e4b4164aa25ee1 100755 (executable)
@@ -112,6 +112,25 @@ EXPECTED_OUT_V2 = [
     cpu.max: max 100000
     cpu.uclamp.min: 0.00
     cpu.uclamp.max: max''',
+    # with PSI, cfs_bandwidth with cpu.stat nr_busts, burst_time, force_idle
+    '''cpu.weight: 100
+    cpu.stat: usage_usec 0
+            user_usec 0
+            system_usec 0
+            core_sched.force_idle_usec 0
+            nr_periods 0
+            nr_throttled 0
+            throttled_usec 0
+            nr_bursts 0
+            burst_usec 0
+    cpu.weight.nice: 0
+    cpu.pressure: some avg10=0.00 avg60=0.00 avg300=0.00 total=0
+            full avg10=0.00 avg60=0.00 avg300=0.00 total=0
+    cpu.idle: 0
+    cpu.max.burst: 0
+    cpu.max: max 100000
+    cpu.uclamp.min: 0.00
+    cpu.uclamp.max: max'''
 ]