[LTP] mremap07.c: New test for mremap() with MREMAP_DONTUNMAP
Wei Gao
wegao@suse.com
Sun Apr 19 03:22:04 CEST 2026
On Fri, Apr 17, 2026 at 01:26:49PM +0000, linuxtestproject.agent@gmail.com wrote:
> Hi Wei,
>
> On 2026-04-17, Wei Gao wrote:
> > mremap07.c: New test for mremap() with MREMAP_DONTUNMAP
>
> > +static void *fault_handler_thread(void *arg LTP_ATTRIBUTE_UNUSED)
> > +{
> > + struct uffd_msg msg;
> > + struct uffdio_copy uffdio_copy;
> > +
> > + TST_CHECKPOINT_WAIT(0);
> > +
> > + struct pollfd pollfd;
> > +
> > + int nready = poll(&pollfd, 1, -1);
>
> Nit: declare all variables at the top of the block, before any statements
> (struct pollfd and int nready should move above TST_CHECKPOINT_WAIT(0)).
Unless the LTP project strictly mandates a "declarations at the top" policy for tests,
I would prefer to keep the current implementation.
>
> [...]
>
> Reviewed-by: LTP AI Reviewer <ltp-ai@noreply.github.com>
>
> ---
> Note:
>
> Our agent completed the review of the patch. The full review can be
> found at: <review_url>
>
> 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