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

[email protected] Sat, 1 Aug 2026 07:30:20 +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

> +	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();

Could this sequence remain in one .test_all callback? After run(0) returns,
the LTP runner calls tst_reap_children(), which blocks waiting for the paused
children. The callback that writes to cgroup.kill is therefore never reached,
and the test times out.

Helper functions can still report the individual checks, but no live child
can remain when a .test callback returns.

> + * [Description]
> + *
> + * Functional test for cgroup.kill interface (cgroupv2).

Could the deprecated [Description] marker be removed? Test catalog comments
begin directly with the description; only [Algorithm] is a supported section
marker.

> cgroup/cgroup_core03: convert to new LTP API with parameterised subtests
>
> The test used the old .test_all single-function style.
> [...]
> No functional behaviour change.

Could the commit message describe this as a callback-model refactoring rather
than a new API conversion? The existing test already uses tst_test.h and
struct tst_test, and the callback split currently changes behavior by causing
the timeout 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