From 38df9f833ec9a7ed01fac17b0f52b83c7403583e Mon Sep 17 00:00:00 2001 From: Kamalesh Babulal Date: Mon, 4 May 2026 17:11:05 +0530 Subject: [PATCH] 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) --- .../069-sudo-systemd_cgxget-cpu-settings-v1.py | 13 +++++++++++++ .../070-sudo-systemd_cgxget-cpu-settings-v2.py | 13 +++++++++++++ 2 files changed, 26 insertions(+) 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], ] -- 2.47.3