[LTP] [PATCH] inotify: fix typo in write() error message (1 -> BUF_SIZE)

Jinseok Kim always.starving0@gmail.com
Thu Feb 5 13:27:51 CET 2026


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


More information about the ltp mailing list