]>
Commit | Line | Data |
---|---|---|
25e89ec5 GA |
1 | /* |
2 | * QTest testcase for USB xHCI controller | |
3 | * | |
4 | * Copyright (c) 2014 HUAWEI TECHNOLOGIES CO.,LTD. | |
5 | * | |
6 | * This work is licensed under the terms of the GNU GPL, version 2 or later. | |
7 | * See the COPYING file in the top-level directory. | |
8 | */ | |
9 | ||
10 | #include <glib.h> | |
11 | #include <string.h> | |
12 | #include "libqtest.h" | |
13 | #include "qemu/osdep.h" | |
b3937683 | 14 | #include "libqos/usb.h" |
25e89ec5 GA |
15 | |
16 | ||
17 | static void test_xhci_init(void) | |
18 | { | |
25e89ec5 GA |
19 | } |
20 | ||
b3937683 IM |
21 | static void test_xhci_hotplug(void) |
22 | { | |
23 | usb_test_hotplug("xhci", 1, NULL); | |
24 | } | |
25e89ec5 GA |
25 | |
26 | int main(int argc, char **argv) | |
27 | { | |
28 | int ret; | |
29 | ||
30 | g_test_init(&argc, &argv, NULL); | |
31 | ||
32 | qtest_add_func("/xhci/pci/init", test_xhci_init); | |
b3937683 | 33 | qtest_add_func("/xhci/pci/hotplug", test_xhci_hotplug); |
25e89ec5 | 34 | |
b3937683 | 35 | qtest_start("-device nec-usb-xhci,id=xhci"); |
25e89ec5 | 36 | ret = g_test_run(); |
b3937683 | 37 | qtest_end(); |
25e89ec5 GA |
38 | |
39 | return ret; | |
40 | } |