From: Cyril Hrubis <chrubis@suse.cz>
To: Sushmitha <sushmita@linux.ibm.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] cgroup_core02: modernize test using LTP cgroup API
Date: Thu, 1 Oct 2026 15:56:34 +0200 [thread overview]
Message-ID: <ar5mkkYlCp-Obadb@yuki.lan> (raw)
In-Reply-To: <20261001110953.32332-1-sushmita@linux.ibm.com>
Hi!
> cgroup_core02 tests that when a task writes to an fd opened by a
> different task, the permission check uses the cgroup namespace of
> the opening task (regression test for CVE-2021-4197).
>
> Modernize the test to align with current LTP coding standards:
>
> - Replace TEST()/TST_RET/TST_ERR pattern with TST_EXP_FAIL(), which
> provides cleaner error checking and better formatted test output.
>
> - Replace manual tst_res(TFAIL,...) + exit(1) on clone/fd failure
> with tst_brk(TBROK,...), which is the correct way to abort on an
> unexpected infrastructure failure inside a forked child.
>
> - Drop unused variable 'int status' and pass NULL to SAFE_WAITPID()
> since the clone child exit status is not inspected.
>
> - Remove redundant and unused headers: <stdlib.h>, <stdio.h>,
> <sys/types.h> and "tst_safe_file_at.h".
>
> - Expand the test header comment to use the [Description]/[Algorithm]
> block format required by current LTP documentation standards.
>
> - Fix minor whitespace issues: extra spaces in SAFE_CG_FCHOWN() calls,
> struct initializer brace, and .needs_cgroup_ctrls array initializer.
While these changes does sound reasonable.
> No functional change to the test logic.
>
> Signed-off-by: Sushmitha <sushmita@linux.ibm.com>
> ---
> cgroup_core02.c | 131 ++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 131 insertions(+)
> create mode 100644 cgroup_core02.c
This patch is completely wrong, it just add new file with the
modifications. The patch should include only differencies between the
current code in git and the updated version.
So first of all you should learn how to checkout a git repository and
generate proper patches.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-10-01 13:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 11:09 [LTP] [PATCH] cgroup_core02: modernize test using LTP cgroup API Sushmitha
2026-10-01 13:56 ` Cyril Hrubis [this message]
2026-10-01 14:18 ` [LTP] " linuxtestproject.agent
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=ar5mkkYlCp-Obadb@yuki.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=sushmita@linux.ibm.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