* [LTP] [PATCH 1/1] fanotify.h: Print flag name in REQUIRE_FANOTIFY_EVENTS_SUPPORTED_ON_FS()
@ 2026-11-04 16:23 Petr Vorel
2026-11-04 18:56 ` [LTP] " linuxtestproject.agent
0 siblings, 1 reply; 2+ messages in thread
From: Petr Vorel @ 2026-11-04 16:23 UTC (permalink / raw)
To: ltp; +Cc: Amir Goldstein
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
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-04 18:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-04 16:23 [LTP] [PATCH 1/1] fanotify.h: Print flag name in REQUIRE_FANOTIFY_EVENTS_SUPPORTED_ON_FS() Petr Vorel
2026-11-04 18:56 ` [LTP] " linuxtestproject.agent
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.