[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 00/12] qtests vs. default devices
From: |
Fabiano Rosas |
Subject: |
[PATCH 00/12] qtests vs. default devices |
Date: |
Mon, 6 Feb 2023 12:04:04 -0300 |
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
20230206140809.26028-1-farosas@suse.de">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
- [PATCH 00/12] qtests vs. default devices,
Fabiano Rosas <=
[PATCH 03/12] tests/qtest: Add dependence on PCIE_ROOT for virtio-net-failover.c, Fabiano Rosas, 2023/02/06