Skip to content

Commit

Permalink
wait01: Use TST_EXP_FAIL2() for wait
Browse files Browse the repository at this point in the history
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.

Link: https://lore.kernel.org/ltp/20240509144046.312245-1-pvorel@suse.cz/
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
  • Loading branch information
pevik committed May 9, 2024
1 parent 059cb02 commit 8c9ecdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testcases/kernel/syscalls/wait/wait01.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 8c9ecdf

Please sign in to comment.