]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
tests/ftests: cover cpu.idle passthrough abstraction
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Sat, 2 May 2026 11:40:48 +0000 (17:10 +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 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 <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 ab1140c7001db1bdbc8de2859995ccdc2403519a..a0a8e3aa2ace27368a8fd19731dbe2212c9eb524 100755 (executable)
@@ -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],
 ]
 
 
index 0db2c39bf180b049ab4ce7c6b1f02eccfa2251b8..46ae985b6ba3234b18d5e61f76e0e45c22346f53 100755 (executable)
@@ -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],
 ]