qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tests/decode: Emit TAP


From: Peter Maydell
Subject: Re: [PATCH] tests/decode: Emit TAP
Date: Thu, 25 May 2023 11:00:12 +0100

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.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]