public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] inotify: fix typo in write() error message (1 -> BUF_SIZE)
@ 2026-02-05 12:27 Jinseok Kim
  2026-02-05 12:54 ` Li Wang via ltp
  0 siblings, 1 reply; 2+ messages in thread
From: Jinseok Kim @ 2026-02-05 12:27 UTC (permalink / raw)
  To: ltp

The error message in the write() failure check uses a hardcoded '1'
instead of BUF_SIZE, leading to misleading logs when write() fails.

This patch fixes the format string to show the actual size.

Signed-off-by: Jinseok Kim <always.starving0@gmail.com>
---
 testcases/kernel/syscalls/inotify/inotify01.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/inotify/inotify01.c b/testcases/kernel/syscalls/inotify/inotify01.c
index 4f7fa70e9..8671b594a 100644
--- a/testcases/kernel/syscalls/inotify/inotify01.c
+++ b/testcases/kernel/syscalls/inotify/inotify01.c
@@ -72,7 +72,7 @@ void verify_inotify(void)

 	if (write(fd, buf, BUF_SIZE) == -1) {
 		tst_brk(TBROK,
-			"write(%d, %s, 1) failed", fd, fname);
+			"write(%d, %s, %d) failed", fd, fname, BUF_SIZE);
 	}
 	event_set[test_cnt] = IN_MODIFY;
 	test_cnt++;
--
2.43.0

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [LTP] [PATCH] inotify: fix typo in write() error message (1 -> BUF_SIZE)
  2026-02-05 12:27 [LTP] [PATCH] inotify: fix typo in write() error message (1 -> BUF_SIZE) Jinseok Kim
@ 2026-02-05 12:54 ` Li Wang via ltp
  0 siblings, 0 replies; 2+ messages in thread
From: Li Wang via ltp @ 2026-02-05 12:54 UTC (permalink / raw)
  To: Jinseok Kim; +Cc: ltp

Patch merged, thanks!

-- 
Regards,
Li Wang


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-05 12:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-05 12:27 [LTP] [PATCH] inotify: fix typo in write() error message (1 -> BUF_SIZE) Jinseok Kim
2026-02-05 12:54 ` Li Wang via ltp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox