[LTP] [PATCH 2/9] syscalls/fanotify14: Require FAN_REPORT_FID support for entire test

Amir Goldstein amir73il@gmail.com
Mon Sep 5 17:42:32 CEST 2022


To avoid complex requirements for the new test case, we now require
FAN_REPORT_FID support for the entire test, which opts-out from testing
on FUSE filesystem.

It is not clear that there is anything to gain from running this test
on all_filsystems in the first place.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
 testcases/kernel/syscalls/fanotify/fanotify14.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/testcases/kernel/syscalls/fanotify/fanotify14.c b/testcases/kernel/syscalls/fanotify/fanotify14.c
index aa4db586e..8419cea46 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify14.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify14.c
@@ -219,11 +219,8 @@ out:
 
 static void do_setup(void)
 {
-	int fd;
-
-	/* Check for kernel fanotify support */
-	fd = SAFE_FANOTIFY_INIT(FAN_CLASS_NOTIF, O_RDONLY);
-	SAFE_CLOSE(fd);
+	/* Require FAN_REPORT_FID support for all tests to simplify per test case requirements */
+	REQUIRE_FANOTIFY_INIT_FLAGS_SUPPORTED_ON_FS(FAN_REPORT_FID, MNTPOINT);
 
 	fan_report_target_fid_unsupported =
 		fanotify_init_flags_supported_on_fs(FAN_REPORT_DFID_NAME_TARGET, MNTPOINT);
-- 
2.25.1



More information about the ltp mailing list