From: Sebastian Chlad <sebastianchlad@gmail.com>
To: cgroups@vger.kernel.org
Cc: mkoutny@suse.com, Sebastian Chlad <sebastian.chlad@suse.com>
Subject: [PATCH v3 0/2] selftests: cgroup: improve diagnostics for CPU test failures
Date: Wed, 15 Oct 2025 12:33:55 +0200 [thread overview]
Message-ID: <20251015103358.1708-1-sebastian.chlad@suse.com> (raw)
In-Reply-To: <20251015080022.14883-1-sebastian.chlad@suse.com>
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_report()`,
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.
Changes since v1:
- Rename values_close_assert() -> values_close_report()
- Remove braces around single-line fprintf()
Changes since v2:
- sorry, I forgot to amend the git commit messages, so corrected here
Thanks,
SebChlad
Sebastian Chlad (2):
selftests: cgroup: add values_close_report helper
selftests: cgroup: Use values_close_report in test_cpu
.../cgroup/lib/include/cgroup_util.h | 20 +++++++++++++++++++
tools/testing/selftests/cgroup/test_cpu.c | 18 ++++++++---------
2 files changed, 29 insertions(+), 9 deletions(-)
--
2.51.0
next prev parent reply other threads:[~2025-10-15 10:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Sebastian Chlad [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251015103358.1708-1-sebastian.chlad@suse.com \
--to=sebastianchlad@gmail.com \
--cc=cgroups@vger.kernel.org \
--cc=mkoutny@suse.com \
--cc=sebastian.chlad@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox