From: Kamalesh Babulal Date: Mon, 4 May 2026 11:41:05 +0000 (+0530) Subject: tests/ftests: cover cpu.uclamp.min/max passthrough abstractions X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;p=thirdparty%2Flibcgroup.git tests/ftests: cover cpu.uclamp.min/max passthrough abstractions Extend sudo cgxset/cgxget cpu conversion tests (069/070) with uclamp min/max checks across v1 and v2 conversion paths. Rows are optional and skipped only when the kernel does not expose the requested uclamp file, preserving compatibility on older environments. 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 a0a8e3aa..40945d26 100755 --- a/tests/ftests/069-sudo-systemd_cgxget-cpu-settings-v1.py +++ b/tests/ftests/069-sudo-systemd_cgxget-cpu-settings-v1.py @@ -77,6 +77,19 @@ TABLE = [ 'cpu.idle', '1', CGRP_VER_V2, True], ['cpu.idle', '0', CGRP_VER_V2, 'cpu.idle', '0', CGRP_VER_V1, True], + + ['cpu.uclamp.min', '50.00', CGRP_VER_V1, + 'cpu.uclamp.min', '50.00', CGRP_VER_V1, True], + ['cpu.uclamp.min', '60.00', CGRP_VER_V1, + 'cpu.uclamp.min', '60.00', CGRP_VER_V2, True], + ['cpu.uclamp.min', '70.00', CGRP_VER_V2, + 'cpu.uclamp.min', '70.00', CGRP_VER_V1, True], + ['cpu.uclamp.max', '90.00', CGRP_VER_V1, + 'cpu.uclamp.max', '90.00', CGRP_VER_V1, True], + ['cpu.uclamp.max', '80.00', CGRP_VER_V1, + 'cpu.uclamp.max', '80.00', CGRP_VER_V2, True], + ['cpu.uclamp.max', '70.00', CGRP_VER_V2, + 'cpu.uclamp.max', '70.00', 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 46ae985b..d86addbc 100755 --- a/tests/ftests/070-sudo-systemd_cgxget-cpu-settings-v2.py +++ b/tests/ftests/070-sudo-systemd_cgxget-cpu-settings-v2.py @@ -77,6 +77,19 @@ TABLE = [ 'cpu.idle', '1', CGRP_VER_V2, True], ['cpu.idle', '0', CGRP_VER_V2, 'cpu.idle', '0', CGRP_VER_V1, True], + + ['cpu.uclamp.min', '50.00', CGRP_VER_V1, + 'cpu.uclamp.min', '50.00', CGRP_VER_V1, True], + ['cpu.uclamp.min', '60.00', CGRP_VER_V1, + 'cpu.uclamp.min', '60.00', CGRP_VER_V2, True], + ['cpu.uclamp.min', '70.00', CGRP_VER_V2, + 'cpu.uclamp.min', '70.00', CGRP_VER_V1, True], + ['cpu.uclamp.max', '90.00', CGRP_VER_V1, + 'cpu.uclamp.max', '90.00', CGRP_VER_V1, True], + ['cpu.uclamp.max', '80.00', CGRP_VER_V1, + 'cpu.uclamp.max', '80.00', CGRP_VER_V2, True], + ['cpu.uclamp.max', '70.00', CGRP_VER_V2, + 'cpu.uclamp.max', '70.00', CGRP_VER_V1, True], ]