virsh_start: Fix pause bug in cleanup.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
virsh_start: add cases for more options.

Signed-off-by: Dongsheng Yang <yangds.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 new file guestfish_lvm.cfg and guestfish_lvm.py for test lvm
related APIs
fix a issue that can not sfdisk for lvm
tp-libvirt: Fix iface-trans

Using `locate` utility to find a file could result into undesired
results and it also depends on whether the test system is indexed
properly. To find the `netcf-transaction` script, we use the autotest
`find_command()` to do the job. For system using SYSV init service
manager, we hard code the script location for a work around.

Also, alway cleanup enviroment in case a broken job influence
consecutive jobs.

Signed-off-by: Hao Liu <hliu@redhat.com>
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>
tp-libvirt: Fix libvirt network bandwidth

* The portgroup attribute is only applicable with virtual network
  interface, So skip the test if the default interface is not a
  'network' type.

Signed-off-by: Hao Liu <hliu@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.
snapshot_edit

Fix issue when/if the snapshot_create_as() fails the 'snapshot_oldlist'
wouldn't be generated resulting in a failure during the finally: segment
and not cleaning up after ourselves fully.
Merge pull request #160 from Hao-Liu/fix_iface_trans

tp-libvirt: Fix iface-trans
tp-libvirt: Fix libvirt_pci_passthrough

* Fixed a bug when no storage device name matches target name, it can't
  properly raise an exception

* Alway SKIP the test when the target node devices are not found, else
  the tests will FAIL if the default `ENTER.YOUR...` are not changed.

* When testing storage passthrough, alway check whether its parent node
  device is a PCI device. It might be `scsi` as well, and will get an
  unexpected behaviour.

Signed-off-by: Hao Liu <hliu@redhat.com>
Merge pull request #165 from Hao-Liu/fix_bandwidth

tp-libvirt: Fix libvirt network bandwidth
Merge pull request #169 from Hao-Liu/fix_pci_passthrough

tp-libvirt: Fix libvirt_pci_passthrough
Merge pull request #117 from yangdongsheng/virsh_start_opt

virsh_start: fix and enhancement. add options --console --autodestroy --force-boot
Merge pull request #166 from jferlan/snapshot_edit

snapshot_edit: finally path broken if snapshot_oldlist not defined
Calm down the Travis CI.

Signed-off-by: Dongsheng Yang <yangds.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>