[LTP] tst_cgroup: add cpu.stat and cpu.weight to cgroup file table
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Thu Jul 30 16:06:40 CEST 2026
Hi Shaojie,
On Thu, 30 Jul 2026, Shaojie Sun wrote:
> tst_cgroup: add cpu.stat and cpu.weight to cgroup file table
--- [PATCH 2/3] ---
> +static void cleanup(void)
> +{
> + if (cg_test) {
> + cg_test = tst_cg_group_rm(cg_test);
> + }
> +}
The braces around the single statement here (and the equivalent cleanup()
in cgroup_cpu03.c) trip checkpatch: "braces {} are not necessary for
single statement blocks". This is also inconsistent with cgroup_cpu01/04/05
which omit them. Could the braces be dropped?
> + long usage_seconds = 2;
> + long expected_usage_usec = usage_seconds * USEC_PER_SEC;
> + cg_test = tst_cg_group_mk(tst_cg, "cpucg_test");
checkpatch reports "Missing a blank line after declarations" here (and at
the analogous spot in cgroup_cpu03.c). Should a blank line separate the
declarations from the first statement?
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
More information about the ltp
mailing list