All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Gao via ltp <ltp@lists.linux.it>
To: Petr Vorel <pvorel@suse.cz>
Cc: Dominique Leuenberger <dleuenberger@suse.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/1] select03: Fix false positive on TCONF
Date: Wed, 13 Nov 2024 06:29:39 -0500	[thread overview]
Message-ID: <ZzSNo4jTE1v2vAR9@wegao> (raw)
In-Reply-To: <20241113105925.295697-1-pvorel@suse.cz>

On Wed, Nov 13, 2024 at 11:59:25AM +0100, Petr Vorel wrote:
> This fixes error on unsupported __NR__newselect:
> select_var.h:89: TCONF: syscall(-1) __NR__newselect not supported on your arch
> select03.c:90: TFAIL: Child exited with 32
> 
> Fixes: ffdd3b36cd ("syscalls: Add missing exit status check")
> Reported-by: Dominique Leuenberger <dleuenberger@suse.com>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> Alternatively, we could revert to previous state (remove
> "!WEXITSTATUS(status)" check), if we really don't care about any other
> exit code.
I suggest remove "!WEXITSTATUS(status)" in current case unless we clearly know all
*correct* value return from do_select_faulty_to.
> 
> 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;
> +	}
>  
>  	if (tst_variant == GLIBC_SELECT_VARIANT &&
>  	    tests[n].timeout == &invalid_to &&
> -- 
> 2.45.2
> 
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2024-11-13 11:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-13 10:59 [LTP] [PATCH 1/1] select03: Fix false positive on TCONF Petr Vorel
2024-11-13 11:29 ` Wei Gao via ltp [this message]
2024-11-13 11:29 ` Avinesh Kumar
2024-11-13 13:39 ` Cyril Hrubis
2024-11-13 14:07   ` Petr Vorel
2024-11-13 14:20     ` Cyril Hrubis
2024-11-13 15:17       ` Petr Vorel
2024-11-14 11:18         ` Petr Vorel
2024-11-13 13:46 ` Martin Doucha
2024-11-13 14:04   ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZzSNo4jTE1v2vAR9@wegao \
    --to=ltp@lists.linux.it \
    --cc=dleuenberger@suse.com \
    --cc=pvorel@suse.cz \
    --cc=wegao@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.