[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
- [Qemu-devel] [PATCH 0/5] tests: add usb host adapter qtest cases, arei.gonglei, 2014/06/17
- [Qemu-devel] [PATCH 1/5] tests: add OHCI qtest, arei.gonglei, 2014/06/17
- [Qemu-devel] [PATCH 3/5] tests: add xHCI qtest, arei.gonglei, 2014/06/17
- [Qemu-devel] [PATCH 5/5] usb-hcd-ehci-test: add ehci hotplug/unplug qtest,
arei.gonglei <=
- [Qemu-devel] [PATCH 2/5] tests: add UHCI qtest, arei.gonglei, 2014/06/17
- [Qemu-devel] [PATCH 4/5] usb-hcd-ehci-test: change ehci qtest more expansively, arei.gonglei, 2014/06/17
- Re: [Qemu-devel] [PATCH 0/5] tests: add usb host adapter qtest cases, Gerd Hoffmann, 2014/06/19