]> Git Repo - qemu.git/blob - tests/virtio-console-test.c
arm/boot: split load_dtb() from arm_load_kernel()
[qemu.git] / tests / virtio-console-test.c
1 /*
2  * QTest testcase for VirtIO Console
3  *
4  * Copyright (c) 2014 SUSE LINUX Products GmbH
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 "qemu/osdep.h"
11 #include "libqtest.h"
12 #include "libqos/virtio.h"
13
14 /* Tests only initialization so far. TODO: Replace with functional tests */
15 static void console_nop(void)
16 {
17     global_qtest = qtest_startf("-device virtio-serial-%s,id=vser0 "
18                                 "-device virtconsole,bus=vser0.0",
19                                 qvirtio_get_dev_type());
20     qtest_end();
21 }
22
23 static void serialport_nop(void)
24 {
25     global_qtest = qtest_startf("-device virtio-serial-%s,id=vser0 "
26                                 "-device virtserialport,bus=vser0.0",
27                                 qvirtio_get_dev_type());
28     qtest_end();
29 }
30
31 int main(int argc, char **argv)
32 {
33     g_test_init(&argc, &argv, NULL);
34     qtest_add_func("/virtio/console/nop", console_nop);
35     qtest_add_func("/virtio/serialport/nop", serialport_nop);
36
37     return g_test_run();
38 }
This page took 0.027856 seconds and 4 git commands to generate.