Skip to content

Commit

Permalink
Revert "syscalls: Add missing exit status check"
Browse files Browse the repository at this point in the history
This reverts commit ffdd3b3.

This brought a regression to select03.c on 64bit which does not support
__NR__newselect:

select_var.h:89: TCONF: syscall(-1) __NR__newselect not supported on your arch
select03.c:90: TFAIL: Child exited with 32

This is due code in tst_vbrk_() which exits with the test with a return
value in the case of a child processes. Once this is fixed, this change
can be applied again.

Link: https://lore.kernel.org/ltp/ZzSr-X47F4MfM831@yuki.lan/
Acked-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
  • Loading branch information
pevik committed Nov 14, 2024
1 parent 762ee52 commit b21fd20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions testcases/kernel/syscalls/madvise/madvise08.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,15 @@ static pid_t run_child(int advice)
fmem,
FMEMSIZE,
advstr);
exit(0);
exit(1);
}
abort();
}

SAFE_WAITPID(pid, &status, 0);
if (WIFSIGNALED(status) && WCOREDUMP(status))
return pid;
if (WIFEXITED(status) && !WEXITSTATUS(status))
if (WIFEXITED(status))
return 0;

tst_res(TCONF, "No coredump produced after signal (%d)",
Expand Down
2 changes: 1 addition & 1 deletion testcases/kernel/syscalls/select/select03.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static void run(unsigned int n)

SAFE_WAITPID(pid, &status, 0);

if (WIFEXITED(status) && !WEXITSTATUS(status))
if (WIFEXITED(status))
return;

if (tst_variant == GLIBC_SELECT_VARIANT &&
Expand Down

0 comments on commit b21fd20

Please sign in to comment.