All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michal Koutný" <mkoutny@suse.com>
To: guojian <guojian@kylinos.cn>
Cc: tj@kernel.org, hannes@cmpxchg.org, shuah@kernel.org,
	 cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH] selftests/cgroup: Remove redundant cg_enter_current() call in test_core
Date: Fri, 17 Jul 2026 16:23:32 +0200	[thread overview]
Message-ID: <alo6hnNBA5qLAyGk@localhost.localdomain> (raw)
In-Reply-To: <20260717110606.298368-1-guojian@kylinos.cn>

[-- Attachment #1: Type: text/plain, Size: 1068 bytes --]

On Fri, Jul 17, 2026 at 07:06:06PM +0800, guojian <guojian@kylinos.cn> wrote:
> From: Jian Guo <guojian@kylinos.cn>
> 
> The test_cgcore_no_internal_process_constraint_on_threads test has two
> back-to-back cg_enter_current(root) calls in its cleanup path.
> 
> A single cg_enter_current() call atomically migrates the entire thread
> group to the target cgroup even for multi-threaded processes, and this
> test creates no extra threads or child processes that would require a
> second migration attempt. The second call is a harmless no-op once the
> process is already in the root cgroup, but it is redundant and
> inconsistent with the cleanup logic used in all other cgroup core
> selftest cases.
> 
> Remove the duplicate call to clean up the code. No functional change is
> intended.
> 
> Signed-off-by: Jian Guo <guojian@kylinos.cn>
> ---
>  tools/testing/selftests/cgroup/test_core.c | 1 -
>  1 file changed, 1 deletion(-)

Fixes: d863cb03fc5f9 ("Add cgroup core selftests")

Good catch.

Acked-by: Michal Koutný <mkoutny@suse.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 265 bytes --]

  parent reply	other threads:[~2026-07-17 14:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17 11:06 [PATCH] selftests/cgroup: Remove redundant cg_enter_current() call in test_core guojian
2026-07-17 12:51 ` Tao Cui
2026-07-17 15:30   ` Tao Cui
2026-07-17 14:23 ` Michal Koutný [this message]
2026-07-17 17:23 ` 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=alo6hnNBA5qLAyGk@localhost.localdomain \
    --to=mkoutny@suse.com \
    --cc=cgroups@vger.kernel.org \
    --cc=guojian@kylinos.cn \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.