]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
tests/ftests: cover cpu.uclamp.min/max passthrough abstractions main
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Mon, 4 May 2026 11:41:05 +0000 (17:11 +0530)
committerTom Hromatka (Oracle) <tom.hromatka@gmail.com>
Tue, 26 May 2026 14:55:14 +0000 (08:55 -0600)
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 <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka (Oracle) <tom.hromatka@gmail.com>
tests/ftests/069-sudo-systemd_cgxget-cpu-settings-v1.py
tests/ftests/070-sudo-systemd_cgxget-cpu-settings-v2.py

index a0a8e3aa2ace27368a8fd19731dbe2212c9eb524..40945d266b6e05dc2a80b758ab4793d00bf57329 100755 (executable)
@@ -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],
 ]
 
 
index 46ae985b6ba3234b18d5e61f76e0e45c22346f53..d86addbcffe0a8513b51bafddeb8975a29660a71 100755 (executable)
@@ -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],
 ]