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>
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>
qemu.tests: Measure increment of clock drift (100% load)

Add two parameters to let test case timedift.with_load
can be configured. When need run long time testing, can
reset the value "test_duration" & "interval_gettime".

Signed-off-by: Golita Yue <gyue@redhat.com>
qemu.tests: Add new subtest to qemu_img

Signed-off-by: Feng Yang <fyang@redhat.com>
KVM-Test: Boot/shutdown rebased image
Signed-off-by: Suqin Huang <shuang@redhat.com>
KVM Test: check the image after image creation.
KVM test: qemu_img: Pre-allocated metadata qcow2 format support
KVM Test: Raw device support for qemu_img test
KVM test: qemu_img add the qcow2 over LVM checking
Signed-off-by: Jason Wang <jasowang@redhat.com>
KVM Test: Add cluster_size_2048 test case.
Bug fix and add error.context in qemu_img.py script
Fix bug that guest start twice.
Signed-off-by: Feng Yang <fyang@redhat.com>
KVM-Test: qemu_img.py: update case with new autotest api
virt: Update 'guest_name' to 'os_type' in all scripts
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
KVM-test: Update qemu_img commit test command to support Windows
Signed-off-by: Yiqiao Pu <ypu@redhat.com>
tests: Update nic driver directory in netstress_kill_guest.py

The nic driver directory is different for rhel4.9 guest
so make it configurable and update it to correct one.

Signed-off-by: Golita Yue <gyue@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
qemu.tests: Add a qemu subtest script multi_vms_nics.py

Mainly test steps:
1. Check if the NIC number in guest matches that specified in config file.
2. Get the ip-mac pair in guest.
3. Gather the ping info by tcpdump.
4. Check if the ip-mac info matches in the tcpdump output.
5. Check if the ping count matches the given number.

Signed-off-by: Bear <byang@redhat.com>
Signed-off-by: Ken Cao <kcao@redhat.com>
Signed-off-by: Yolkfull Chow <yzhou@redhat.com>
Signed-off-by: Feng Yang <fyang@redhat.com>
KVM-test: Multi nic test case improve
Signed-off-by: Yiqiao Pu <ypu@redhat.com>
KVM Test: multi_nics: Fix argument order for scp_between_remotes
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
KVM Test: Refactor multi_nics.py test script
Rename multi_nics.py to multi_vms_nics.py
Support multi vms and multi nics.
Signed-off-by: Feng Yang <fyang@redhat.com>
qemu: Fix syntax error in multi_nics.py
Signed-off-by: Feng Yang <fyang@redhat.com>