All of lore.kernel.org
 help / color / mirror / Atom feed
From: linuxtestproject.agent@gmail.com
To: Stephen Bertram <sbertram@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] accept03/tst_fd: Harden parallel runs against shared path races
Date: Wed,  4 Nov 2026 19:00:41 +0000	[thread overview]
Message-ID: <20261104190041.4928-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20261104164638.407069-1-sbertram@redhat.com>

Hi Stephen,

On Wed Nov 4 11:46:36 2026 -0500, Stephen Bertram <sbertram@redhat.com> wrote:
> accept03/tst_fd: Harden parallel runs against shared path races

> This covers accept03, epoll_pwait06, ioctl_pidfd01, and splice07,
> which call TST_FD_FOREACH without a private tmpdir.
>
> +static void fd_path(char *buf, size_t len, const char *prefix)
> +{
> +	snprintf(buf, len, "%s_%d", prefix, getpid());
> +}

Tests that create temporary files or directories must set .needs_tmpdir = 1
in struct tst_test rather than creating files in the current working
directory. Without .needs_tmpdir = 1, open_file(), open_path(), and
open_dir() fail with EROFS/EACCES when run from a read-only working
directory and leave leftover files behind if interrupted before
SAFE_UNLINK()/SAFE_RMDIR(). Set .needs_tmpdir = 1 in accept03,
epoll_pwait06, ioctl_pidfd01, and splice07 (as epoll_ctl06, readahead01,
ioctl_ficlone04, and file_attr04 already do) and guard file creation in
tst_fd.c with tst_tmpdir_created().

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

  parent reply	other threads:[~2026-11-04 19:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 14:46 [LTP] [PATCH v1] accept03/tst_fd: Harden parallel runs against shared path races Stephen Bertram via ltp
2026-11-04 15:14 ` Cyril Hrubis
2026-11-04 16:46 ` [LTP] [PATCH v2] " Stephen Bertram via ltp
2026-11-04 18:32   ` [LTP] [PATCH v2] accept03/tst_fd: Harden parallel runs against Petr Vorel
2026-11-05 10:33     ` Cyril Hrubis
2026-11-04 19:00   ` linuxtestproject.agent [this message]
2026-11-04 20:35   ` [LTP] [PATCH v3] accept03/tst_fd: Harden parallel runs against shared path races Stephen Bertram via ltp
2026-11-05  0:38     ` [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=20261104190041.4928-1-linuxtestproject.agent@gmail.com \
    --to=linuxtestproject.agent@gmail.com \
    --cc=ltp@lists.linux.it \
    --cc=sbertram@redhat.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.