Re: [LTP] [PATCH 5/5] fanotify20: Skip on v7.2

Jan Kara <[email protected]> Wed, 29 Jul 2026 11:27:09 +0200
Newsgroups it.linux.lists.ltp
Message-ID <wexuhnkssz5j5kswcmsj73l7i6yrhpsvg36t4hg2e3flxvp4l3@5jczb6r55haj>
On Wed 29-07-26 11:17:17, Petr Vorel 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.
> 
> The test that these flag combinations are allowed:
>                 FLAGS_DESC(FAN_REPORT_PIDFD | FAN_REPORT_TID),
> 		FLAGS_DESC(FAN_REPORT_PIDFD | FAN_REPORT_FID |
> 			   FAN_REPORT_DFID_NAME),
> 
> Because the above flag combinations are already "tested" by the tests
> that use them and we don't have any tests that >= 5.10 has support for
> FAN_MARK_FILESYSTEM etc just simply skip the test on v7.2.
> 
> Reported-by: AnonymeMeow <[email protected]>
> Suggested-by: Amir Goldstein <[email protected]>
> Signed-off-by: Petr Vorel <[email protected]>

I agree with the intention. I just think that if the option is called
max_kver, then this suggest this is the last version where the test should
be run. Not the first version where the test shouldn't be run. So the name
is a bit confusing to me.

								Honza

> ---
> Replacement of:
> https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
> based on
> https://lore.kernel.org/ltp/CAOQ4uxhnrH3=XsCBhuO3oYtS=pZcRjkAchtrVwtnfJzBVmpNfQ@mail.gmail.com/
> 
>  testcases/kernel/syscalls/fanotify/fanotify20.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/testcases/kernel/syscalls/fanotify/fanotify20.c b/testcases/kernel/syscalls/fanotify/fanotify20.c
> index b32ecf6aa3..dfcf194755 100644
> --- a/testcases/kernel/syscalls/fanotify/fanotify20.c
> +++ b/testcases/kernel/syscalls/fanotify/fanotify20.c
> @@ -15,6 +15,9 @@
>   *
>   * NOTE: FAN_REPORT_PIDFD support was added in v5.15-rc1 in
>   * af579beb666a ("fanotify: add pidfd support to the fanotify API").
> + *
> + * NOTE: since v7.2, fanotify supports reporting pidfds for thread IDs => skip
> + * the test.
>   */
>  
>  #define _GNU_SOURCE
> @@ -75,6 +78,7 @@ static void do_cleanup(void)
>  
>  static struct tst_test test = {
>  	.setup = do_setup,
> +	.max_kver = "7.2",
>  	.test = do_test,
>  	.tcnt = ARRAY_SIZE(test_cases),
>  	.cleanup = do_cleanup,
> -- 
> 2.55.0
> 
-- 
Jan Kara <[email protected]>
SUSE Labs, CR

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