[LTP] [PATCH 1/1] wait01: Use TST_EXP_FAIL2() for wait
Petr Vorel
pvorel@suse.cz
Thu May 9 16:40:46 CEST 2024
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(-)
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 = {
--
2.43.0
More information about the ltp
mailing list