qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/12] qtests vs. default devices
@ 2023-02-06 15:04 Fabiano Rosas
  2023-02-06 15:04 ` [PATCH 01/12] tests/qtest: Skip PXE tests for missing devices Fabiano Rosas
                   ` (11 more replies)
  0 siblings, 12 replies; 40+ messages in thread
From: Fabiano Rosas @ 2023-02-06 15:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Thomas Huth

Most of our tests assume the presence of default devices. When
building --without-default-devices or with individual CONFIGs
disabled, several tests fail.

I went through them one by one and did local changes to skip or avoid
including tests that require devices that are missing. With these
initial changes, 'make check' now passes for the
--without-default-devices build for x86 and arm.

However, the approach of making local changes seems hard to maintain:
every time a CONFIG changes from 'y' to 'n' a test might break and all
new tests need to remember to check before adding devices, which some
tests add several.

So the last patch in the series provides an alternative: Parse the
command line at qtest_init and skip the test if devices are
missing. Individual tests would have to check 'if (!qts)' and
bail. Seems a bit heavy-weight, but it would mean we don't have to put
a qtest_has_device check for every device in every test.

Based on: <20230206140809.26028-1-farosas@suse.de>
[PATCH 00/10] Kconfig vs. default devices
https://lore.kernel.org/r/20230206140809.26028-1-farosas@suse.de

Fabiano Rosas (12):
  tests/qtest: Skip PXE tests for missing devices
  tests/qtest: Do not run lsi53c895a test if device is not present
  tests/qtest: Add dependence on PCIE_ROOT for virtio-net-failover.c
  tests/qtest: Skip virtio-serial-console tests if device not present
  tests/qtest: hd-geo-test: Check for missing devices
  tests/qtest: Skip unplug tests that use missing devices
  tests/qtest: drive_del-test: Skip tests that require missing devices
  tests/qtest: Check for devices in bios-tables-test
  tests/qtest: Do not include hexloader-test if loader device is not
    present
  tests/qemu-iotests: Require virtio-scsi-pci
  tests/qtest: bios-tables-test: Skip if missing configs
  [NOT FOR MERGE] tests/qtest: Introduce qtest_validate_args

 tests/qemu-iotests/186             |   1 +
 tests/qtest/bios-tables-test.c     |  75 +++++++++++++++-
 tests/qtest/device-plug-test.c     |  19 ++++
 tests/qtest/drive_del-test.c       |  70 +++++++++++++++
 tests/qtest/fuzz-lsi53c895a-test.c |   4 +
 tests/qtest/hd-geo-test.c          |  38 +++++---
 tests/qtest/hexloader-test.c       |   5 ++
 tests/qtest/libqtest.c             | 137 ++++++++++++++++++++++++++++-
 tests/qtest/libqtest.h             |  12 +++
 tests/qtest/meson.build            |  11 ++-
 tests/qtest/pxe-test.c             |   4 +
 tests/qtest/virtio-net-failover.c  |   5 ++
 tests/qtest/virtio-serial-test.c   |   4 +
 13 files changed, 363 insertions(+), 22 deletions(-)

-- 
2.35.3



^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2023-02-08 14:26 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-06 15:04 [PATCH 00/12] qtests vs. default devices Fabiano Rosas
2023-02-06 15:04 ` [PATCH 01/12] tests/qtest: Skip PXE tests for missing devices Fabiano Rosas
2023-02-07 13:14   ` Thomas Huth
2023-02-06 15:04 ` [PATCH 02/12] tests/qtest: Do not run lsi53c895a test if device is not present Fabiano Rosas
2023-02-06 15:31   ` Philippe Mathieu-Daudé
2023-02-06 17:46     ` Fabiano Rosas
2023-02-06 18:52       ` Philippe Mathieu-Daudé
2023-02-07 13:12   ` Thomas Huth
2023-02-07 14:02     ` Fabiano Rosas
2023-02-07 14:12       ` Thomas Huth
2023-02-06 15:04 ` [PATCH 03/12] tests/qtest: Add dependence on PCIE_ROOT for virtio-net-failover.c Fabiano Rosas
2023-02-07 13:22   ` Thomas Huth
2023-02-07 15:02     ` Fabiano Rosas
2023-02-06 15:04 ` [PATCH 04/12] tests/qtest: Skip virtio-serial-console tests if device not present Fabiano Rosas
2023-02-07 13:25   ` Thomas Huth
2023-02-07 15:35     ` Laurent Vivier
2023-02-07 13:37   ` Thomas Huth
2023-02-06 15:04 ` [PATCH 05/12] tests/qtest: hd-geo-test: Check for missing devices Fabiano Rosas
2023-02-07 13:52   ` Thomas Huth
2023-02-06 15:04 ` [PATCH 06/12] tests/qtest: Skip unplug tests that use " Fabiano Rosas
2023-02-07 13:59   ` Thomas Huth
2023-02-07 14:17     ` Fabiano Rosas
2023-02-07 14:22       ` Thomas Huth
2023-02-06 15:04 ` [PATCH 07/12] tests/qtest: drive_del-test: Skip tests that require " Fabiano Rosas
2023-02-07 14:20   ` Thomas Huth
2023-02-07 14:32     ` Fabiano Rosas
2023-02-06 15:04 ` [PATCH 08/12] tests/qtest: Check for devices in bios-tables-test Fabiano Rosas
2023-02-06 15:21   ` Michael S. Tsirkin
2023-02-06 15:04 ` [PATCH 09/12] tests/qtest: Do not include hexloader-test if loader device is not present Fabiano Rosas
2023-02-07 14:30   ` Thomas Huth
2023-02-06 15:04 ` [PATCH 10/12] tests/qemu-iotests: Require virtio-scsi-pci Fabiano Rosas
2023-02-07 14:32   ` Thomas Huth
2023-02-06 15:04 ` [PATCH 11/12] tests/qtest: bios-tables-test: Skip if missing configs Fabiano Rosas
2023-02-07 14:35   ` Thomas Huth
2023-02-07 14:42     ` Michael S. Tsirkin
2023-02-08 10:52       ` Igor Mammedov
2023-02-08 14:25         ` Michael S. Tsirkin
2023-02-06 15:04 ` [PATCH 12/12] [NOT FOR MERGE] tests/qtest: Introduce qtest_validate_args Fabiano Rosas
2023-02-07 14:55   ` Thomas Huth
2023-02-07 15:35     ` Fabiano Rosas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).