From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] tests/decode: Emit TAP
Date: Thu, 25 May 2023 06:11:49 -0700 [thread overview]
Message-ID: <17eba1f4-f768-6dd9-5503-01901cf21a53@linaro.org> (raw)
In-Reply-To: <CAFEAcA9+BGdG6bShPQ+SZzJNOjMAMJ2fVYqpcvR4vOVums+dMQ@mail.gmail.com>
On 5/25/23 03:00, Peter Maydell wrote:
> On Wed, 24 May 2023 at 18:38, Richard Henderson
> <richard.henderson@linaro.org> wrote:
>>
>> We currently print FAIL for the failure of a succ_* test, but don't
>> return a failure exit code. Instead, convert the script to emit
>> Test Anything Protocol, which gives visibility into each subtest
>> as well as not relying on exit codes.
>>
>> Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> ---
>> tests/decode/check.sh | 36 ++++++++++++++++++++++++++----------
>> tests/meson.build | 1 +
>> 2 files changed, 27 insertions(+), 10 deletions(-)
>>
>> diff --git a/tests/decode/check.sh b/tests/decode/check.sh
>> index 95445a0115..a3d879a099 100755
>> --- a/tests/decode/check.sh
>> +++ b/tests/decode/check.sh
>> @@ -4,21 +4,37 @@
>>
>> PYTHON=$1
>> DECODETREE=$2
>> -E=0
>> +E_FILES=`echo err_*.decode`
>> +S_FILES=`echo succ_*.decode`
>
> If you run shellcheck on this script it produces some
> style complaints. Notably:
>
> * $(...) is better than `...`
> * j=$(($j + 1)) is better than j=`expr $j + 1`
>
> At least some of its "missing quoting" complaints are
> also legitimate, notably on $PYTHON and $DECODETREE.
"Better" in what sense? Also, this is /bin/sh, not /bin/bash, so I'm never certain what
I'm really allowed to use.
I was already half tempted to convert the script to python anyway...
r~
next prev parent reply other threads:[~2023-05-25 13:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-24 17:38 [PATCH] tests/decode: Emit TAP Richard Henderson
2023-05-25 10:00 ` Peter Maydell
2023-05-25 13:11 ` Richard Henderson [this message]
2023-05-25 13:22 ` Peter Maydell
2023-05-25 13:35 ` Paolo Bonzini
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=17eba1f4-f768-6dd9-5503-01901cf21a53@linaro.org \
--to=richard.henderson@linaro.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).