From: "Michal Koutný" <mkoutny@suse.com>
To: Shaojie Sun <sunshaojie@kylinos.cn>
Cc: tj@kernel.org, hannes@cmpxchg.org, shuah@kernel.org,
cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] selftests/cgroup: remove unused user_usec read in test_cpucg_nice
Date: Wed, 29 Jul 2026 13:58:10 +0200 [thread overview]
Message-ID: <amnqUlrPxhTobE1E@localhost.localdomain> (raw)
In-Reply-To: <20260729100451.689458-2-sunshaojie@kylinos.cn>
[-- Attachment #1: Type: text/plain, Size: 928 bytes --]
On Wed, Jul 29, 2026 at 06:04:50PM +0800, Shaojie Sun <sunshaojie@kylinos.cn> wrote:
> diff --git a/tools/testing/selftests/cgroup/test_cpu.c b/tools/testing/selftests/cgroup/test_cpu.c
> index 7a40d76b9548..fe637e1d2fcd 100644
> --- a/tools/testing/selftests/cgroup/test_cpu.c
> +++ b/tools/testing/selftests/cgroup/test_cpu.c
> @@ -289,7 +289,6 @@ static int test_cpucg_nice(const char *root)
> if (!WIFEXITED(status))
> goto cleanup;
>
> - user_usec = cg_read_key_long(cpucg, "cpu.stat", "user_usec");
> nice_usec = cg_read_key_long(cpucg, "cpu.stat", "nice_usec");
Good catch.
This test is anologous to test_cpucg_stats(), so the checks should be
analogous too, like:
user_usec = cg_read_key_long(cpucg, "cpu.stat", "user_usec");
nice_usec = cg_read_key_long(cpucg, "cpu.stat", "nice_usec");
if (user_usec <= 0)
goto cleanup;
instead of the removal.
Thanks,
Michal
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 265 bytes --]
next prev parent reply other threads:[~2026-07-29 11:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 10:04 [PATCH 0/2] selftests/cgroup: misc cleanups for test_cpu.c Shaojie Sun
2026-07-29 10:04 ` [PATCH 1/2] selftests/cgroup: remove unused user_usec read in test_cpucg_nice Shaojie Sun
2026-07-29 11:58 ` Michal Koutný [this message]
2026-07-29 10:04 ` [PATCH 2/2] selftests/cgroup: write explicit period to cpu.max in max tests Shaojie Sun
2026-07-29 11:53 ` Michal Koutný
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=amnqUlrPxhTobE1E@localhost.localdomain \
--to=mkoutny@suse.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=sunshaojie@kylinos.cn \
--cc=tj@kernel.org \
/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