[LTP] [PATCH 1/1] select03: Fix false positive on TCONF
Cyril Hrubis
chrubis@suse.cz
Wed Nov 13 14:39:05 CET 2024
Hi!
> ---
> Alternatively, we could revert to previous state (remove
> "!WEXITSTATUS(status)" check), if we really don't care about any other
> exit code.
>
> Kind regards,
> Petr
>
> testcases/kernel/syscalls/select/select03.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/testcases/kernel/syscalls/select/select03.c b/testcases/kernel/syscalls/select/select03.c
> index 216b22104f..34aea12603 100644
> --- a/testcases/kernel/syscalls/select/select03.c
> +++ b/testcases/kernel/syscalls/select/select03.c
> @@ -77,8 +77,10 @@ static void run(unsigned int n)
>
> SAFE_WAITPID(pid, &status, 0);
>
> - if (WIFEXITED(status) && !WEXITSTATUS(status))
> + if (WIFEXITED(status) &&
> + (WEXITSTATUS(status) == 0 || WEXITSTATUS(status) == TCONF)) {
> return;
I think that the main mistake here is that I kept the code in
tst_vbrk_() that exits the test with a return value in the case of a
child processes. So ideal fix would be to change the test library not to
do that, but that would require a bit more work, especially we would
have to look at all WAITPID() usages in newlib tests and make sure that
there are not tests that depends on such behavior. If there are none it
would stil require a few changes in the test library.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list