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

* [LTP] [PATCH 2/2] userns03: Use correct macro
  2023-07-21 14:35 [LTP] [PATCH 1/2] write04: Use correct macro Petr Vorel
@ 2023-07-21 14:35 ` Petr Vorel
  2023-07-21 15:19   ` Avinesh Kumar
  2023-07-21 14:57 ` [LTP] [PATCH 1/2] write04: " Cyril Hrubis
  1 sibling, 1 reply; 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/containers/userns/userns03.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/containers/userns/userns03.c b/testcases/kernel/containers/userns/userns03.c
index 4dd3f1a73..a7f12e3d9 100644
--- a/testcases/kernel/containers/userns/userns03.c
+++ b/testcases/kernel/containers/userns/userns03.c
@@ -156,7 +156,7 @@ static void run(void)
 		tst_res(TINFO, "Check if setgroups can be re-enabled");
 
 		fd = SAFE_OPEN(path, O_WRONLY, 0644);
-		TST_EXP_FAIL(write(fd, "allow", 5), EPERM);
+		TST_EXP_FAIL2(write(fd, "allow", 5), EPERM);
 		SAFE_CLOSE(fd);
 
 		sprintf(path, "/proc/%d/setgroups", cpid2);
-- 
2.40.1


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

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

* Re: [LTP] [PATCH 1/2] write04: Use correct macro
  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 14:57 ` Cyril Hrubis
  1 sibling, 0 replies; 5+ messages in thread
From: Cyril Hrubis @ 2023-07-21 14:57 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

Hi!
Both patches:

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz

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

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

* Re: [LTP] [PATCH 2/2] userns03: Use correct macro
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Avinesh Kumar @ 2023-07-21 15:19 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

Hi Petr,

For both patches-
Reviewed-by: Avinesh Kumar <akumar@suse.de>

--
Regards,
Avinesh




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

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

* Re: [LTP] [PATCH 2/2] userns03: Use correct macro
  2023-07-21 15:19   ` Avinesh Kumar
@ 2023-07-21 15:51     ` Petr Vorel
  0 siblings, 0 replies; 5+ messages in thread
From: Petr Vorel @ 2023-07-21 15:51 UTC (permalink / raw)
  To: Avinesh Kumar; +Cc: ltp

Hi Avinesh, Cyril,

thanks for your review, merged.

Kind regards,
Petr

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

^ permalink raw reply	[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