Linux Test Project
 help / color / mirror / Atom feed
From: linuxtestproject.agent@gmail.com
To: Sushmitha <sushmita@linux.ibm.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] cgroup_core02: modernize test using LTP cgroup API
Date: Thu,  1 Oct 2026 14:18:08 +0000	[thread overview]
Message-ID: <20261001141808.3976-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20261001110953.32332-1-sushmita@linux.ibm.com>

Hi Sushmitha,

On Thu, 1 Oct 2026 16:39:53 +0530, Sushmitha wrote:
> cgroup_core02: modernize test using LTP cgroup API

> diff --git a/cgroup_core02.c b/cgroup_core02.c
> new file mode 100644
> --- /dev/null
> +++ b/cgroup_core02.c

This adds an unbuilt root-level copy; normal builds and the existing
runtest entries still use the unchanged original test. Apply the changes
to testcases/kernel/controllers/cgroup/cgroup_core02.c instead and remove
the root-level copy.

> +		if (pid < 0)
> +			tst_brk(TBROK, "clone failed");

In a forked child, tst_brk(TBROK) kills the main test process with SIGKILL,
skipping cleanup(). If clone fails with EAGAIN, child_a and child_b remain,
and tst_cg_cleanup() cannot remove their parent because it does not remove
these descendants. Propagate the error to the main process and report
TBROK there so cleanup() runs.

> +			TST_EXP_FAIL(write(targ.fds[i], "0", 1), ENOENT,
> +				     "write to cgroup.procs from different namespace");

Use TST_EXP_FAIL2() here: write() returns a byte count on success, not zero.
TST_EXP_FAIL() diagnoses a successful one-byte write as "invalid retval 1"
instead of an unexpectedly successful migration.

Verdict - Needs revision

---
Note:

The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      parent reply	other threads:[~2026-10-01 14:18 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
2026-10-01 14:18 ` linuxtestproject.agent [this message]

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=20261001141808.3976-1-linuxtestproject.agent@gmail.com \
    --to=linuxtestproject.agent@gmail.com \
    --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