[LTP] [PATCH 5/5] fanotify20: Skip on v7.2
Jan Kara
jack@suse.cz
Wed Jul 29 11:27:09 CEST 2026
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 <anonymemeow@gmail.com>
> Suggested-by: Amir Goldstein <amir73il@gmail.com>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
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/20260616210448.12175-2-anonymemeow@gmail.com/
> 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 <jack@suse.com>
SUSE Labs, CR
More information about the ltp
mailing list