virttest: Add queues and helper to add_net in qemu_vm.py

Make the add_net support queues and helper options.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest: Make add_net can support invalid paramteres

Make it possible to start the command with invalid parameters to
support some negative tests.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest: Make the info register warning shorter in log files

Only record the fist and last message for the failed of getting
register info from guest.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest: Add vm process status for image process functions

Let the image check process can get if vm process is still running. Some
options in image like lazy_refcounts improve the performance but do not
support image check while the qemu process still running. Also make this
can be control by cfg file.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest: Add a parameter to skip cluster leak warning in image check

When the guest is running we should not raise error in image check if
it is only a cluster leak warning. And add it as a parameter in base.cfg
so people can igonre the warning message if they do not care about it in
their tests.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
remote_build: Simpler interface

Update the remote_build interface to make it figure out the default
values of lots of input parameters without being explicitly told. This
change would mean that this:

    username = params.get("username", "")
    password = params.get("password", "")
    address = vm.get_address(0)
    source_dir = data_dir.get_deps_dir("clock_getres")
    build_dir = params.get("build_dir", "/tmp")
    shell_client = params.get("shell_client", "ssh")
    file_transfer_client = params.get("file_transfer_client", "scp")
    shell_prompt = params.get("shell_prompt")
    shell_linesep = params.get("shell_linesep")
    builder = remote_build.Builder(address, source_dir, client=shell_client,
                                   file_transfer_client=file_transfer_client,
                                   username=username,
                                   password=password,
                                   build_dir=build_dir,
                                   prompt=shell_prompt,
                                   linesep=shell_linesep)

..can now be done like this, given that params is set:

    address = vm.get_address(0)
    source_dir = data_dir.get_deps_dir("clock_getres")
    builder = remote_build.Builder(params, address, source_dir)

The idea is to reduce the boiler plate needed by test case designer to
fetch all the parameters from the cartesian configuration. It also fixes
the lack of a separate file_transfer_port, which is needed by the rss
file transfer client.

Signed-off-by: Jonas Eriksson <jonas.eriksson@enea.com>
virt: Add a function to remove domain agent channel

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virttest.utils_libguestfs: Enhancements of virt_edit interface.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virttest.utils_libguestfs: Add sets of commands for is-*
virt: Add option to shutdown func

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virttest: Init export_flag in __init__ function of iscsi

As export_flag will be used in cleanup() so init it no matter we are
using emulate or real iscsi device.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest: Import iscsi from virttest first

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest: Update iscsi_unittest to fit the update in iscsi

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
shared.control: Add a new control file for scsi_testsuite

Add a new control file for scsi_testsuite to fit new version
of RHEL.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Merge pull request #1619 from ypu/iscsi-small-fix

Iscsi small fix
Merge pull request #1618 from liyangfnst/shutdown

virt: Add option to shutdown func
virttest.utils_libguestfs: Add cmd_result() in GuestfishRemote

1. Want keep consistent with the original code.
add method cmd_result() in class GuestfishRemote(), cmd_result is
called by inner_cmd()

2. add a func blockdev_rereadpt()
Merge pull request #1620 from ypu/scsi_testsuite

shared.control: Add a new control file for scsi_testsuite
PoolVolumeTest: cleanup_pool: Clean up directory tree for more types

When cleaning up the pool, we need to be sure to remove the pool_target
tree created during pre_pool setup for more than just the "dir" pool.
The "fs" and "netfs" pools also will 'mkdir' on the 'target_pool'. If not
cleaned up - other tests which use the same name space will have failures.

I found this during a run of "all" tests where 'virsh.vol_create' failed,
but would succeed when running alone.  I narrowed this down to the running
of 'virsh.vol_download_upload' which would create and use the directory
"fs-pool", but would not clean up after itself. This was not a problem until
"vol_create" ran later using the same "fs-pool" name and thus would fail to
create the pool because a directory already existed.

If interested run the following prior to this change to see the issue:

./run -t libvirt --tests \
 virsh.vol_download_upload.download_upload.fs_pool.upload.no_options, \
 virsh.vol_create.positive_test.fs_like_pool.vol_format.v_raw.src_pool_type.fs

The first will PASS and the second will ERROR
virt-test: Bootstrap using other OS images.

The bootstrap procedure was hardcoded to use the JeOS image. If the
JeOS repository is unreachable the command will return an error. To use
a specific OS at bootstrap its name should be given in the run command
using the --guest-os parameter:
e.g. ./run -t qemu --bootstrap --guest-os=Enea.4.0.x86_64

Signed-off-by: Petre Pircalabu <petre.pircalabu@enea.com>