[PATCH 0/4] tests/qtest: Check for devices and machines before adding tests

Thomas Huth posted 4 patches 2 years, 4 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20211220081054.151515-1-thuth@redhat.com
Maintainers: John Snow <jsnow@redhat.com>, Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
tests/qtest/boot-order-test.c |  5 +++
tests/qtest/cdrom-test.c      | 60 +++++++++++++++++++++++------------
tests/qtest/endianness-test.c |  5 ++-
tests/qtest/libqos/libqtest.h |  8 +++++
tests/qtest/libqtest.c        | 44 +++++++++++++++++++++++++
5 files changed, 100 insertions(+), 22 deletions(-)
[PATCH 0/4] tests/qtest: Check for devices and machines before adding tests
Posted by Thomas Huth 2 years, 4 months ago
Devices might not always be compiled into the QEMU target binaries.
We already have the libqos framework that is good for handling such
situations, but some of the qtests are not a real good fit for the
libqos framework. This patch series adds a new function to check
whether a device is available in the target binary or not, so that
tests can be run or skipped accordingly (also adding some additional
checks for the availability of machines in the target binaries).

Thomas Huth (4):
  tests/qtest: Add a function that checks whether a device is available
  tests/qtest: Improve endianness-test to work with missing machines and
    devices
  tests/qtest/cdrom-test: Check whether devices are available before
    using them
  tests/qtest/boot-order-test: Check whether machines are available

 tests/qtest/boot-order-test.c |  5 +++
 tests/qtest/cdrom-test.c      | 60 +++++++++++++++++++++++------------
 tests/qtest/endianness-test.c |  5 ++-
 tests/qtest/libqos/libqtest.h |  8 +++++
 tests/qtest/libqtest.c        | 44 +++++++++++++++++++++++++
 5 files changed, 100 insertions(+), 22 deletions(-)

-- 
2.27.0


Re: [PATCH 0/4] tests/qtest: Check for devices and machines before adding tests
Posted by Philippe Mathieu-Daudé 2 years, 4 months ago
On 20/12/21 09:10, Thomas Huth wrote:
> Devices might not always be compiled into the QEMU target binaries.
> We already have the libqos framework that is good for handling such
> situations, but some of the qtests are not a real good fit for the
> libqos framework. This patch series adds a new function to check
> whether a device is available in the target binary or not, so that
> tests can be run or skipped accordingly (also adding some additional
> checks for the availability of machines in the target binaries).

What happens if a device or machine is inadvertently removed from the
build? We won't notice it directly anymore, right?