qemu.control.kernel-version: Bug fix for control.kernel-version

This patch fix three problems in control.kernel-version:
  - Fix the wrong variable name.
  - Remove the parse_file inside control file for host-kernel.cfg
    Just in clude it as other cfg files in your tests-example.cfg
    which is more flexible. And this also can work with the situation
    that without host-kernel.cfg.
  - Don't get the package version if there is no need for package
    version check.

Also add some docstring for how to use the package filter.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest.qemu_storage: Refactoring and new compare_images method

Refactor qemu_storage.QemuImg() so that it's more logical
to query for available qemu-img commands. Also, introduce
a method .compare_images() method that will take 2 images
and compare them using the subcommand 'compare', if it is
available.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
qemu.test: merge block_mirror test

* Fix incorrect command when run test with qmp monitor;
* Fix logical error that target image file should not
  be opened before the reopen step;
* Merge configuration file into drive_mirror.cfg
* Use by default upstream block mirror names rather than
  assuming RHEL block mirror names.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Signed-off-by: Xu Tian <xutian@redhat.com>
virt: Unifies composition of path.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virt: ignore github report tool cache files

Signed-off-by: Chris Evich <cevich@redhat.com>
shared.cfg: Add guest Win8

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
shared.cfg: Add guest Win2012

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Merge pull request #549 from zhouqt/new-guests

Shared: Add new guests Win8 and Win2012
Merge pull request #528 from ypu/kernel-version

qemu.control.kernel-version: Bug fix for control.kernel-version
qemu.tests.usb: Make cmds in usb_hotplug test configurable

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.cfg: Make usb_hotplug work on win guest

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests: Update qmp_basic_rhel6.py according to qemu changes in rhel6.

Signed-off-by: Feng Yang <fyang@redhat.com>
Merge pull request #550 from zhouqt/usb

qemu: Make usb_hotplug test work on Win guests
qemu.tests: Add block resize case

Add a case for block resize. Use monitor command to resize the block
device. And check it inside guest. This case support Windows and
Linux, qcow2 and raw, virtio_blk, virtio_scsi and ide with different
parameters.

* indentation fixed

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
virttest.test_setup: Add KSM setup class

This class will setup and clean KSM config in different hosts.
You can use setup_ksm to configure it. There are several params
that can be used for ksm configure:

ksm_pages_to_scan: pages ksmd will scan in one loop
ksm_sleep_ms: million secs ksmd will sleep between two scan
ksm_run: start ksmd or not
ksm_module: if ksm is not compiled into kerenl need this parameter
            tell scripts which module should it load
disable_ksmtuned: if we need idsable ksmtuned during our test

This class also can be used to disable KSM in some special case with
set setup_ksm to yes and ksm_run to 0 or no.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
qemu.tests:Add stress_kernel_compile test case.

Add stress test for multi vms with kernel compile running
inside vm.
1. boot up vms
every VM has 4G vmem, the total vmem of VMs' are
$overcommit times as host's mem.(default overcommit=1.5)
2) Launch kernel compile inside every guest.

Changes from v1:
 - modify the parameter "i" to "vmnum"
 - remove "raise error" when kernel compile failed, just return error
to avoid the long message cause virtlab crash
 - put kernel path to virtlab cfg files
 - change the test failed check to ping test, and judge if the guest
can be reach after kernel compile.

Signed-off-by: Golita Yue <gyue@redhat.com>
Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Acked-by: Amos Kong <akong@redhat.com>

Bin folder has been removed and most file in it have been moved to
client folder.

Signed-off-by: Feng Yang <fyang@redhat.com>
qemu.tests: Add new case timedrift montonicity

Add new case timedrift_monotonicity.py
and check the guest time monotonicity after migration.
There are two case:
1. Take the guest time during migration and check time.
2. Let guest running long time after migration and
   check the time.

change from v1:
1. delete guest script, add function to get time in test case
2. fix typo

change from v2:
1. add cmd_timeout
2. add parameter for function get_time()

Signed-off-by: Golita Yue <gyue@redhat.com>
Acked-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Yiqiao Pu <ypu@redhat.com>
qemu.tests: Add timedrift with cpu online/offline test case.

Add timedrift with cpu online/offline test case.
 Check the guest time after offline the cpu
 Check the guest time after online the cpu

change from v1:
1. fix typo
2. add more error.context for other steps

Signed-off-by: Golita Yue <gyue@redhat.com>
qemu.tests.timedrift_with_stop: Add functions for stopping qemu with signal

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang<fyang@redhat.com>
Acked-by: Yiqiao Pu <ypu@redhat.com>
qemu.tests: add kernel boot options for timedrift

changes from v1:
 - add boot options for remove.

changes from v2:
 - also fix guest kernel cmdline in other timedrift testcases.

changes from v3:
 - add a judgement for boot options, don't run this step if there
   is nothing to be add or remove

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
Acked-by: Suqin Huang<shuang@redhat.com>