From: linuxtestproject.agent@gmail.com
To: Pradeep Susarla <pradeep.susarla@gmail.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] hugetlb: Migrate library and numa helpers to libs/
Date: Sun, 31 May 2026 00:08:21 +0000 [thread overview]
Message-ID: <20260531000822.4114-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260530234123.1718-1-pradeep.susarla@inmarsat.com>
Hi Pradeep,
On Sun, 31 May 2026 00:41:23 +0100, Pradeep Susarla wrote:
> hugetlb: Migrate library and numa helpers to libs/
>
> Consolidate two test helpers into the global libs/ location, following
> the tse_ (extended, non-core library) naming adopted for libs/ (tst_ =
> core lib/, tse_ = extended libs/, tso_ = legacy):
>
> hugetlb library:
> testcases/kernel/mem/hugetlb/lib/hugetlb.h -> include/tse_hugetlb.h
> testcases/kernel/mem/hugetlb/lib/hugetlb.c -> libs/hugetlb/tse_hugetlb.c
> [...]
> write_node_cpusets():
> Moved from testcases/kernel/lib/numa_cpuset.c (libkerntest.a) into
> libs/numa/tse_numa.c (libltpnuma.a)
The patch bundles two independent migrations: the hugetlb library
(lib/hugetlb.c/h -> libs/hugetlb/) and write_node_cpusets()
(numa_cpuset.c -> libs/numa/). The two changes touch completely separate
test suites (hugetlb vs ksm/oom) and have no dependency on each other.
An intermediate state with only the hugetlb migration applied is
perfectly coherent.
Could these be split into two commits, one per migration, per the
"one logical change per patch" rule?
Pre-existing issues noticed in the surrounding code (not introduced
by this patch):
- libs/numa/tse_numa.c in gather_node_cpus() -- the trailing-comma
removal `cpus[strlen(cpus) - 1] = '\0'` is reached unconditionally
after the loop. If no CPUs are found (all offline or the node has
none), cpus[] remains empty, strlen(cpus) returns 0, and the
subtraction wraps to SIZE_MAX, writing outside the buffer. The guard
in write_node_cpusets() checks strlen(cpus) only after
gather_node_cpus() has already returned, so the write happens first.
This was present in the original numa_cpuset.c before the move.
---
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-05-31 0:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-30 23:41 [LTP] [PATCH v2] hugetlb: Migrate library and numa helpers to libs/ Pradeep Susarla
2026-05-31 0:08 ` linuxtestproject.agent [this message]
2026-06-30 8:48 ` [LTP] " Andrea Cervesato via ltp
2026-06-30 11:13 ` Pradeep Susarla
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=20260531000822.4114-1-linuxtestproject.agent@gmail.com \
--to=linuxtestproject.agent@gmail.com \
--cc=ltp@lists.linux.it \
--cc=pradeep.susarla@gmail.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.