]>
Commit | Line | Data |
---|---|---|
6e8114a0 AF |
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 | ||
681c28a3 | 10 | #include "qemu/osdep.h" |
6e8114a0 | 11 | #include "libqtest.h" |
d0a5cc5b | 12 | #include "libqos/virtio.h" |
6e8114a0 AF |
13 | |
14 | /* Tests only initialization so far. TODO: Replace with functional tests */ | |
d0a5cc5b | 15 | static void console_nop(void) |
6e8114a0 | 16 | { |
88b988c8 MA |
17 | global_qtest = qtest_initf("-device virtio-serial-%s,id=vser0 " |
18 | "-device virtconsole,bus=vser0.0", | |
19 | qvirtio_get_dev_type()); | |
f33f9911 AF |
20 | qtest_end(); |
21 | } | |
22 | ||
d0a5cc5b | 23 | static void serialport_nop(void) |
f33f9911 | 24 | { |
88b988c8 MA |
25 | global_qtest = qtest_initf("-device virtio-serial-%s,id=vser0 " |
26 | "-device virtserialport,bus=vser0.0", | |
27 | qvirtio_get_dev_type()); | |
f33f9911 | 28 | qtest_end(); |
6e8114a0 AF |
29 | } |
30 | ||
31 | int main(int argc, char **argv) | |
32 | { | |
6e8114a0 | 33 | g_test_init(&argc, &argv, NULL); |
d0a5cc5b TH |
34 | qtest_add_func("/virtio/console/nop", console_nop); |
35 | qtest_add_func("/virtio/serialport/nop", serialport_nop); | |
6e8114a0 | 36 | |
9be38598 | 37 | return g_test_run(); |
6e8114a0 | 38 | } |