]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
test-010: add support for newer cpu.* output
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Tue, 19 Jul 2022 21:04:21 +0000 (15:04 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Tue, 19 Jul 2022 21:19:33 +0000 (15:19 -0600)
commit332c0a9769bb145d123fe524347a058604dec955
tree6c303809b88b28e0e6d6e4990030841f72090a1a
parent352a816dcd864e1fbeebdfd75b3c76b31c3efe31
test-010: add support for newer cpu.* output

With Ubuntu 5.15.0-1014 kernel, there are a few changes to the output
of cgget -g cpu:<cgroup> provides for both cgroup V1 and V2:
cgroup V1:
----------
- new stat files cpu.cfs_burst_us. cpu.idle

cgroup V2:
----------
- new stat files cpu.idle, cpu.max.burst

adopt these changes while looking for expected out based on the cgroup
version. Also, convert the expected out templates into per cgroup
version list[], making it easier to match using a for loop, instead of
nested if else. Using a list also makes it easier to append any new
changes to the output template.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
(cherry picked from commit cf0bd90e3d2f0cd30fd13602f814cbf05fa0d557)
ftests/010-cgget-g_flag_controller_and_cgroup.py