diff options
author | Igor Mammedov <imammedo@redhat.com> | 2014-09-26 09:28:14 +0000 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2014-10-15 05:03:13 +0200 |
commit | b3937683147481fba3406a01da4ce15f0b2deb21 (patch) | |
tree | 6b03dc1a4e4d72397e4f8757a813a5459beabecd /tests/usb-hcd-ohci-test.c | |
parent | fbd942c993001f5276fcd1f25a56405fdd968472 (diff) |
tests: usb: Generic usb device hotplug
use usb-tablet as a hotplugged usb device.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'tests/usb-hcd-ohci-test.c')
-rw-r--r-- | tests/usb-hcd-ohci-test.c | 10 |
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; } |