On 01/27/2018 05:41 AM, Richard W.M. Jones wrote:
Currently we test for qemu-img, socat, ss, certtool, etc at run
time,
but we test for qemu-io at compile time (in ./configure). This commit
removes this inconsistency.
I would consider the opposite patch (which makes qemu-img etc tested
at configure time).
The main advantage of testing for these binaries at run time is that
tests are not "silently" omitted. Instead tests with insufficient
dependencies are now reported as ‘SKIP’, which I think gives packagers
a better overview of their coverage of the test suite.
I recently changed the Fedora build so we run the test suite on every
architecture, and it's interesting that x86_64 is now running and
passing 40 tests, but some architectures (s390x for instance) only
manage 17 passes with the rest being skipped for multiple reasons.
Disadvantages:
- Can't override the location of these binaries eg by setting
QEMU_IO=/opt/qemu/bin/qemu-io ./configure
We could still do things like:
: ${QEMU_IO=qemu-io}
at the start of tests, which lets the user set $QEMU_IO as an override,
but defaults to calling the first one on the path otherwise; as long as
we still do runtime detection of whether $QEMU_IO behaves like the test
expects, that would be reasonable.
- ./configure doesn't report missing soft dependencies.
Even if it reported them, it wouldn't change the exit status, so you'd
still have to read the logs to see why things were skipped.
The idea seems reasonable to me.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization:
qemu.org |
libvirt.org