ltp.lists.linux.it archive mirror
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Jan Kara <jack@suse.cz>
Cc: amir73il@gmail.com, AnonymeMeow <anonymemeow@gmail.com>,
	ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 1/5] fanotify20: Skip FAN_REPORT_PIDFD | FAN_REPORT_TID test on v7.2+
Date: Mon, 17 Aug 2026 06:51:29 +0200	[thread overview]
Message-ID: <20260817045129.GA1954854@pevik> (raw)
In-Reply-To: <qvztwkwtesalldjybep577roegy77c6snq7xh6xkykc2cgctus@bdigqlb4buit>

Hi all,

> On Wed 17-06-26 05:04:44, AnonymeMeow wrote:
> > fanotify_init() used to reject FAN_REPORT_PIDFD combined with
> > FAN_REPORT_TID with EINVAL. Since Linux v7.2, fanotify supports
> > reporting pidfds for thread IDs, so this combination is expected to
> > succeed.

> > Signed-off-by: AnonymeMeow <anonymemeow@gmail.com>

> Looks good. Feel free to add:

> Reviewed-by: Jan Kara <jack@suse.cz>

In the end, after some iterations trying to add .max_kver, this simple version
was merged.

Thanks to all for their time.

Kind regards,
Petr

> 								Honza

> > ---
> >  testcases/kernel/syscalls/fanotify/fanotify20.c | 14 ++++++++++----
> >  1 file changed, 10 insertions(+), 4 deletions(-)

> > diff --git a/testcases/kernel/syscalls/fanotify/fanotify20.c b/testcases/kernel/syscalls/fanotify/fanotify20.c
> > index b32ecf6aa..f395d77ee 100644
> > --- a/testcases/kernel/syscalls/fanotify/fanotify20.c
> > +++ b/testcases/kernel/syscalls/fanotify/fanotify20.c
> > @@ -8,13 +8,15 @@

> >  /*\
> >   * This source file contains a test case which ensures that the
> > - * :manpage:`fanotify(7)` API returns an expected error code when provided an
> > - * invalid initialization flag alongside FAN_REPORT_PIDFD. Additionally, it
> > - * checks that the operability with existing FAN_REPORT_* flags is maintained
> > - * and functioning as intended.
> > + * :manpage:`fanotify(7)` API returns an expected error code when provided
> > + * unsupported initialization flags, e.g. FAN_REPORT_PIDFD combined with
> > + * FAN_REPORT_TID. Additionally, it checks that the operability with
> > + * supported FAN_REPORT_* flags is maintained and functioning as intended.
> >   *
> >   * NOTE: FAN_REPORT_PIDFD support was added in v5.15-rc1 in
> >   * af579beb666a ("fanotify: add pidfd support to the fanotify API").
> > + * FAN_REPORT_PIDFD combined with FAN_REPORT_TID is supported since v7.2-rc1
> > + * in 17171128513b ("fanotify: report thread pidfds for FAN_REPORT_TID").
> >   */

> >  #define _GNU_SOURCE
> > @@ -45,6 +47,10 @@ static struct test_case_t {

> >  static void do_setup(void)
> >  {
> > +	if (tst_kvercmp(7, 2, 0) >= 0)
> > +		tst_brk(TCONF, "FAN_REPORT_PIDFD | FAN_REPORT_TID is supported "
> > +			       "since v7.2, skipping test");
> > +
> >  	/*
> >  	 * An explicit check for FAN_REPORT_PIDFD is performed early on in the
> >  	 * test initialization as it's a prerequisite for all test cases.
> > -- 
> > 2.54.0

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

  reply	other threads:[~2026-08-17  4:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-16 21:04 [LTP] [PATCH v2 0/5] fanotify: update pidfd tests for FAN_REPORT_TID AnonymeMeow
2026-06-16 21:04 ` [LTP] [PATCH v2 1/5] fanotify20: Skip FAN_REPORT_PIDFD | FAN_REPORT_TID test on v7.2+ AnonymeMeow
2026-06-17  7:37   ` [LTP] " linuxtestproject.agent
2026-07-28 13:53     ` Andrea Cervesato via ltp
2026-07-29  5:51       ` Andrea Cervesato via ltp
2026-07-29  8:42         ` Petr Vorel
2026-06-17 15:33   ` [LTP] [PATCH v2 1/5] " Jan Kara
2026-08-17  4:51     ` Petr Vorel [this message]
2026-06-16 21:04 ` [LTP] [PATCH v2 2/5] fanotify21: Stop relying on exited child for pidfd error AnonymeMeow
2026-06-16 21:04 ` [LTP] [PATCH v2 3/5] fanotify21: Simplify read_pidfd_fdinfo() AnonymeMeow
2026-06-16 21:04 ` [LTP] [PATCH v2 4/5] fanotify21: Add test variants for FAN_REPORT_TID AnonymeMeow
2026-06-16 21:04 ` [LTP] [PATCH v2 5/5] fanotify21: Add FAN_REPORT_TID pidfd coverage AnonymeMeow
2026-06-17 15:04   ` Jan Kara

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=20260817045129.GA1954854@pevik \
    --to=pvorel@suse.cz \
    --cc=amir73il@gmail.com \
    --cc=anonymemeow@gmail.com \
    --cc=jack@suse.cz \
    --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;
as well as URLs for NNTP newsgroup(s).