lvsb.tests: add network options test cases for the virt-sandbox cmdline

Signed-off-by: Alex Jia <ajia@redhat.com>
Tests.vol_create_from: Replace pool operations with libvirt_storage module.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Move nfs/iscsi setup&cleanup to utils_test module.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Replace volume operations with libvirt_storage.PoolVolume.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt-test/pci_passthrough: Add a case in pcipassthrough to test SRIOV.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt.tests: Adjust vol_create_from test.

Functions for preparing pool and volume for test is useful
in other test modules. So move it to utils_test.libvirt.

Then in some failed conditions, it will leave many iscsi
devices on host. We should keep it clean.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Fix virsh.vol_create_from test bug.

When creating logical pool, pool_target should be volume
group's path. But it has been fixed to vg_logical in pre_pool,
so target in configuration should be vg_logical too.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
tp-libvirt: Add macvtap interface test

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
libvirt-tests: Add test for command perf kvm.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Add support of enable/disable second video device screenshot

RHEL support multiple video devices screenshot with given screen
number while Fedora upstream did not support it. With this change,
user can config enable/disable multiple_screen in cfg file to
enable/disable tests with screen number as 1. By default in cfg
file multiple_screen is set as 'no'.

RHEL multiple video device screenshot tracking bug:
  https://bugzilla.redhat.com/show_bug.cgi?id=1026966
  https://bugzilla.redhat.com/show_bug.cgi?id=710489

Signed-off-by: Wayne Sun <gsun@redhat.com>
virsh.start: Add tests for starting long-named VM

This fix is a regression test for bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1060557

Signed-off-by: Hao Liu <hliu@redhat.com>
libvirt.tests: Minor changes for vol_create_from test.

1.Change logical pool target to vg_logical to cordinate with source
2.Subtract emulated image size for saving time
3.Debug more clear for created volumes

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
tp-libvirt: Add '--reason' option test for virsh domstate

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
Add test for domain reset

Signed-off-by: Kyla Zhang <weizhan@redhat.com>
find_storage_pool_sources: Handle failures better

If the 'setup_or_cleanup_iscsi()' fails, then we are returned nothing and
continuing is fatal for any of the subsequent callers - so just error
out indicating that we were unable to setup the iscsi device.

Additionally, I had a run on an f19 system where the vg_create() was
failing. That failure caused test failure, but didn't clean up the
iscsi server, so add logic to handle the failure.

Without the try/except - the failure is just an ERROR with ugly
traceback in the debug.log:

ERROR type_specific.io-github-autotest-libvirt.virsh.find_storage_pool_sources.positive_test.local_logical_source -> CmdError: Command <vgcreate virttest_vg_0 /dev/sda> failed, rc=5, Command returned non-zero exit status    [context: Creating volume group 'virttest_vg_0' by using '/dev/sda']
* Command:
    vgcreate virttest_vg_0 /dev/sda
Exit status: 5
...
  Device /dev/sda not found (or ignored by filtering).
  Unable to add physical volume '/dev/sda' to volume group 'virttest_vg_0'.
...
virsh_find_storage_pool_sources_as: Error checking

If the setup_or_cleanup_iscsi() fails to configure our iscsi device,
just cause the test to fail. It's not getting much further anyway.
libvirt-tests: Enhancement virsh setmaxmem to test --config, --live and --current.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
tp-libvirt: Add '--title' option test for virsh list

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
libvirt.tests: Fix the boundary test issue in nwfilter define cases

With libvirt commit 4f20943 in upstream, nwfilter check strict
boundary values when define filter. The RHEL did not include the
commit yet, this will cause different result as run on fedora and
RHEL. For fix this, add boundary error cases in negative cases,
and a new param 'boundary_test_skip' to enable skip the negative
boundary cases in RHEL or other unsupported strict check binaries.
The positive cases also updated with delete all boundary negative
values.

By default in test cfg, 'boundary_test_skip' is set as 'yes', which
will enable skip such negative boundary cases on RHEL, but fedora
will get pass as expected.

Updated use try..finally to make sure cleanup excuted finally.

The issue detail is recorded in:
https://github.com/autotest/tp-libvirt/pull/3/#issuecomment-34099397

Signed-off-by: Wayne Sun <gsun@redhat.com>
libvirt.tests: Add test for vol-clone and vol-wipe

Signed-off-by: Yanbing Du <ydu@redhat.com>