qemu.tests.time_manage:Fixed VM names error

Currently, the VM names has changed to like virt-tests-vm1 style.
But the VM names in test case time_manage are still the old version

Modify the VM names to the new style so the test case pass.

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
Acked-by: Feng Yang <fyang@redhat.com>
qemu.tests.enospc: Fixed 'fuser -k' failed bug

Currently, when running the tests while the clean
up didn't run on the previous, it will raise an
error like:

Test failed: CmdError:
Command <fuser -k /dev/vg_kvm_test_enospc/lv_kvm_test_enospc>
failed, rc=1, Command returned non-zero exit status
[context: performing enospc setup --> performing enospc cleanup]
* Command:
    fuser -k /dev/vg_kvm_test_enospc/lv_kvm_test_enospc
Exit status: 1
Duration: 0.0501132011414

That is the link /dev/vg_kvm_test_enospc/lv_kvm_test_enospc
exist, but no user. thus the command line:
    fuser -k /dev/vg_kvm_test_enospc/lv_kvm_test_enospc
will return 1(fuser will always return none-zero for nobody use).

So just ignore the return status of the fuser.

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
virt.qemu.tests.nic_bonding:Fix vm.netdev_id error

Nowadays, netdev_id has been a part of nic, and not
belongs to the vm object anymore.

At the sametime nic already has the key 'device_id', so
use nic.device_id is OK.

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
Acked-by: Feng Yang <fyang@redhat.com>
virt:Make the clock_getres to support POWER guest

The name of the clock on Power guest is "timebase" which is
different from it counterpart in x86 "kvm-clock"

To makes it can work in both Power and x86 guest, add the
platform check.

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
libvirt: Add test module for virsh {at|de}tach-disk

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virt: Modify virsh function for virsh {at|de}tach-disk

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virt: Add get_disk_count() for virsh {at|de}tach-disk

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virttest.standalone_test: Bring in funcatexit to standalone_test

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
tests.virtio_console: Add boot_nr1 test

To make sure boot_nr tests are working correctly it's necessarily to boot
(and open) the port with nr=1.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
virt.qemu_vm: Add more info to ImageUnbootableError exception

This exception might make user confused, so add some more info
to its message.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
tests.cfg: Limit save_restore test on Linux guest

The save_restore.py script contains some linux-specific
operation, thus add a filter to limit it on Linux guest.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.physical_resource_check: Update memory check pattern

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
shared.cfg.guest-os: Add config for RHEL-6.4 guest

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
shared.cfg: Add config for Ubuntu-13.04 guest

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Fix a couple of indentation problems found during check script run

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
standalone_test: Fix TAG_INDEX problem

When the guest_name changes (arch, machine, ...) the TAG_INDEX length
might differs from the previous one. Store indexes per name to avoid
shortname corruption.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
virt: Add OpenSUSE 12.3 x86_64 config.

Signed-off-by: Chris Evich <cevich@redhat.com>
virt: Fix legacy driver_type 'kvm' use

* Get rid of old virt-test reference to 'kvm' driver_type
* virtnet style doesn't care about kvm vs qemu difference
* unattended_install uses it for both qemu and libvirt virt-test
* No other usage found for vm.driver_type sensitive to 'kvm' value

Signed-off-by: Chris Evich <cevich@redhat.com>
virttest.funcatexit: Prevent weird errors while storing nasty args

Because all arguments are stored in env we have to ensure the arguments
are pickable before storing them. Otherwise users would get weird errors
pointing at env:
    TypeError: can't pickle ... objects

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
virttest.funcatexit: Prevent weird errors while storing nasty functions

Local functions are not pickable. Raise a sane exception when the test
tries to use them.

Global functions (defined on the module scope) are fine.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>