selftests/cgroup: Adjust cpu.max quota based on HZ
PATCH 1/1 selftests/cgroup: Adjust cpu.max quota based on HZ
For lower HZ values a quota of 1000us is much lower than the amount of microseconds per tick which makes the test_cpucg_max and test_cpugc_max_nested fail. Use the amount of microseconds per tick as the quota value.
Signed-off-by Joe Simmons-Talbott <[email protected]>
--- tools/testing/selftests/cgroup/test_cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/cgroup/test_cpu.c +2 -2
@@ -646,7 +646,7 @@ test_cpucg_nested_weight_underprovisioned(const char *root)static int test_cpucg_max (const char *root) {int ret =KSFT_FAIL ; -long quota_usec =1000 ; +long quota_usec =USEC_PER_SEC /sysconf (_SC_CLK_TCK);long default_period_usec =100000 ;/* cpu.max's default period */ long duration_seconds =1 ;
@@ -710,7 +710,7 @@ static int test_cpucg_max(const char *root)static int test_cpucg_max_nested (const char *root) {int ret =KSFT_FAIL ; -long quota_usec =1000 ; +long quota_usec =USEC_PER_SEC /sysconf (_SC_CLK_TCK);long default_period_usec =100000 ;/* cpu.max's default period */ long duration_seconds =1 ;
Signature · 1 line
2.54.0