[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/5] iotests: Skip "make check-block" if QEMU does not suppor
From: |
Max Reitz |
Subject: |
Re: [PATCH 4/5] iotests: Skip "make check-block" if QEMU does not support virtio-blk |
Date: |
Fri, 18 Oct 2019 19:08:45 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 |
On 11.10.19 16:50, Thomas Huth wrote:
> The next patch is going to add some python-based tests to the "auto"
> group, and these tests require virtio-blk to work properly. Running
> iotests without virtio-blk likely does not make too much sense anyway,
> so instead of adding a check for the availability of virtio-blk to each
> and every test (which does not sound very appealing), let's rather add
> a check for this at the top level in the check-block.sh script instead
> (so that it is possible to run "make check" without the "check-block"
> part for qemu-system-tricore for example).
>
> Signed-off-by: Thomas Huth <address@hidden>
> ---
> tests/check-block.sh | 16 +++++++++++++++-
> 1 file changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/tests/check-block.sh b/tests/check-block.sh
> index 679aedec50..7582347ec2 100755
> --- a/tests/check-block.sh
> +++ b/tests/check-block.sh
> @@ -26,10 +26,24 @@ if grep -q "CFLAGS.*-fsanitize" config-host.mak
> 2>/dev/null ; then
> exit 0
> fi
>
> -if [ -z "$(find . -name 'qemu-system-*' -print)" ]; then
> +if [ -n "$QEMU_PROG" ]; then
> + qemu_prog="$QEMU_PROG"
> +else
> + for binary in *-softmmu/qemu-system-* ; do
> + if [ -x "$binary" ]; then
> + qemu_prog="$binary"
> + break
> + fi
> + done
> +fi
> +if [ -z "$qemu_prog" ]; then
> echo "No qemu-system binary available ==> Not running the qemu-iotests."
> exit 0
> fi
> +if ! "$qemu_prog" -M none -device help | grep virtio-blk >/dev/null 2>&1 ;
> then
Maybe grep -q?
Reviewed-by: Max Reitz <address@hidden>
signature.asc
Description: OpenPGP digital signature