[LTP] [PATCH 1/1] fanotify.h: Print flag name in REQUIRE_FANOTIFY_EVENTS_SUPPORTED_ON_FS()
Petr Vorel
pvorel@suse.cz
Wed Nov 4 17:23:05 CET 2026
Call in REQUIRE_FANOTIFY_EVENTS_SUPPORTED_ON_FS () functions directly
instead of other REQUIRE_*() macros. That allows to stringify the
arguments so that instead of printing a flag value:
fanotify26.c:258: TCONF: 0x00000100 not supported in kernel?
the output is printing the flag itself:
fanotify26.c:258: TCONF: FAN_MARK_FILESYSTEM not supported in kernel?
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/kernel/syscalls/fanotify/fanotify.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/testcases/kernel/syscalls/fanotify/fanotify.h b/testcases/kernel/syscalls/fanotify/fanotify.h
index 7977b4aa44..fb6147680a 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify.h
+++ b/testcases/kernel/syscalls/fanotify/fanotify.h
@@ -307,9 +307,11 @@ static inline int fanotify_handle_supported_by_kernel(int flag)
#define REQUIRE_FANOTIFY_EVENTS_SUPPORTED_ON_FS(init_flags, mark_type, mask, fname) do { \
if (mark_type) \
- REQUIRE_MARK_TYPE_SUPPORTED_ON_FS(mark_type, fname); \
+ fanotify_flags_err_msg(#mark_type, __FILE__, __LINE__, tst_brk_, \
+ fanotify_mark_supported_on_fs(mark_type, fname)); \
if (init_flags) \
- REQUIRE_FANOTIFY_INIT_FLAGS_SUPPORTED_ON_FS(init_flags, fname); \
+ fanotify_flags_err_msg(#init_flags, __FILE__, __LINE__, tst_brk_, \
+ fanotify_init_flags_supported_on_fs(init_flags, fname)); \
fanotify_flags_err_msg(#mask, __FILE__, __LINE__, tst_brk_, \
fanotify_flags_supported_on_fs(init_flags, mark_type, mask, fname)); \
} while (0)
--
2.56.0
More information about the ltp
mailing list