qemu.tests.pci_devices: Get firmware time to initialize

Before "info qtree" returns the correct values, firmware initialization
has to finish. 10s should be enough (in case we won't define 1000
devices)

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
qemu.tests.pci_devices: Add virtio_disk testing devices

This patch adds the possibility to use virtio_disks for testing.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
qemu.tests.pci_devices: Add support for uhci test device

Make it possible to use ich9-usb-uhci controller for pci_devices testing

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
virttest.qemu_devices: Fix the bug with overwritten bus for virtio disk

The bus property of virtio disks is set by pci_bus and is set during
device insertion via parent_bus.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
qemu.tests.pci_devices: Major config update

Original setups were only for developing the test and some of them
were invalid (impossible for real hw and thus unsupported by kernel).
These setups were checked with pci device developer and they should be
working properly.
qemu.tests.multi_nic_stress: Correct remote netperf folder in guest.

Signed-off-by: Feng Yang <fyang@redhat.com>
virsh_migrate_multi_vms: SKIP if srcuri and desturi not defined

Issue #1014, SKIP this test if we haven't adjusted the cfg to have
real source and destination URI's
virsh_migrate: remove static mac address for "xml" test

We are using static mac address "ff:ff:ff:ff:ff:ff" which is broadcast
address, but libvirt neads unicast address. Instead of using static mac
address we can leave libvirt to generate one and then obtain that mac
address for further checking in the code.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
virsh_migrate: skip direct migration for driver different from xen

Direct migration is supported only for xen in libvirt and therefore
we should skip this test for all other drivers instead of failing.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
virsh.migrate: fix the connect uri

The src uri for migration tests should be gotten from the cfg file
instead from the vm object.

Also change the "connect_uri" into the "virsh_migrate_connect_uri"
and instead of "logging.warning()" that the src_uri or dest_uri aren't
updated use "error.TestNAError()" which will skip the test.
virsh.migrate: Update the "there_migrateuri" test case

By this update we can tell the user that he needs to setup the
migrateuri.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
virsh.migrate: change the current storage into the shared storage

The migration requires shared storage. By this patch we will detach
all existing storages from the existing guest and we will attach
one shared storage defined in the config file. It can be on
whatever backend you want.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Add virttest.staging.backports module

We'll have to stick with python 2.4 for a little while
yet, so let's bring autotest's backport module to virt-test.

This module contains some functions people have been
using to write their tests. In order to use them, you
can just make

from virttest.backports import all, bin, next

The module takes care of figuring out if there's a
builtin present, or if the backported implementation
has to be used.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
tests: Fix usage of functions available only on py versions > 2.4

The virttest.staging.backports module offers backport
implementations of the functions used, so they work under
python 2.4. Even if said tests won't be executed on older
distros, at least pylint checks will pass.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest.qemu_devices: Supress pylint warning

The methods hotplug and verify_hotplug are called
correctly in the inherited classes.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest.ppm_utils: Replace conditional expressions

They are not present in python 2.4. Replace them with
equivalent, py 2.4 compatible constructs.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Merge pull request #1254 from autotest/backports

Backports
virttest/unittest_data: Fix mistake made on commit a5e55b7

In fact, we could not change the unittest data, which is
fixed to match the representation dump needed for that
unittest.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest: Replace itertools usage with backports version

This will ensure that, if some py 2.4 incompatible API
is used, it'll be appropriately patched up.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest.libvirt_storage_unittest: Fix py 2.4 incompatible construct

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>