qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 5/5] usb-hcd-ehci-test: add ehci hotplug/unplug qtes


From: arei.gonglei
Subject: [Qemu-devel] [PATCH 5/5] usb-hcd-ehci-test: add ehci hotplug/unplug qtest
Date: Tue, 17 Jun 2014 16:04:03 +0800

From: Gonglei <address@hidden>

Signed-off-by: Gonglei <address@hidden>
---
 tests/usb-hcd-ehci-test.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/tests/usb-hcd-ehci-test.c b/tests/usb-hcd-ehci-test.c
index e1427f5..831e868 100644
--- a/tests/usb-hcd-ehci-test.c
+++ b/tests/usb-hcd-ehci-test.c
@@ -175,6 +175,19 @@ static void pci_qtest_stop(void)
     qtest_end();
 }
 
+static void test_ehci_hotplug(void)
+{
+    qtest_start("");
+
+    /* hotplug an ehci controller */
+    qmp_exec_hmp_cmd("", "device_add usb-ehci,id=ehci");
+
+    /* hot unplug an ehci controller */
+    qmp_exec_hmp_cmd("", "device_del ehci");
+
+    qtest_end();
+}
+
 int main(int argc, char **argv)
 {
     int ret;
@@ -191,6 +204,8 @@ int main(int argc, char **argv)
     qtest_add_func("/ehci/pci/ehci-port-2", pci_ehci_port_2);
     qtest_add_func("/ehci/pci/qtest_stop", pci_qtest_stop);
 
+    qtest_add_func("/ehci/pci/ehci-hotplug", test_ehci_hotplug);
+
     ret = g_test_run();
 
     return ret;
-- 
1.7.12.4





reply via email to

[Prev in Thread] Current Thread [Next in Thread]