aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2023-05-11 13:59:00 +0200
committerThomas Huth <thuth@redhat.com>2023-05-22 09:44:48 +0200
commit9b76fc5a71689d06d219fc9662ac43a64469d08a (patch)
treeed9c016fb6740b8c2abe0332e0ed651f21c14410 /tests
parent335da81152357114b5d5dbfebb680a886b78fe0a (diff)
tests/qtest/usb-hcd-uhci-test: Skip test if UHCI controller is not available
The test is already fenced with CONFIG_USB_UHCI in meson.build, but in case we build the ppc or mips targets in parallel, this config switch is still set in "config_all_devices" and thus the test is still run. Thus we need an explicit additional check here before adding the tests to the test plan. Message-Id: <20230512124033.502654-13-thuth@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/qtest/usb-hcd-uhci-test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/qtest/usb-hcd-uhci-test.c b/tests/qtest/usb-hcd-uhci-test.c
index f264d2bf73..84ac2f3c1a 100644
--- a/tests/qtest/usb-hcd-uhci-test.c
+++ b/tests/qtest/usb-hcd-uhci-test.c
@@ -66,6 +66,11 @@ int main(int argc, char **argv)
g_test_init(&argc, &argv, NULL);
+ if (!qtest_has_device("piix3-usb-uhci")) {
+ g_debug("piix3-usb-uhci not available");
+ return 0;
+ }
+
qtest_add_func("/uhci/pci/init", test_uhci_init);
qtest_add_func("/uhci/pci/port1", test_port_1);
qtest_add_func("/uhci/pci/hotplug", test_uhci_hotplug);