Linux cgroups development
 help / color / mirror / Atom feed
* [PATCH 0/2] selftests: cgroup: improve diagnostics for CPU test failures
@ 2025-10-14 14:31 Sebastian Chlad
  2025-10-14 14:31 ` [PATCH 1/2] selftests: cgroup: add values_close_assert helper Sebastian Chlad
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Sebastian Chlad @ 2025-10-14 14:31 UTC (permalink / raw)
  To: cgroups; +Cc: mkoutny, Sebastian Chlad

Hi,

While running cgroup selftests under CI, the `test_cpu` tests sometimes fail
and it is impossible to tell how significant is the deviation. Often times the failures
are very marginal, but the existing output does not provide enough context to
understand how far the actual values were from the expected ones.

This is an initial idea to get this sorted by adding a new helper: `values_close_assert()`,
which prints detailed diagnostic information when two values differ by more than
a given tolerance.

This makes CI logs much more informative in the event of a close
failure without changing normal test behavior.
If the direction is fine, the next steps will be to extend this verbosity to additional
cgroup selftests for easier CI runs and debugging.

Thanks,
SebChlad

Sebastian Chlad (2):
  selftests: cgroup: add values_close_assert helper
  selftests: cgroup: Use values_close_assert in test_cpu

 .../cgroup/lib/include/cgroup_util.h          | 21 +++++++++++++++++++
 tools/testing/selftests/cgroup/test_cpu.c     | 18 ++++++++--------
 2 files changed, 30 insertions(+), 9 deletions(-)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-10-15 15:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-14 14:31 [PATCH 0/2] selftests: cgroup: improve diagnostics for CPU test failures Sebastian Chlad
2025-10-14 14:31 ` [PATCH 1/2] selftests: cgroup: add values_close_assert helper Sebastian Chlad
2025-10-14 19:32   ` Tejun Heo
2025-10-14 14:31 ` [PATCH 2/2] selftests: cgroup: Use values_close_assert in test_cpu Sebastian Chlad
2025-10-15  8:00 ` [PATCH v2 0/2] selftests: cgroup: improve diagnostics for CPU test failures Sebastian Chlad
2025-10-15  8:00   ` [PATCH v2 1/2] selftests: cgroup: add values_close_assert helper Sebastian Chlad
2025-10-15  8:00   ` [PATCH v2 2/2] selftests: cgroup: Use values_close_assert in test_cpu Sebastian Chlad
2025-10-15 10:33   ` [PATCH v3 0/2] selftests: cgroup: improve diagnostics for CPU test failures Sebastian Chlad
2025-10-15 10:33     ` [PATCH v3 1/2] selftests: cgroup: add values_close_report helper Sebastian Chlad
2025-10-15 10:33     ` [PATCH v3 2/2] selftests: cgroup: Use values_close_report in test_cpu Sebastian Chlad
2025-10-15 15:00     ` [PATCH v3 0/2] selftests: cgroup: improve diagnostics for CPU test failures Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox