Merge pull request #633 from humanux/vhost_threads

virttest.qemu_vm : add function to get vhost threads
shared.deps: Adding build_install.py script to download git repo, build and install

In order to build git repos in the guest, ship this simple script.
It'll be used to build SPICE components, though it could be used
for other purposes.

Signed-off-by: Swapna Krishnan <skrishna@redhat.com>
Add NetworkManager and enable servie for RHEL.5 guest

Signed-off-by: Xiaoqing Wei <xwei@redhat.com>
Merge pull request #759 from xiaoqing-wei/rhel5.NetworkManager

Add NetworkManager and enable servie for RHEL.5 guest
Merge pull request #758 from zhouqt/migrate

virttest.qemu_vm: Check migration_exec_cmd_src before accessing it
qemu.tests: fix login test fail when need_install is yes

VM paused after install finished because of option '-no-shutdown', and
env.get_vm() got a paused VM, so case will fail at wait_for_login() when
need_install is 'yes';

Signed-off-by: Xu Tian <xutian@redhat.com>
qemu.test : add some test for cpu_hotplug

Add cpu_hotplug test support in autotest.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
virttest.qemu_devices: Support for old qemu ide disks

Older qemu versions (RHEL6) doesn't support ide-hd and ide-cd.
Use ide-drive instead.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
qemu_cpu.cfg: remove "no 486" line

I don't know why 486 was being excluded, as the CPUID instruction really
works, and QEMU has CPUID data being set for 486, too. The tests keep
working after removing the "no 486" line from the config file.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
qemu.tests: fix some small bugs

1). update pre_command: used scsi_debug parm to add_host instead write
sys filesystem to avoid device create delay;

2). fix passthrough scsi device cache to writethrough to avoid fail to
open /dev/sg* when drive_cache=none; do this because /dev/sg* is
emulated by scsI_debug module, backend of these device is memery, open
with O_DRIECT is not supported;

3). removed useless import module 'qemu_monitor'

Signed-off-by: Xu Tian <xutian@redhat.com>
virttest.qemu_devices: Correct English spelling

Correct bad English spelling and typos.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
virttest.qemu_devices: Set port of the last usb device

When last device should be appended to usb bus, qemu automatically
add usb-hub to keep free ports for additional devices. We don't want
this in autotest as all tests use strict amount of usb buses. By
enforcing the last item's port we avoid this behavior.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
qemu: Fix utils.system_output() calls incompatible with at 0.14

In some places of our code, we're calling utils.system_output
with a parameter verbose, introduced in autotest 0.15. Therefore,
for people using the Fedora/RHEL shipped RPMs, a bug will
happen since the API on their RPMs doesn't know about the verbose
param.

Therefore, remove such calls and get the equivalent construction
using the utils.run API, that does support the parameter.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
qemu.tests: add virtio-scsi,ide block device serial No.catch check

Add catch_serial_cmd for virtio_scsi, ide block device;

Signed-off-by: Xu Tian <xutian@redhat.com>
virttest.qemu_devices: Lose verbose=False incompatible with at 0.14

This is an attempt to better fix the issue where system_output
doesn't have the verbose parameter in autotest 0.14. It is better
and less desruptive to simply lose the parameter, and we can
get it back once 0.15 rpms are available on Fedora.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virt.tests: sync libhugetlbfs testing to autotest_control suite

Signed-off-by: Xu Tian <xutian@redhat.com>
virt.shared: add glibc-devel and glibc-static into RHEL.6 ks

glibc-devel and glibc-static is requried by build libhugetlbfs source;

Signed-off-by: Xu Tian <xutian@redhat.com>
virttest.aexpect: Make it possible to ignore command exception in cmd().

Support ignore_all_errors parameter in cmd()
When run some clean up command in guest. We may do not want to fail the case
for any exception in the command.
So add ignore_all_errors parameter in cmd() to ignore exception.

Signed-off-by: Feng Yang <fyang@redhat.com>
qemu.tests.stop_continue call session.cmd() with ignore_all_errors=True.

We do not want to fail the case for exception in clean up command.

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest.utils_libguestfs: Add mount option and methods for Guestfish.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>