From bcaa6af849c72f86323f63bdb433634e5f840c09 Mon Sep 17 00:00:00 2001 From: Kamalesh Babulal Date: Thu, 28 Mar 2024 11:37:09 +0530 Subject: [PATCH] ftests/009: add cpu controller format (v2) 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:36:32 Passed: 1 test(s) Skipped: 0 test(s) Failed: 0 test(s) ----------------------------------------------------------------- Timing Results: Test Time (sec) -------------------------------------------------- setup 0.00 009-cgget-g_flag_controller_only.py 0.10 teardown 0.00 -------------------------------------------------- Total Run Time 0.10 Signed-off-by: Kamalesh Babulal Signed-off-by: Tom Hromatka --- .../009-cgget-g_flag_controller_only.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/ftests/009-cgget-g_flag_controller_only.py b/tests/ftests/009-cgget-g_flag_controller_only.py index 5997307e..e734b745 100755 --- a/tests/ftests/009-cgget-g_flag_controller_only.py +++ b/tests/ftests/009-cgget-g_flag_controller_only.py @@ -118,6 +118,26 @@ EXPECTED_OUT_V2 = [ cpu.max.burst: 0 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 + '''009cgget: + 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''' ] -- 2.47.2