All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 2/2] syscalls/inotify{07, 08}: Fix TBROK on older kernels
Date: Tue, 26 May 2026 15:45:33 +0200	[thread overview]
Message-ID: <20260526134533.GC215060@pevik> (raw)
In-Reply-To: <20260526083406.357092-3-chrubis@suse.cz>

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))
 

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2026-05-26 13:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26  8:34 [LTP] [PATCH 0/2] Fix inotify{07,08} TBROK where it should TFAIL Cyril Hrubis
2026-05-26  8:34 ` [LTP] [PATCH v2 1/2] safe_macros: Add SAFE_READ_ANY_EAGAIN Cyril Hrubis
2026-05-26 11:56   ` Avinesh Kumar via ltp
2026-05-26 13:39   ` Petr Vorel
2026-05-26 14:02     ` Cyril Hrubis
2026-05-26 14:15       ` Petr Vorel
2026-05-26  8:34 ` [LTP] [PATCH v2 2/2] syscalls/inotify{07, 08}: Fix TBROK on older kernels Cyril Hrubis
2026-05-26  8:44   ` Martin Doucha
2026-05-26 13:45   ` Petr Vorel [this message]
2026-05-26 13:59     ` Cyril Hrubis
2026-05-26 14:16       ` Petr Vorel
2026-05-26 15:03         ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260526134533.GC215060@pevik \
    --to=pvorel@suse.cz \
    --cc=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.