diff mbox series

[1/1] wait01: Use TST_EXP_FAIL2() for wait

Message ID 20240509144046.312245-1-pvorel@suse.cz
State Accepted
Headers show
Series [1/1] wait01: Use TST_EXP_FAIL2() for wait | expand

Commit Message

Petr Vorel May 9, 2024, 2:40 p.m. UTC
Both wait() and waitpid() return PID, therefore (similarly as for file
descriptor) pass condition is >= 0, which is in TST_EXP_FAIL2().
Therefore TST_EXP_FAIL2() or TST_EXP_PID{,_SILENT} needs to be used.
Affected only wait01.

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

Comments

Cyril Hrubis May 9, 2024, 2:58 p.m. UTC | #1
Hi!
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Petr Vorel May 9, 2024, 3:27 p.m. UTC | #2
Hi Cyril,

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

Merged, thanks!

Kind regards,
Petr
diff mbox series

Patch

diff --git a/testcases/kernel/syscalls/wait/wait01.c b/testcases/kernel/syscalls/wait/wait01.c
index aec91b911..8245898dd 100644
--- a/testcases/kernel/syscalls/wait/wait01.c
+++ b/testcases/kernel/syscalls/wait/wait01.c
@@ -16,7 +16,7 @@ 
 
 static void verify_wait(void)
 {
-	TST_EXP_FAIL(wait(NULL), ECHILD);
+	TST_EXP_FAIL2(wait(NULL), ECHILD);
 }
 
 static struct tst_test test = {