From: Kamalesh Babulal Date: Sat, 2 May 2026 11:40:48 +0000 (+0530) Subject: tests/ftests: cover cpu.idle passthrough abstraction X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a19dc0d3975d536fa08dbbc7e3ad121bb90a13a6;p=thirdparty%2Flibcgroup.git tests/ftests: cover cpu.idle passthrough abstraction Extend sudo cgxset/cgxget cpu conversion tests (069/070) with cpu.idle read/write checks in both cgroup v1/v2. Rows are optional and skipped only for known unsupported-setting errors, preserving portability across kernels that do not expose cpu.idle. Signed-off-by: Kamalesh Babulal Signed-off-by: Tom Hromatka (Oracle) --- diff --git a/tests/ftests/069-sudo-systemd_cgxget-cpu-settings-v1.py b/tests/ftests/069-sudo-systemd_cgxget-cpu-settings-v1.py index ab1140c7..a0a8e3aa 100755 --- a/tests/ftests/069-sudo-systemd_cgxget-cpu-settings-v1.py +++ b/tests/ftests/069-sudo-systemd_cgxget-cpu-settings-v1.py @@ -68,6 +68,15 @@ TABLE = [ 'cpu.max.burst', '7000', CGRP_VER_V2, True], ['cpu.max.burst', '8000', CGRP_VER_V2, 'cpu.cfs_burst_us', '8000', CGRP_VER_V1, True], + + ['cpu.idle', '1', CGRP_VER_V1, + 'cpu.idle', '1', CGRP_VER_V1, True], + ['cpu.idle', '0', CGRP_VER_V1, + 'cpu.idle', '0', CGRP_VER_V2, True], + ['cpu.idle', '1', CGRP_VER_V2, + 'cpu.idle', '1', CGRP_VER_V2, True], + ['cpu.idle', '0', CGRP_VER_V2, + 'cpu.idle', '0', CGRP_VER_V1, True], ] diff --git a/tests/ftests/070-sudo-systemd_cgxget-cpu-settings-v2.py b/tests/ftests/070-sudo-systemd_cgxget-cpu-settings-v2.py index 0db2c39b..46ae985b 100755 --- a/tests/ftests/070-sudo-systemd_cgxget-cpu-settings-v2.py +++ b/tests/ftests/070-sudo-systemd_cgxget-cpu-settings-v2.py @@ -68,6 +68,15 @@ TABLE = [ 'cpu.max.burst', '7000', CGRP_VER_V2, True], ['cpu.max.burst', '8000', CGRP_VER_V2, 'cpu.cfs_burst_us', '8000', CGRP_VER_V1, True], + + ['cpu.idle', '1', CGRP_VER_V1, + 'cpu.idle', '1', CGRP_VER_V1, True], + ['cpu.idle', '0', CGRP_VER_V1, + 'cpu.idle', '0', CGRP_VER_V2, True], + ['cpu.idle', '1', CGRP_VER_V2, + 'cpu.idle', '1', CGRP_VER_V2, True], + ['cpu.idle', '0', CGRP_VER_V2, + 'cpu.idle', '0', CGRP_VER_V1, True], ]