Skip to contentSkip to conversation

inotify: fix typo in write() error message (1 -> BUF_SIZE)

PATCH In review Jinseok Kim 2 participants 2 messages Feb 5

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 inotify: fix typo in write() error message (1 -> BUF_SIZE)

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.

---
 testcases/kernel/syscalls/inotify/inotify01.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/inotify/inotify01.c +1 -1
index 4f7fa70e9..8671b594a 100644
@@ -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

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#1 lore raw

Patch merged, thanks!

Signature · 6 lines
Regards,
Li Wang


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