[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/14] check: Only test usb storage when it is compi
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 07/14] check: Only test usb storage when it is compiled in |
Date: |
Tue, 17 Jul 2018 14:04:07 +0200 |
Signed-off-by: Juan Quintela <address@hidden>
---
tests/Makefile.include | 2 +-
tests/usb-hcd-uhci-test.c | 5 ++++-
tests/usb-hcd-xhci-test.c | 4 ++++
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 6565206a78..9193945c24 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -284,7 +284,7 @@ check-qtest-i386-$(CONFIG_USB_OHCI) +=
tests/usb-hcd-ohci-test$(EXESUF)
gcov-files-i386-$(CONFIG_USB_OHCI) += hw/usb/hcd-ohci.c
check-qtest-i386-$(CONFIG_USB_UHCI) += tests/usb-hcd-uhci-test$(EXESUF)
gcov-files-i386-$(CONFIG_USB_UHCI) += hw/usb/hcd-uhci.c
-check-qtest-i386-$(CONFIG_USB_EHCI) += tests/usb-hcd-ehci-test$(EXESUF)
+check-qtest-i386-$(call land, $(CONFIG_USB_EHCI), $(CONFIG_USB_STORAGE_BOT))
+= tests/usb-hcd-ehci-test$(EXESUF)
gcov-files-i386-$(CONFIG_USB_EHCI) += hw/usb/hcd-ehci.c
gcov-files-i386-y += hw/usb/dev-hid.c
gcov-files-i386-y += hw/usb/dev-storage.c
diff --git a/tests/usb-hcd-uhci-test.c b/tests/usb-hcd-uhci-test.c
index 6a7e5a2fed..bf996af6c6 100644
--- a/tests/usb-hcd-uhci-test.c
+++ b/tests/usb-hcd-uhci-test.c
@@ -46,12 +46,14 @@ static void test_uhci_hotplug(void)
usb_test_hotplug("uhci", 2, test_port_2);
}
+#ifdef CONFIG_USB_STORAGE_BOT
static void test_usb_storage_hotplug(void)
{
qtest_qmp_device_add("usb-storage", "usbdev0", "'drive': 'drive0'");
qtest_qmp_device_del("usbdev0");
}
+#endif
int main(int argc, char **argv)
{
@@ -66,8 +68,9 @@ int main(int argc, char **argv)
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);
+#ifdef CONFIG_USB_STORAGE_BOT
qtest_add_func("/uhci/pci/hotplug/usb-storage", test_usb_storage_hotplug);
-
+#endif
if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
qs = qtest_pc_boot(cmd);
} else if (strcmp(arch, "ppc64") == 0) {
diff --git a/tests/usb-hcd-xhci-test.c b/tests/usb-hcd-xhci-test.c
index be80c5f032..a8996800b2 100644
--- a/tests/usb-hcd-xhci-test.c
+++ b/tests/usb-hcd-xhci-test.c
@@ -21,6 +21,7 @@ static void test_xhci_hotplug(void)
usb_test_hotplug("xhci", 1, NULL);
}
+#ifdef CONFIG_USB_STORAGE_UAS
static void test_usb_uas_hotplug(void)
{
qtest_qmp_device_add("usb-uas", "uas", NULL);
@@ -34,6 +35,7 @@ static void test_usb_uas_hotplug(void)
qtest_qmp_device_del("scsihd");
qtest_qmp_device_del("uas");
}
+#endif
#ifdef CONFIG_USB_SMARTCARD
static void test_usb_ccid_hotplug(void)
@@ -54,7 +56,9 @@ int main(int argc, char **argv)
qtest_add_func("/xhci/pci/init", test_xhci_init);
qtest_add_func("/xhci/pci/hotplug", test_xhci_hotplug);
+#ifdef CONFIG_USB_STORAGE_UAS
qtest_add_func("/xhci/pci/hotplug/usb-uas", test_usb_uas_hotplug);
+#endif
#ifdef CONFIG_USB_SMARTCARD
qtest_add_func("/xhci/pci/hotplug/usb-ccid", test_usb_ccid_hotplug);
#endif
--
2.17.1
- [Qemu-devel] [RFC 00/14] More patches to disable stuff, Juan Quintela, 2018/07/17
- [Qemu-devel] [PATCH 03/14] check: Only test lsi when it is compiled in, Juan Quintela, 2018/07/17
- [Qemu-devel] [PATCH 04/14] check: Only test esp when it is compiled in, Juan Quintela, 2018/07/17
- [Qemu-devel] [PATCH 05/14] check: Only test sga when it is compiled in, Juan Quintela, 2018/07/17
- [Qemu-devel] [PATCH 02/14] check: Only test megasas when it is compiled in, Juan Quintela, 2018/07/17
- [Qemu-devel] [PATCH 01/14] check: Only test ipmi when it is compiled in, Juan Quintela, 2018/07/17
- [Qemu-devel] [PATCH 06/14] check: Only test usb smartcard when it is compiled in, Juan Quintela, 2018/07/17
- [Qemu-devel] [PATCH 09/14] check: Only test virtio-balloon when it is compiled in, Juan Quintela, 2018/07/17
- [Qemu-devel] [PATCH 07/14] check: Only test usb storage when it is compiled in,
Juan Quintela <=
- [Qemu-devel] [PATCH 08/14] check: Only test nvdim_acpi when it is compiled in, Juan Quintela, 2018/07/17
- [Qemu-devel] [PATCH 13/14] check: Only test virtio-input when it is compiled in, Juan Quintela, 2018/07/17
- [Qemu-devel] [PATCH 10/14] check: Only test virtio-serial when it is compiled in, Juan Quintela, 2018/07/17
- [Qemu-devel] [PATCH 12/14] check: Only test virtio-gpu when it is compiled in, Juan Quintela, 2018/07/17
- [Qemu-devel] [PATCH 14/14] check: Only test virtio-scsi when it is compiled in, Juan Quintela, 2018/07/17
- [Qemu-devel] [PATCH 11/14] check: Only test virtio-rng when it is compiled in, Juan Quintela, 2018/07/17
- Re: [Qemu-devel] [RFC 00/14] More patches to disable stuff, Thomas Huth, 2018/07/17