[LTP] [PATCH v3 5/5] fanotify20: Skip on v7.2
Petr Vorel <[email protected]> Fri, 31 Jul 2026 12:51:32 +0200
| Newsgroups | it.linux.lists.ltp |
|---|---|
| Message-ID | <[email protected]> |
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]>
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Andrea Cervesato <[email protected]>
Signed-off-by: Petr Vorel <[email protected]>
---
The same as in v2.
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
--
Mailing list info: https://lists.linux.it/listinfo/ltp