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>
Merge pull request #320 from zhouqt/minor-fix

Minor fix for qemu testing
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>
virt and standalone_test: Raise TestWarn when funcatexit fails

Since funcatexit are cleanup functions, make the test fail with
TestWarn and proceed with postprocess_on_error.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
shared.cfg: Show guest disk/nic/cpu/image config by default

Normally, these configs are important to a test job, thus show
them all in test's name.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virttest API: Introduce version module

In order to get useful debug information for virt test,
introduce a module version that is concerned with finding
the current git version, top commit, condensed version
suitable for python setup tools.

Most of the time we're interested in using the results
from the get_pretty_version_info(), as it is complete,
nice for debug logs.

Also, add the RELEASE-VERSION file that the module
creates (might be useful if/when virt test gets packaged)
to .gitignore.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
standalone_test/virt: Add virt test information to test logs

Add complete virt test info to test logs, to help debug
issues with the test suite itself.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virt: Adds support for multi-host migration of system without serial console.

For multi-host migration system without serial console is
necessary to have bridge on hosts where guest should be
migrated in same network.

 _________                _________
|  host1  |              |  host2  |
|         |              |         |
| src br--|--------------|-dst br  |
|    |    |              |    |    |
|  |vm1|  |              |  |vm1|  |
|_________|              |_________|

Otherwise host2 couldn't connect to vm1 after migration.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virt: Adds multihost migration test for floppy ejecting.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virt.qemu_monitor: Add an API for terminating monitor connection

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt.env_process: Close monitor socket after test

The socket connection is stll alive after a test finishes,
normally it works well.
But there is one situation that the next test case tries to
re-connect to these monitor sockets after unpickled from env
file, even though the former monitor socket connection is
still established. In this case auotest will report a error
of "Could not find (qemu) prompt", though the monitor works
well in fact.

To avoid this problem, this patch just close all monitors'
socket connections at the end of a test case, and let the
following test case try to re-connect if needed.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>