mirror of
https://github.com/qemu/qemu.git
synced 2024-11-30 23:33:51 +08:00
9be385980d
Use Coccinelle script to replace 'ret = E; return ret' with 'return E'. The script will do the substitution only when the function return type and variable type are the same. Manual fixups: * audio/audio.c: coding style of "read (...)" and "write (...)" * block/qcow2-cluster.c: wrap line to make it shorter * block/qcow2-refcount.c: change indentation of wrapped line * target-tricore/op_helper.c: fix coding style of "remainder|quotient" * target-mips/dsp_helper.c: reverted changes because I don't want to argue about checkpatch.pl * ui/qemu-pixman.c: fix line indentation * block/rbd.c: restore blank line between declarations and statements Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <1465855078-19435-4-git-send-email-ehabkost@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Unused Coccinelle rule name dropped along with a redundant comment; whitespace touched up in block/qcow2-cluster.c; stale commit message paragraph deleted] Signed-off-by: Markus Armbruster <armbru@redhat.com>
36 lines
913 B
C
36 lines
913 B
C
/*
|
|
* QTest testcase for VirtIO Console
|
|
*
|
|
* Copyright (c) 2014 SUSE LINUX Products GmbH
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
* See the COPYING file in the top-level directory.
|
|
*/
|
|
|
|
#include "qemu/osdep.h"
|
|
#include "libqtest.h"
|
|
|
|
/* Tests only initialization so far. TODO: Replace with functional tests */
|
|
static void console_pci_nop(void)
|
|
{
|
|
qtest_start("-device virtio-serial-pci,id=vser0 "
|
|
"-device virtconsole,bus=vser0.0");
|
|
qtest_end();
|
|
}
|
|
|
|
static void serialport_pci_nop(void)
|
|
{
|
|
qtest_start("-device virtio-serial-pci,id=vser0 "
|
|
"-device virtserialport,bus=vser0.0");
|
|
qtest_end();
|
|
}
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
g_test_init(&argc, &argv, NULL);
|
|
qtest_add_func("/virtio/console/pci/nop", console_pci_nop);
|
|
qtest_add_func("/virtio/serialport/pci/nop", serialport_pci_nop);
|
|
|
|
return g_test_run();
|
|
}
|