Linux Test Project
 help / color / mirror / Atom feed
From: linuxtestproject.agent@gmail.com
To: Edvard Conrad <edvard@tuta.io>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] syscalls/fanotify26: Add test for nested permission events
Date: Wed, 28 Oct 2026 09:15:42 +0000	[thread overview]
Message-ID: <20261028091542.5840-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <P50G-yE--F-9@tuta.io>

> Subject: [PATCH] syscalls/fanotify26: Add test for nested permission events
>
> A permission event reported on a stacked filesystem opens the real file
> on the backing filesystem to install the event file descriptor. If the
...
> The second case fails on a kernel without the pending fix "fs: let
> backing files inherit FMODE_NONOTIFY from the user file", so the test is
> added to runtest/staging for now.

Since the test is added to runtest/staging for an unreleased kernel fix,
the commit subject must include the [STAGING] prefix:

    [STAGING] syscalls/fanotify26: Add test for nested permission events

> +static void answer_one_event(void)
> +{
> +	struct fanotify_event_metadata event;
> +	struct fanotify_response resp;
> +
> +	/* Blocks for good if the event fd generates a nested event. */
> +	SAFE_READ(1, fd_notify, &event, sizeof(event));

Please use SAFE_READ_ALL instead of the literal 1, matching
SAFE_WRITE_ALL below:

	SAFE_READ(SAFE_READ_ALL, fd_notify, &event, sizeof(event));

> +	/* Releases whatever is still queued, so the opener can finish. */
> +	SAFE_CLOSE(fd_notify);
> +
> +	SAFE_WAITPID(opener, NULL, 0);
> +}

This SAFE_WAITPID() is redundant and discards the child's exit status.
The test library calls tst_reap_children() automatically after each
run() iteration, which waits for remaining children and verifies that
they exited cleanly.

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2026-10-28  9:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28  6:48 [LTP] [PATCH v2][STAGING] syscalls/fanotify26: Add test for nested permission events Edvard Conrad via ltp
2026-10-28  9:15 ` linuxtestproject.agent [this message]
2026-10-28 21:06   ` [LTP] " Edvard Conrad via ltp
2026-10-28 17:49 ` [LTP] [PATCH v2][STAGING] " Amir Goldstein
  -- strict thread matches above, loose matches on Subject: below --
2026-10-29 21:21 [LTP] [PATCH v3][STAGING] " Edvard Conrad via ltp
2026-10-30  0:27 ` [LTP] " linuxtestproject.agent
2026-10-27 19:37 [LTP] [PATCH][STAGING] " Edvard Conrad via ltp
2026-10-27 23:20 ` [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=20261028091542.5840-1-linuxtestproject.agent@gmail.com \
    --to=linuxtestproject.agent@gmail.com \
    --cc=edvard@tuta.io \
    --cc=ltp@lists.linux.it \
    /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