[Libguestfs] [libnbd PATCH 02/20] interop: Do not test against broken qemu-storage-daemon
Eric Blake
eblake at redhat.com
Tue Jun 8 12:47:38 UTC 2021
On Tue, Jun 08, 2021 at 09:53:43AM +0200, Martin Kletzander wrote:
> The version 6.0.0 has very often a bug that makes the test fail, but which
> should be fixed in later versions. Version 5.1.0 has an issue as well. The
> version check is not the nicest way to check for this, but is enough.
>
> Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
>
> asdf
>
> Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
Bogus line and double s-o-b is odd.
> ---
> interop/interop-qemu-storage-daemon.sh | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/interop/interop-qemu-storage-daemon.sh b/interop/interop-qemu-storage-daemon.sh
> index 09d1898ef459..dc1efcdf4ca1 100755
> --- a/interop/interop-qemu-storage-daemon.sh
> +++ b/interop/interop-qemu-storage-daemon.sh
> @@ -23,7 +23,10 @@ set -e
> set -x
>
> requires test "x$QEMU_STORAGE_DAEMON" != "x"
> -requires $QEMU_STORAGE_DAEMON --version
> +requires sed --version
> +qsd_version="$($QEMU_STORAGE_DAEMON --version | sed -n '1s/qemu-storage-daemon version \([0-9.]*\) .*/\1/p')"
Long line, you could use backslash-newline to wrap it
> +requires_not test "$qsd_version" = "6.0.0"
> +requires_not test "$qsd_version" = "5.1.0"
Yeah, a bit ugly (especially once downstreams start shipping a variant
of 6.0 with the patch backported), but does the job.
Could we instead make it a feature check, by attempting to fire up
qemu-storage-daemon with socket activation and checking for the known
failure mode?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
More information about the Libguestfs
mailing list