summaryrefslogtreecommitdiff
path: root/tests/usb-hcd-ohci-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/usb-hcd-ohci-test.c')
-rw-r--r--tests/usb-hcd-ohci-test.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/usb-hcd-ohci-test.c b/tests/usb-hcd-ohci-test.c
index fbc3ffeebd..1160bde840 100644
--- a/tests/usb-hcd-ohci-test.c
+++ b/tests/usb-hcd-ohci-test.c
@@ -11,15 +11,18 @@
#include <string.h>
#include "libqtest.h"
#include "qemu/osdep.h"
+#include "libqos/usb.h"
static void test_ohci_init(void)
{
- qtest_start("-device pci-ohci,id=ohci");
- qtest_end();
}
+static void test_ohci_hotplug(void)
+{
+ usb_test_hotplug("ohci", 1, NULL);
+}
int main(int argc, char **argv)
{
@@ -28,8 +31,11 @@ int main(int argc, char **argv)
g_test_init(&argc, &argv, NULL);
qtest_add_func("/ohci/pci/init", test_ohci_init);
+ qtest_add_func("/ohci/pci/hotplug", test_ohci_hotplug);
+ qtest_start("-device pci-ohci,id=ohci");
ret = g_test_run();
+ qtest_end();
return ret;
}