virttest: Make macvtap support hotplug

This patch add support of hotplug/unplug nic with macvtap

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
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>
tests.nicdriver_unload: Make the guest nic also named eth0

When run nicdriver_unload test, will raise error like:
013-04-16 21:35:55: modprobe virtio_net
2013-04-16 21:35:56: [root@unused ~]#
2013-04-16 21:35:56: echo $?
2013-04-16 21:35:56: 0
2013-04-16 21:35:56: [root@unused ~]#
2013-04-16 21:35:56: ifconfig eth4 up
2013-04-16 21:35:56: eth4: unknown interface: No such device
2013-04-16 21:35:56: [root@unused ~]#
2013-04-16 21:35:56: echo $?
2013-04-16 21:35:56: 255
2013-04-16 21:35:56: [root@unused ~]#
2013-04-16 21:35:56: udev: renamed network interface eth0 to eth4

the root cause of this cause is after the nic driver loaded,
the nic name not changed immediately by udev rules, because
the guest is under heavy working pressure.

This patch modify the guest udev net rules before test,
make guest nic always nemed eth0.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
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>
virsh.migrate: always recover the vm from xml backup

We are updating the vm configuration to have a shared disk we need
to always recover the vm form xml backup to ensure there are no
modification done by this test.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
qemu.tests.hypervisor_flag: test for 'hypervisor' flag

Sanity check for 'hypervisor' flag in cpuinfo for the running guest VM.

Signed-off-by: Ruda Moura <rmoura@redhat.com>
cfg: Fix tcpdump kill command to work on a wider variety of hosts

Using 'pkill -9 tcpdump' works on both new and older
distros.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Merge pull request #1270 from autotest/fix-tcpdump-kill

cfg: Fix tcpdump kill command to work on a wider variety of hosts
Merge pull request #1269 from ruda/hypervisor-flag

qemu.tests.hypervisor_flag: test for 'hypervisor' flag
Merge pull request #1222 from ldoktor/add_device3

qemu.tests.pci_devices: Test fixup and update
virt: change test entry point method name

There's no need to have the name of the "run_<name>" method (main
test entry point) depend on the test name. So, for simplicity sake,
let's just name the test entry point "run".

I have decided to not fallback gracefully to the previous naming
convention as I believe this can lead to confusion in the future.

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