Based on: <20230208192654.8854-1-faro...@suse.de> [PATCH v2 00/10] Kconfig vs. default devices https://lore.kernel.org/r/20230208192654.8854-1-faro...@suse.de
v2: patch 3 - fixed typo s/PCIE_ROOT/PCIE_PORT and dropped runtime check; patch 4 - dropped runtime check and added a dep on CONFIG_VIRTIO_SERIAL; patch 7 - added skip messages and folded look_for_device_builtin into has_device_builtin; patch 9 - dropped runtime check; v1: https://lore.kernel.org/r/20230206150416.4604-1-faro...@suse.de 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-faro...@suse.de> [PATCH 00/10] Kconfig vs. default devices https://lore.kernel.org/r/20230206140809.26028-1-faro...@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_PORT for virtio-net-failover.c tests/qtest: Don't build virtio-serial-test.c if device not present tests/qtest: hd-geo-test: Check for missing devices test/qtest: Fix coding style in device-plug-test.c 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 tests/qemu-iotests/186 | 1 + tests/qtest/bios-tables-test.c | 75 ++++++++++++++++++++++++++++-- tests/qtest/device-plug-test.c | 41 ++++++++++++---- tests/qtest/drive_del-test.c | 65 ++++++++++++++++++++++++++ tests/qtest/fuzz-lsi53c895a-test.c | 4 ++ tests/qtest/hd-geo-test.c | 38 +++++++++------ tests/qtest/meson.build | 17 +++++-- tests/qtest/pxe-test.c | 4 ++ 8 files changed, 214 insertions(+), 31 deletions(-) -- 2.35.3