Re: tst_cgroup: add cpu.stat and cpu.weight to cgroup file table
[email protected] Fri, 31 Jul 2026 06:20:21 +0000
| Newsgroups | gmane.linux.ltp |
|---|---|
| Message-ID | <[email protected]> |
Hi Shaojie,
On 2026-07-31, Shaojie Sun wrote:
> tst_cgroup: add cpu.stat and cpu.weight to cgroup file table
--- [PATCH 2/3] ---
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +
> +top_srcdir ?= ../../../..
The build system convention is an SPDX line followed by a Copyright
line; the sibling controller Makefiles (memcg, cgroup) carry one. Could
a Copyright line be added here?
> +LDLIBS += -lpthread
This flag is applied directory-wide, but cgroup_cpu01.c does not include
cgroup_cpu_common.h and uses no pthreads. Would a per-target assignment
for the tests that actually need it be cleaner?
> +static struct tst_test test = {
> + .cleanup = cleanup,
> + .test_all = test_cpucg_subtree_control,
> + .needs_cgroup_ver = TST_CG_V2,
> + .needs_cgroup_ctrls = (const char *const []){ "cpu", NULL },
> +};
cgroup_cpu02..05 set .needs_root = 1, but this test does not, even
though it creates nested cgroups and writes cgroup.subtree_control. Is
the omission intentional?
> +/*
> + * Copyright (c) 2025 Richard Palethorpe <rpalethorpe-IBi9RG/[email protected]>
> + */
The other four test files and the shared header also credit the porting
author (2026). Should cgroup_cpu01.c carry the same attribution for
consistency?
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