qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] libqtest: refuse QTEST_QEMU_BINARY=qemu-kvm


From: Peter Maydell
Subject: Re: [PATCH] libqtest: refuse QTEST_QEMU_BINARY=qemu-kvm
Date: Thu, 8 Apr 2021 10:49:20 +0000

On Wed, 7 Apr 2021 at 11:46, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> Some downstreams rename the QEMU binary to "qemu-kvm". This breaks
> qtest_get_arch(), which attempts to parse the target architecture from
> the QTEST_QEMU_BINARY environment variable.
>
> Print an error instead of returning the architecture "kvm". Things fail
> in weird ways when the architecture string is bogus.
>
> Arguably qtests should always be run in a build directory instead of
> against an installed QEMU. In any case, printing a clear error when this
> happens is helpful.
>
> Reported-by: Qin Wang <qinwang@rehdat.com>
> Cc: Emanuele Giuseppe Esposito <eesposit@redhat.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  tests/qtest/libqtest.c | 8 ++++++++
>  1 file changed, 8 insertions(+)

This way of figuring out the architecture has always been a bit cheesy.
It makes it awkward for instance if you want to put a wrapper script
around the qemu binary (to enable debug options, for instance) -- you
have to be careful to name the script with the right suffix.

thanks
-- PMM



reply via email to

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