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

Jan Kara <[email protected]> Wed, 29 Jul 2026 12:26:57 +0200
Newsgroups gmane.linux.ltp
Message-ID <ikh22h3smbjn7fvmulqcuyjvjhsu4a57atjh7mecmkg5cvakfs@hlrwv6ex7qko>
On Wed 29-07-26 11:57:30, 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]>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <[email protected]>

								Honza

> ---
> Changes v1->v2:
> * Fixed version 7.2 => 7.1
> 
> More changes needed => v2. I'm sorry for the noise.
> 
>  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..db4a5ba63b 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.1",
>  	.test = do_test,
>  	.tcnt = ARRAY_SIZE(test_cases),
>  	.cleanup = do_cleanup,
> -- 
> 2.55.0
> 
-- 
Jan Kara <jack-IBi9RG/[email protected]>
SUSE Labs, CR

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