From: Jinseok Kim <always.starving0@gmail.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] inotify: fix typo in write() error message (1 -> BUF_SIZE)
Date: Thu, 5 Feb 2026 21:27:51 +0900 [thread overview]
Message-ID: <20260205122753.3163-1-always.starving0@gmail.com> (raw)
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
next reply other threads:[~2026-02-05 12:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-05 12:27 Jinseok Kim [this message]
2026-02-05 12:54 ` [LTP] [PATCH] inotify: fix typo in write() error message (1 -> BUF_SIZE) Li Wang via ltp
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=20260205122753.3163-1-always.starving0@gmail.com \
--to=always.starving0@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox