Linux DTrace development list
 help / color / mirror / Atom feed
From: Kris Van Hees <kris.van.hees@oracle.com>
To: Sam James <sam@gentoo.org>
Cc: dtrace@lists.linux.dev
Subject: Re: [PATCH 1/3] test: fix exit code in tst.ipv4remotetcp.sh
Date: Fri, 11 Oct 2024 23:29:03 -0400	[thread overview]
Message-ID: <Zwns/1IbsMPNKJsK@oracle.com> (raw)
In-Reply-To: <4c6a974d2b5fa9a0ff8935428b5c3026109e5127.1724112622.git.sam@gentoo.org>

On Tue, Aug 20, 2024 at 01:10:20AM +0100, Sam James wrote:
> $? was clobbered by the status=$? assignment above, see:
> ```
> $ bash -c 'false ; x=$? ; echo $? ; echo ${x}'
> 0
> 1
> ```
> 
> We could just drop the status assignment but I just chose to do this
> instead.

Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>

... and committed with Signed-off-by added.

> ---
>  test/unittest/ip/tst.ipv4remotetcp.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/test/unittest/ip/tst.ipv4remotetcp.sh b/test/unittest/ip/tst.ipv4remotetcp.sh
> index 32c3435a..99ba1161 100755
> --- a/test/unittest/ip/tst.ipv4remotetcp.sh
> +++ b/test/unittest/ip/tst.ipv4remotetcp.sh
> @@ -98,4 +98,4 @@ EODTRACE
>  
>  status=$?
>  
> -exit $?
> +exit ${status}
> -- 
> 2.46.0
> 

  reply	other threads:[~2024-10-12  3:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-20  0:10 [PATCH 0/3] Test exit code fixlets Sam James
2024-08-20  0:10 ` [PATCH 1/3] test: fix exit code in tst.ipv4remotetcp.sh Sam James
2024-10-12  3:29   ` Kris Van Hees [this message]
2024-08-20  0:10 ` [PATCH 2/3] test: fix exit code typo in tst.core.sh Sam James
2024-10-12  3:29   ` Kris Van Hees
2024-08-20  0:10 ` [PATCH 3/3] test: fix exit code in tst.newprobes.sh Sam James
2024-08-20  2:14   ` Eugene Loh
2024-10-12  3:29   ` Kris Van Hees
2024-10-12  3:55     ` Eugene Loh
2024-10-12  4:13       ` Kris Van Hees

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=Zwns/1IbsMPNKJsK@oracle.com \
    --to=kris.van.hees@oracle.com \
    --cc=dtrace@lists.linux.dev \
    --cc=sam@gentoo.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox