qemu: add audio test for guest

(1) Boot guest with -soundhw [sound card].
(2) Log into guest.
(3) Write a file which contains random content
    to the audio device, check if succeeds or not.

Signed-off-by: sshang <sshang@redhat.com>
virt.qemu_storage: Add an image_extra_params option

This parameter allows user to append his own option
for `qemu-img` program.

For the supported options in a qemu-img binary, please
use following command to check:
`qemu-img create -f qcow2/raw/qed/... -o ? test 1M`

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
shared.cfg: Add qcow3 support

There is a 'compat' option in qcow2 image format, when it's
set to 1.1, qemu-img program will generate a 'qcow3' format
disk image.

Note: how to check whether an image is in qcow3 format:
"""
$ dd if=storage.qcow3 bs=16 count=1 2>/dev/null | hexdump
0000000 4651 fb49 0000 0300 0000 0000 0000 0000
0000010
"""

The seventh byte of qcow3 image is "0x03", and qcow2's seventh
byte is 0x02:

"""
$ dd if=storage.qcow3 bs=16 count=1 2>/dev/null | hexdump
0000000 4651 fb49 0000 0200 0000 0000 0000 0000
0000010
"""

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virttest.utils_misc:Fix return value to list for ppc64

In get_host_cpu_models(), it will return a string if the host is
ppc64 machine, but for  x86 will return the mode list.

To avoid this gap, change the return value to a list.

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
qemu: Add base libraries for new block_stream tests

These libraries implement basic block copy and
block stream abstractions that'll be later used
in the new, updated block stream tests.

Signed-off-by: Xu Tian <xutian@redhat.com>
qemu_monitor/qemu_vm: Introduce new block mirror APIs

They'll be needed to support the new block stream
and block mirror tests.

Acked-by: Suqin Huang <shuang@redhat.com>
Signed-off-by: Xu Tian <xutian@redhat.com>
qemu: Refactor and update block stream tests

Introduce new block stream test cases:

refactor block stream cancel, set speed to make
script more readable;

block_stream_simple test include sub-tests:

1) Cancel block stream job aync and sync, AKA
cancel before/after set block job speed event;
2) set limited speed when job start and reset
job speed after job started and query block job
status used in each test of block stream tests,
so no special test for it;

Signed-off-by: Xu Tian <xutian@redhat.com>