client.tests.systemtap: update elfutils and systemtap deps

Currently, elfutils and systemtap are too old, and
may cause compile errors when using newer GCC.
So update them to the newest version.

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
virt/scripts/cb.py: Clipboard Python Script

Adding a python script to copy and paste from the clipboard.  The test
will be used in a copy and paste test, to test spice-vdagent.

Signed-off-by: Vimal Patel <vipatel@redhat.com>
virt/kvm_vm.py: Adding Spice Option for qemu-kvm

Adding the spice option disable-copy-paste for qemu-kvm.

Signed-off-by: Vimal Patel <vipatel@redhat.com>
virt.spice: Adding a Copy and Paste Test for Spice-Vdagent

Adding a copy and paste test to test spice vdagent.  The test
can handle copying from the client to guest and vice versa, and
it also handles negative tests if spice-vdagent service is off
or if disable-copy-paste option is set on the vm.

Changes from v3:
 * Removed lots of non py 2.4 constructs

Signed-off-by: Vimal Patel <vipatel@redhat.com>
virt.spice: Defining parameters for rv_copyandpaste test

Setting up the parameters for rv_copyandpaste, to get this
to work I also needed to add virtio setup to rv_connect and
rv_disconnect.

Signed-off-by: Vimal Patel <vipatel@redhat.com>
virt/deps: Adding an image to be used for testing in the copy and paste tests.

Signed-off-by: Vimal Patel <vipatel@redhat.com>
virt/utils_spice: Adding a utils file for common spice utilities

Changes from v3:
 * Removed non py 2.4 constructs
 * Rebase to new virt test structure

Signed-off-by: Vimal Patel <vipatel@redhat.com>
virt.spice: Adding the Copy & Paste Tests & disable-copy-paste variant

Adding all the Copy & Paste Scenarios (14 tests), adding
the disable-copy-paste variant, and modifying the other
tests to be able to handle the new variant.

Signed-off-by: Vimal Patel <vipatel@redhat.com>
virt.base.cfg: Add spice seamless migration option reference

Signed-off-by: Marian Krcmarik <mkrcmari@redhat.com>
virt.kvm_vm: Add support for SSL and seamless spice migration

Add tls-port and cert subject options to spice migrate info qemu call
during spice migration with encrypted channels.

Add seamless-migration qemu option and wait for notification from spice
about finish of the seamless migration.

Signed-off-by: Marian Krcmarik <mkrcmari@redhat.com>
virt.http_server: Fix unattended builtin http server

Commit 399604d44c9674d936b0a9d499e826df21952b02 renamed range variable in
do_GET method to rg. Unfortunately, not all usage of this variable was
renamed so server can't be used for hosting installation repository
(needed for xen pv installation).

This issue is fixed renaming all instances to correct name.

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
virt.libvirt: Make Xen to be properly recognized

Commit 5169d9c128eb6ed879d55b711e3e8c02ce880b4a introduces
normalize_connect_uri method and use qemu in case default
is used. This prevents xen to be properly recognized.

This is fixed adding by connect_uri into the test.cfg.

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
client.shared.base_utils: Fix behavior of shutil.copytree in py=2.4

Commit 0a0f49e9fc3d437fa8ce61d217fe9b3c39e302eb copies src files into
test.srcdir using shutil.copytree function. However, this function
raises error in python version < 2.5 in case we try to copy to
non-existing location (since 2.5 needed structure is created instead).
This causes errors when running on RHEL 5.

This is fixed by creating structure before copying required directory.

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
virt.kvm_vm: Prefer using "-device" when adding sound device

Adding sound device with using "-device" is preferable.
Removing unused and buggy get_free_pci_addr() function.

Signed-off-by: Marian Krcmarik <mkrcmari@redhat.com>
virt.base.cfg: Edit sound hardware comment and remove pci_addr.

Signed-off-by: Marian Krcmarik <mkrcmari@redhat.com>
utils_misc: always update parameters in subclass_pre_init()

I tried to execute boot and netperf tests in one job,
but netperf which needs two nics failed and got this
error: "IndexError: list index out of range"

After executed boot subtest, vm class was restored into env file,
in the second test, cloned VMNet class has attributes (vm_name,
params, container_class), so the parameters could not be updated.

This patch makes parameters can be updated all the time.

Signed-off-by: Amos Kong <akong@redhat.com>
netperf: add '-q' option to ssh for disabling stderr

We execute remote command by ssh in netperf test,
add this option to disabling some stderr message.

eg:
@ ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
      root@192.168.122.1 pwd
Warning: Permanently added '192.168.122.1' (RSA) to the list of known
hosts.

Signed-off-by: Amos Kong <akong@redhat.com>
netperf: fix parameter name

'pci_model' was renamed to 'nic_model', but netperf configuration
was not updated.

Signed-off-by: Amos Kong <akong@redhat.com>
netperf: update the pattern of interrupt name

If we use virtio-blk, the interrupt name of virtio-nic
will become virtio1-input/output.
In netperf test, we will only have one virtio-nic,
this updated the pattern to make it works all the time.

Signed-off-by: Amos Kong <akong@redhat.com>
virt: introduce KVM monitor connection timeout

On some situations a job may get stuck forever trying to establish a
connection to a UNIX domain socket that connects the test code to
the qemu monitor.

This simple connection timeout won't fix all test problems, but will
avoid jobs that never finish properly.

Signed-off-by: Cleber Rosa <crosa@redhat.com>