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-xhci-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-xhci-test.c')
-rw-r--r-- | tests/usb-hcd-xhci-test.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/usb-hcd-xhci-test.c b/tests/usb-hcd-xhci-test.c index 743e9798cd..d16963d3f7 100644 --- a/tests/usb-hcd-xhci-test.c +++ b/tests/usb-hcd-xhci-test.c @@ -11,15 +11,17 @@ #include <string.h> #include "libqtest.h" #include "qemu/osdep.h" +#include "libqos/usb.h" static void test_xhci_init(void) { - qtest_start("-device nec-usb-xhci,id=xhci"); - - qtest_end(); } +static void test_xhci_hotplug(void) +{ + usb_test_hotplug("xhci", 1, NULL); +} int main(int argc, char **argv) { @@ -28,8 +30,11 @@ int main(int argc, char **argv) g_test_init(&argc, &argv, NULL); qtest_add_func("/xhci/pci/init", test_xhci_init); + qtest_add_func("/xhci/pci/hotplug", test_xhci_hotplug); + qtest_start("-device nec-usb-xhci,id=xhci"); ret = g_test_run(); + qtest_end(); return ret; } |