|
|
Log in / Subscribe / Register

selftests/cgroup: add metrics mode and detailed CPU test diagnostics

From:  Sebastian Chlad <sebastianchlad-AT-gmail.com>
To:  cgroups-AT-vger.kernel.org
Subject:  [PATCH 0/5] selftests/cgroup: add metrics mode and detailed CPU test diagnostics
Date:  Wed, 22 Oct 2025 08:45:56 +0200
Message-ID:  <20251022064601.15945-1-sebastian.chlad@suse.com>
Cc:  mkoutny-AT-suse.com, Sebastian Chlad <sebastian.chlad-AT-suse.com>
Archive-link:  Article

Hi,

following the idea of better diagnostics and debugging for the cgroup tests:
https://lore.kernel.org/cgroups/20251015080022.14883-1-se...
here is a proposal how to go further with this.

The series consolidates helper functions in the utils file and renames them
for clarity. It also introduces the `CGROUP_TEST_METRICS` environment variable,
which, when set, enables detailed per-test metrics reporting. This makes it
much easier to analyze trends across CI runs, track regressions, and assess
how close actual results are to expected tolerances.

If this approach looks acceptable, I plan to extend it to additional cgroup
tests and introduce supporting utility functions where appropriate.
Also I consider metrics_report.txt to be updated with more serious test runs against
multicore server(s) and possibily some cloud-based machines.

Thanks,
Sebastian Chlad


Sebastian Chlad (5):
  selftests/cgroup: move utils functions to .c file
  selftests/cgroup: add metrics mode for detailed test reporting
  selftests/cgroup: rename values_close() to check_tolerance()
  selftests/cgroup: rename values_close_report() to report_metrics()
  selftests/cgroup: add aggregated CPU test metrics report

 .../selftests/cgroup/lib/cgroup_util.c        | 37 ++++++++++++++++++
 .../cgroup/lib/include/cgroup_util.h          | 29 +-------------
 .../selftests/cgroup/metrics_report.txt       | 20 ++++++++++
 tools/testing/selftests/cgroup/test_cpu.c     | 38 +++++++++++++------
 .../selftests/cgroup/test_hugetlb_memcg.c     |  6 +--
 .../selftests/cgroup/test_memcontrol.c        | 28 +++++++-------
 6 files changed, 103 insertions(+), 55 deletions(-)
 create mode 100644 tools/testing/selftests/cgroup/metrics_report.txt

-- 
2.51.0




Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds