libvirt: Add test module for virsh domblkinfo.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virt: Add virsh function for virsh domblkinfo.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virt: Add get_disk_source() for virsh domblkinfo.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
libvirt: fix a bug for virsh domblkinfo

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
libvirt: Avoid size check if disk format isn't 'raw'.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virt: fix problem of checking persistent in virsh.net_state_dict().

When network is transient, net_autostart() will raise.
The next step will try to get "transient" in result_object.
While error messages may not be in stderr but exist in result
object indeed:

 * Command:
 net-autostart default --disable
 Exit status: 1
 Duration: 0
 stdout:
 error: failed to unmark network default as autostarted
 error: Requested operation is not valid: cannot set autostart
        for transient network

Message "transient" exists, but stderr is None.
So search "ranient" in whole result object will be more suitable.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virt-libvirt: Add test module for virsh net-define|undefine.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
qemu.tests.qemu_guest_agent: Install dependent DLL files with script

The previous patches for adding windows support of qemu-guest-agent
depend on a guest image in which user has installed necessary DLL
files.

This patch tries to install these DLLs by test script, so that to
we can test this feature with a fresh windows system.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.cfg: Fix the config of qemu guest agent test

The previous patch introduced a bug in the qemu-ga.exe path.
This patch tries to fix this problem.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests: Add heavy disk write load test for windows guests

Add heavy disk write load test for windows guests. Using Crystal
Disk Mark [1] to generate the write load inside the guest. And set the
default cache to writeback in this test.

changes from v1:
  - Record steps in INFO logs
  - Close the session after test
  - Add command empty check

[1] Crystal Disk Mark is a BSD licensed program
    http://crystalmark.info/software/CrystalDiskMark/manual-en/License.html

    It can be downloaded here:
    http://crystalmark.info/software/CrystalDiskMark/index-e.html

    The file will be added to the winutils.iso

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
qemu: Add test qemu_nobody test

This test checks groups when guest is started as
nobody [v2] using qemu -runas option to exec the qemu.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
virttest/qemu_vm:Fix unable to add nodefaults qemu command line

has_option(help_text, "use_nodefaults") will always return false because
qemu help_text just has 'nodefaults' line, instead of 'use_nodefaults'.
So -nodefaults will never be used as qemu command line.

This patch is to avoid this error situation

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
Merge pull request #280 from yumingfei/virsh_net_define_undefine

virt-libvirt: Virsh net define undefine pull request #280
qemu.enospc:update the test.bindir to data_dir.get_data_dir

Now use test.bindir will not find the image file, just update it
to new interface data_dir.get_data_dir

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
Merge pull request #444 from QiuMike/qemu.enospc_update_the_test.bindir_to_data_dir.get_data_dir

qemu.enospc:update the test.bindir to data_dir.get_data_dir
Merge pull request #435 from QiuMike/virttest_qemu_vm_Fix_unable_to_add_nodefaults_qemu_command_line

virttest/qemu_vm:Fix unable to add nodefaults qemu command line
Merge pull request #318 from liyangfnst/domblkinfo

Add test for virsh domblkinfo v4
virttest.qemu_storage: FIX Don't overwrite backup image during preprocess

After the test during check_image the backup image was still being
overwritten.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
utils_net : Add the lost api in utils_net

This patch add the lost APIs in utils_net, something wrong happended
when rebase the patch(commit 9efb355).

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
virttest.qemu_vm: Add get_monitors_by_type() function

This function can be used to get monitors of the given type.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>