libvirt.tests: Add testcases for migration with copy-storage-inc/all.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Add unsafe option test for virsh.migrate.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Add testcases for lvm type storage migration.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Add abnormal testcases for storage migration.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virsh.volume: Fix test issues

Resolve multiple issues with the test:

 1. Calling utlv.define_pool() without a 4th parameter (cleanup_env)
    results in failure since 4th parameter is expected
 2. The local 'get_image_info' should be replaced by the virt-test
    virttest/utils_misc/get_image_info().  Doing so changes the name
    of the 'img_info' field 'capacity' to 'vsize'. Since this field
    is already an 'int' bytes value - the code in norm_capacity() to
    "read" the bytes value is no longer necessary and a straight
    assignment is possible.
 3. Various 'actual_info' dictionary key's were mis-capitalized.
libvirt.tests: Fix parameter error of migrate-setmaxdowntime.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.test: Fix a bug in setvcpus

In test, such fail will show up:
local variable 'status_error' referenced before assignment

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
guestfish_block_dev: Add sfdisk, sfdisk-l, sfdiskM, sfdisk-N
guestfish_block_dev: Add sfdisk-disk-geometry,sfdisk-kernel-geometry
Add APIs: cat checksum checksum-device checksums-out equal
pep8 fix
libvirt.test: Add 'bridge' type interface test for iface

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
Add new file guestfish_lvm.cfg and guestfish_lvm.py for test lvm
related APIs
libvirt.test: Add more testcases for iface test

Add some case for nonexist interface test, including
protocol test, stp test

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
fix a issue that can not sfdisk for lvm
Revert "virsh.domdisplay: Only add port if nonzero for vnc"

This reverts commit 9cba9b688c72181af5574cfbc4512f17db77ec13.

This patch is wrong as it was a libvirt bug. We should be careful
about adapting tests to actual libvirt behavior as the libvirt could
be wrong, not the test itself.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
blockresize: Add more options for test

Adjust the cfg matrix to add the 'qed' disk type as well as an option
for using 'kb' and 'kib' as the scale/type of the value provided. The
virsh command will accept k, kib, and kb. Set the initial disk to
500K so that the resize will actually attempt something.  Using 1M
as an initial size and then using values that are the same for 'b', 'k',
and 'm' doesn't do anything.

Modify the test code to handle the new options and be able to account
for the lack of the fix for bz1002813 which results in an error when
'1000kb' is provided since 1000kb is not evenly divisible by 512 as
is required by qemu.  The libvirt code supplied for the bz will resize
the value to be aligned on 512 byte boundaries - so our test test will
need to account for that too.

As a side note the existing math to change values from the cfg
supplied value to an 'expected_value' made an assumption that
the value was 1024M to start with.
libvirt.test: Add 'vlan' and 'bond' type test for iface

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
libvirt_bench/dump_with_netperf: fix the wrong method of _is_netperf_running().

The original method to verify that netperf is running in guest is wrong, we can
not see any process named netperf in guest. Instead, this patch check the log file
of autotest.netperf in guest and say that netperf is running in guest.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt_bench: replace 'autotest' with 'autotest-local'

As autotest script is already removed, now we are using autotest-local
for it.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>