On Wed, 7 Apr 2021 at 11:46, Stefan Hajnoczi <[email protected]> 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 <[email protected]> > Cc: Emanuele Giuseppe Esposito <[email protected]> > Signed-off-by: Stefan Hajnoczi <[email protected]> > --- > 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
