From: linuxtestproject.agent@gmail.com
To: Pradeep Susarla <pradeep.susarla@gmail.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] migrate_pages01: Convert to new API
Date: Tue, 24 Nov 2026 16:29:36 +0000 [thread overview]
Message-ID: <20261124162936.3732-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20261124131237.53712-1-pradeep.susarla@gmail.com>
Hi Pradeep,
On Tue Nov 24 13:12:37 2026 +0000, Pradeep Susarla <pradeep.susarla@gmail.com> wrote:
> migrate_pages01: Convert to new API
> + if (!SAFE_FORK()) {
> + SAFE_SETUID(ltpuser->pw_uid);
> + TST_EXP_FAIL(sys_migrate_pages(parent_pid, sane_max_node,
> + sane_old_nodes, sane_new_nodes),
> + EPERM, "migrate_pages() of root process as %s",
> + ltpuser->pw_name);
> + exit(0);
> + }
> +
> + tst_reap_children();
The explicit tst_reap_children() call is redundant because the LTP test
framework automatically reaps child processes after each test invocation.
Drop the tst_reap_children() call here.
> +static void run(void)
> +{
> + verify_sane_nodes();
> + verify_invalid_pid();
> + verify_invalid_masksize();
> + verify_invalid_mem();
> + verify_invalid_nodes();
> + verify_invalid_perm();
> +}
Instead of defining separate verify_*() functions called manually from
run() with .test_all, define a struct tcase array and dispatch the test
cases through .test and .tcnt = ARRAY_SIZE(tcases).
> #else
> -int main(void)
> -{
> - tst_brkm(TCONF, NULL, NUMA_ERROR_MSG);
> -}
> +TST_TEST_TCONF(NUMA_ERROR_MSG);
> #endif
TST_TEST_TCONF() requires a human-readable string literal instead of a
macro constant like NUMA_ERROR_MSG, e.g.
TST_TEST_TCONF("requires libnuma >= 2").
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
prev parent reply other threads:[~2026-11-24 16:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 13:12 [LTP] [PATCH] migrate_pages01: Convert to new API Pradeep Susarla
2026-11-24 16:29 ` linuxtestproject.agent [this message]
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=20261124162936.3732-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox