public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] write04: Use correct macro
@ 2023-07-21 14:35 Petr Vorel
  2023-07-21 14:35 ` [LTP] [PATCH 2/2] userns03: " Petr Vorel
  2023-07-21 14:57 ` [LTP] [PATCH 1/2] write04: " Cyril Hrubis
  0 siblings, 2 replies; 5+ messages in thread
From: Petr Vorel @ 2023-07-21 14:35 UTC (permalink / raw)
  To: ltp

TST_EXP_FAIL2() must be used for write(), as not only 0 would be a
failure, but also >= 0 (the number of written bytes).

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/kernel/syscalls/write/write04.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/write/write04.c b/testcases/kernel/syscalls/write/write04.c
index afbac0f09..a5d62e0f5 100644
--- a/testcases/kernel/syscalls/write/write04.c
+++ b/testcases/kernel/syscalls/write/write04.c
@@ -28,7 +28,7 @@ static void verify_write(void)
 {
 	char wbuf[8 * page_size];
 
-	TST_EXP_FAIL(write(wfd, wbuf, sizeof(wbuf)), EAGAIN);
+	TST_EXP_FAIL2(write(wfd, wbuf, sizeof(wbuf)), EAGAIN);
 }
 
 static void setup(void)
-- 
2.40.1


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

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

end of thread, other threads:[~2023-07-21 15:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-21 14:35 [LTP] [PATCH 1/2] write04: Use correct macro Petr Vorel
2023-07-21 14:35 ` [LTP] [PATCH 2/2] userns03: " Petr Vorel
2023-07-21 15:19   ` Avinesh Kumar
2023-07-21 15:51     ` Petr Vorel
2023-07-21 14:57 ` [LTP] [PATCH 1/2] write04: " Cyril Hrubis

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