Linux Test Project
 help / color / mirror / Atom feed
From: linuxtestproject.agent@gmail.com
To: Samir <samir@linux.ibm.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] Migrating the libhugetlbfs/testcases/alloc-instantiate-race.c test
Date: Mon,  4 May 2026 14:07:41 +0000	[thread overview]
Message-ID: <20260504140741.4042-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260504132405.333588-1-samir@linux.ibm.com>

Hi Samir,

On 2026-05-04, Samir <samir@linux.ibm.com> wrote:
> Migrating the libhugetlbfs/testcases/alloc-instantiate-race.c test

> Signed-off-by: Samir <samir@linux.ibm.com>
> v3: https://lore.kernel.org/all/20250928030721.3537869-1-samir@linux.ibm.com/
> v4: https://lore.kernel.org/ltp/20260317095559.5766-1-samir@linux.ibm.com/
>
> LTP Github CI link: https://github.com/linux-test-project/ltp/pull/1313
> All the checks are passed

Version history references should use the `Link:` tag:

  Link: https://lore.kernel.org/ltp/20260317095559.5766-1-samir@linux.ibm.com/

The `LTP Github CI link:` line and `All the checks are passed` are
free text appearing after `Signed-off-by:` and must be removed.

[...]

> +/*
> + * Copyright (C) 2005-2006 IBM Corporation
> + * Author: David Gibson & Adam Litke
> + */

New file must include the year it was added. Add 2026 to the copyright
range.

> +/*
> + * This test is designed to detect a kernel allocation race introduced

The doc block must open with `/*\` (not `/*`) for LTP's RST toolchain.

[...]

> +#include "tst_safe_pthread.h"
> +#include "hugetlb.h"

Add `#include "tst_test.h"` explicitly, as done in the rest of this
directory.

[...]

> +static int child1, child2, race_type, fd_sync;

`fd_sync` zero-initializes to 0 (stdin). `cleanup()` checks
`if (fd_sync >= 0)` and would close stdin if called before `run_test()`.
Also, after `run_test()` calls `SAFE_CLOSE(fd_sync)` without resetting
it to -1, `cleanup()` double-closes the same fd on the normal exit path.
Initialize `fd_sync = -1` and reset it to -1 after each close.

[...]

Pre-existing issues noticed in the surrounding code (not introduced
by this patch):

- run_test(): local `p_sync` (MMAP) is not reachable from cleanup(); leaks if tst_brk() fires inside run_race().
- run_race(): local `fd` and `p` are not reachable from cleanup(); same concern.

---
Note:

Our agent completed the review of the patch. 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

      reply	other threads:[~2026-05-04 14:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-04 13:24 [LTP] [PATCH v5] Migrating the libhugetlbfs/testcases/alloc-instantiate-race.c test Samir
2026-05-04 14:07 ` 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=20260504140741.4042-1-linuxtestproject.agent@gmail.com \
    --to=linuxtestproject.agent@gmail.com \
    --cc=ltp@lists.linux.it \
    --cc=samir@linux.ibm.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