Re: cgroup/cgroup_core03: convert to new LTP API with parameterised subtests

[email protected] Sat, 1 Aug 2026 07:30:11 +0000
Newsgroups gmane.linux.ltp
Message-ID <[email protected]>
Hi Yeswanth,

On Fri, 31 Jul 2026, Yeswanth Krishna Tellakula wrote:
> cgroup/cgroup_core03: convert to new LTP API with parameterised subtests

> static void run(unsigned int n)
> {
> 	int i;
>
> 	/* Fork wave: only needed before the first subtest. */
> 	if (n == 0) {
> 		*data_ptr = 0;
> 		num_pids = PID_NUM;
>
> 		for (i = 0; i < num_pids; i++)
> 			pids[i] = cg_run_nowait(cg_child);
>
> 		TST_CHECKPOINT_WAIT(0);
> 	}
>
> 	switch (n) {
> 	case 0:
> 		test_cg_kill_procs_count();
> 		break;
> 	case 1:
> 		test_cg_kill_trigger();

Critical: Could these dependent stages remain in one .test_all callback?
After run(0) returns, run_tests() unconditionally calls
tst_reap_children(). That blocks in wait() because every child is paused,
while cgroup.kill is not written until run(1). Consequently run(1) is never
reached and the test times out.

> /*\
>  * [Description]

Minor: Could the deprecated [Description] header be removed? Introductory
prose is already treated as the description, and this header is forbidden in
new C test documentation.

> 	.needs_root = 1,

Minor: Could the high-level description explain why root is required? The
new root-only requirement is not documented as required by the root-usage
rule.

> No functional behaviour change.

Minor: Could this claim be removed? The patch adds root-only gating and
kernel-taint failure checking, changes the timeout, and changes result
reporting, so it changes observable behavior even apart from the hang above.

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