virttest.utils_libguestfs: Add functions for file operations.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
utils_test.libguestfs: Add functions for file operations.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libguestfs.tests: Add test module for libguestfs file operations.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virttest.utils_misc: Allow null source passed to umount.

Sometimes, we don't know what's source is, but mountpoint
can still be umounted, so allowing to pass null for umount.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
qemu: Fix vhost params behavior.

when param[vhost]= [on, force] it create vhost-fds and pass it to
qemu vm correct way.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
shared.unattended: Disable the color display from console

The default bashrc for root in Ubuntu will enable color display
in the console. This caused unreadable characters for some
cmd output, like 'ls'. It will fail our cases as script can not
get the output we want. So disable it in preseed files for install.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
cpuid_test_kernel: Dump additional 0xD subleaves

Those subleaves need to stay stable on QEMU upgrades, too, so it is
useful to dump them.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
qemu_cpu.cfg: Whitelist known broken alias bits on RHEL-6 qemu-kvm

Newer QEMU will make sure the alias bits are consistent, but there are
known bugs on RHEL-6 on some of the alias bits on some of the CPU
models, so whitelist those known issues.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
cpuid: Use new API to detect cases where QEMU aborts

virt-test won't raise VMCreateError anymore, but VMStartError, when QEMU
aborts. Change the code to catch the new exception.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Cc: Ruda Moura <rmoura@redhat.com>
qemu_cpu.cfg: Trivial comments about some config options

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
qemu_cpu.cfg: We don't need any image processing

The qemu_cpu test case doesn't use any disk image, so we don't need any
image processing when running the tests cases.

This should make the tests run much faster.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
qemu_cpu.cfg: Force nettype=none

We don't need networking when running the CPUID dump kernel, so we can
simply skip networking setup.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
shared.cfg: Add config to timedrift_monotonicity for windows guest

"date +%s%N" cannot show the current time for windows guest.

Signed-off-by: Shuping Cui <scui@redhat.com>
virttest.qemu_vm: Catch all exceptions when sending quit to monitor in destroy

When host or guest under heavy load or in a shutdown status from pre case.
VM process may quit during destory() in any steps and will raise very strange
error message like if it is try to kill vm by monitor:
 error: (9, 'Bad file descriptor')

So catch all kinds of exceptions and judge if the process is alive or not.
Log warning message in the log file instead of through errors.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
qemu.tests: Fix bug that 'Tail' object has no attribute 'read_until_last_line_matches'

Now VM.process is a Tail object which do not have read_until_last_line_matches attribute.

So remove read_until_last_line_matches() function call.

Signed-off-by: Feng Yang <fyang@redhat.com>
qemu.tests.migration_with_dst_problem: Check its status before start/stop a service.

Signed-off-by: Feng Yang <fyang@redhat.com>
qemu_cpu.cfg: Add rhel650 variant for rhel6.5.0 machine-type

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Merge pull request #1156 from yumingfei/virt_file_oper

Libguestfs: Add testcases for libguestfs file operations.
test.cfg.fillup_disk: adjust the fillup timeout to 320s

Write file with oflag=direct would take more time to finish.
Merge pull request #1358 from ehabkost/pull-requests/cpuid-dump-update-2014-01-15

CPUID test case update