[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 26/30] tests: allows to run single test in usb-hc
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PATCH v2 26/30] tests: allows to run single test in usb-hcd-ehci-test |
Date: |
Tue, 21 Feb 2017 18:14:47 +0400 |
pci_init() shouldn't be a test function, but instead called before any
test. This allows to run a single test with -p /x86_64/ehci/....
Cc: Gerd Hoffmann <address@hidden>
Signed-off-by: Marc-André Lureau <address@hidden>
---
tests/usb-hcd-ehci-test.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/tests/usb-hcd-ehci-test.c b/tests/usb-hcd-ehci-test.c
index 57af8a034e..fba84b4bee 100644
--- a/tests/usb-hcd-ehci-test.c
+++ b/tests/usb-hcd-ehci-test.c
@@ -50,11 +50,8 @@ static void ehci_port_test(struct qhc *hc, int port,
uint32_t expect)
/* tests */
-static void pci_init(void)
+static void test_init(void)
{
- if (pcibus) {
- return;
- }
pcibus = qpci_init_pc(NULL);
g_assert(pcibus != NULL);
@@ -142,7 +139,7 @@ int main(int argc, char **argv)
int ret;
g_test_init(&argc, &argv, NULL);
- qtest_add_func("/ehci/pci/init", pci_init);
+
qtest_add_func("/ehci/pci/uhci-port-1", pci_uhci_port_1);
qtest_add_func("/ehci/pci/ehci-port-1", pci_ehci_port_1);
qtest_add_func("/ehci/pci/ehci-config", pci_ehci_config);
@@ -161,6 +158,8 @@ int main(int argc, char **argv)
"-drive if=none,id=usbcdrom,media=cdrom "
"-device usb-tablet,bus=ich9-ehci-1.0,port=1,usb_version=1 "
"-device usb-storage,bus=ich9-ehci-1.0,port=2,drive=usbcdrom
");
+
+ test_init();
ret = g_test_run();
qtest_end();
--
2.11.0.295.gd7dffce1c.dirty
- [Qemu-devel] [PATCH v2 20/30] tests: fix e1000e leaks, (continued)
- [Qemu-devel] [PATCH v2 20/30] tests: fix e1000e leaks, Marc-André Lureau, 2017/02/21
- [Qemu-devel] [PATCH v2 21/30] tests: fix virtio-scsi-test leak, Marc-André Lureau, 2017/02/21
- [Qemu-devel] [PATCH v2 22/30] tests: fix virtio-9p-test leaks, Marc-André Lureau, 2017/02/21
- [Qemu-devel] [PATCH v2 23/30] bus: do not unref hotplug handler, Marc-André Lureau, 2017/02/21
- [Qemu-devel] [PATCH v2 24/30] usb: replace handle_destroy with unrealize, Marc-André Lureau, 2017/02/21
- [Qemu-devel] [PATCH v2 26/30] tests: allows to run single test in usb-hcd-ehci-test,
Marc-André Lureau <=
- [Qemu-devel] [PATCH v2 25/30] usb: release the created buses, Marc-André Lureau, 2017/02/21
- [Qemu-devel] [PATCH v2 27/30] tests: fix usb-test leaks, Marc-André Lureau, 2017/02/21
- [Qemu-devel] [PATCH v2 28/30] tests: add specialized device_find function, Marc-André Lureau, 2017/02/21
- [Qemu-devel] [PATCH v2 30/30] migration: fix id leak regression, Marc-André Lureau, 2017/02/21