[LTP] [PATCH v2 2/2] syscalls/inotify{07, 08}: Fix TBROK on older kernels
Petr Vorel
pvorel@suse.cz
Tue May 26 15:45:33 CEST 2026
Hi Cyril,
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Thanks for fixing it!
> - int len = SAFE_READ(0, fd_notify, event_buf, EVENT_BUF_LEN);
> + int len = SAFE_READ(SAFE_READ_ANY_EAGAIN, fd_notify, event_buf, EVENT_BUF_LEN);
Maybe later after the release we could think about about shorten this with
definitions. I'm ok if you consider this as not useful.
Kind regards,
Petr
+++ include/tst_safe_macros.h
@@ -117,6 +117,15 @@ int safe_pipe2(const char *file, const int lineno, int fildes[2], int flags);
#define SAFE_READ(len_strict, fildes, buf, nbyte) \
safe_read(__FILE__, __LINE__, NULL, (len_strict), (fildes), (buf), (nbyte))
+#define SAFE_READ_ANY(fildes, buf, nbyte) \
+ SAFE_READ(SAFE_READ_ANY, fildes, buf, nbyte)
+
+#define SAFE_READ_ALL(fildes, buf, nbyte) \
+ SAFE_READ(SAFE_READ_ALL, fildes, buf, nbyte)
+
+#define SAFE_READ_ANY_EAGAIN(fildes, buf, nbyte) \
+ SAFE_READ(SAFE_READ_ANY_EAGAIN, fildes, buf, nbyte)
+
#define SAFE_SETEGID(egid) \
safe_setegid(__FILE__, __LINE__, NULL, (egid))
More information about the ltp
mailing list