From: linuxtestproject.agent@gmail.com
To: Xuewen Wang <wangxuewen_ky@163.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] testcases: sysfs: Add sys_thp02
Date: Thu, 5 Nov 2026 15:58:33 +0000 [thread overview]
Message-ID: <20261105155833.3675-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20261105104639.996329-1-wangxuewen_ky@163.com>
Hi Xuewen,
On Thu, Nov 5, 2026 at 6:46 PM, Xuewen Wang <wangxuewen@kylinos.cn> wrote:
> testcases: sysfs: Add sys_thp02
> +/*\
> + * Sanity checks for the multi-size Transparent HugePage (mTHP) attributes
> + * exported under /sys/kernel/mm/transparent_hugepage/hugepages-*kB/.
The unescaped '*kB' after '-' in the reStructuredText doc comment is parsed
as an unclosed emphasis start-string. Use 'hugepages-<size>kB/' (matching the
next paragraph) or wrap the path in double backticks.
> + if (is_anon)
> + TST_SYSFS_ASSERT_CHOICE(enabled_allowed, NULL, 0,
> + PATH_MM_THP "/%s/enabled", dir);
> +
> + if (is_shmem)
> + TST_SYSFS_ASSERT_CHOICE(shmem_allowed, NULL, 0,
> + PATH_MM_THP "/%s/shmem_enabled", dir);
> +
> + for (i = 0; any_stats[i]; i++) {
> + TST_SYSFS_ASSERT_RANGEUU_SILENT(0, ULONG_MAX,
> + PATH_MM_THP "/%s/stats/%s",
> + dir, any_stats[i]);
> + }
> +
> + if (is_anon) {
These two 'if' statements have multi-line bodies without curly braces and
duplicate the 'if (is_anon)' and 'if (is_shmem)' blocks immediately below.
Move the TST_SYSFS_ASSERT_CHOICE() calls into the braced 'if (is_anon)' and
'if (is_shmem)' blocks below (or add curly braces).
> +static void run(void)
> +{
> + DIR *d;
> + struct dirent *ent;
> + int found = 0;
> +
> + d = TST_SYSFS_TRY_OPENDIR(PATH_MM_THP);
'found_pmd' is a file-scope static variable that is set to 1 in check_size()
and never reset at the start of run(), so it stays set across '-i'
iterations. Reset 'found_pmd = 0;' at the beginning of run().
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
next prev parent reply other threads:[~2026-11-05 15:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 10:46 [LTP] [PATCH] testcases: sysfs: Add sys_thp02 Xuewen Wang
2026-11-05 15:58 ` linuxtestproject.agent [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-11-06 3:22 [LTP] [PATCH v2] " Xuewen Wang
2026-11-06 11:34 ` [LTP] " linuxtestproject.agent
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=20261105155833.3675-1-linuxtestproject.agent@gmail.com \
--to=linuxtestproject.agent@gmail.com \
--cc=ltp@lists.linux.it \
--cc=wangxuewen_ky@163.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.