blob: 4758813d785ad460eb04ba6e130104254d93480f [file] [log] [blame]
Gonglei28edfce2014-06-23 19:53:51 +08001/*
2 * QTest testcase for USB OHCI controller
3 *
Gongleife752702015-03-26 20:57:43 +08004 * Copyright (c) 2014 HUAWEI TECHNOLOGIES CO., LTD.
Gonglei28edfce2014-06-23 19:53:51 +08005 *
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
Gonglei28edfce2014-06-23 19:53:51 +080010#include "qemu/osdep.h"
Peter Maydelle532b2e2016-01-26 18:17:12 +000011#include "libqtest.h"
Igor Mammedovb3937682014-09-26 09:28:14 +000012#include "libqos/usb.h"
Gonglei28edfce2014-06-23 19:53:51 +080013
14
15static void test_ohci_init(void)
16{
Gonglei28edfce2014-06-23 19:53:51 +080017
Gonglei28edfce2014-06-23 19:53:51 +080018}
19
Igor Mammedovb3937682014-09-26 09:28:14 +000020static void test_ohci_hotplug(void)
21{
22 usb_test_hotplug("ohci", 1, NULL);
23}
Gonglei28edfce2014-06-23 19:53:51 +080024
25int main(int argc, char **argv)
26{
27 int ret;
28
29 g_test_init(&argc, &argv, NULL);
30
31 qtest_add_func("/ohci/pci/init", test_ohci_init);
Igor Mammedovb3937682014-09-26 09:28:14 +000032 qtest_add_func("/ohci/pci/hotplug", test_ohci_hotplug);
Gonglei28edfce2014-06-23 19:53:51 +080033
Igor Mammedovb3937682014-09-26 09:28:14 +000034 qtest_start("-device pci-ohci,id=ohci");
Gonglei28edfce2014-06-23 19:53:51 +080035 ret = g_test_run();
Igor Mammedovb3937682014-09-26 09:28:14 +000036 qtest_end();
Gonglei28edfce2014-06-23 19:53:51 +080037
38 return ret;
39}