qemu: Add qmp_event_notification test

This case test QEMU Monitor Protocol Events.
It verifies if the appropriate qmp event
will be emitted when the required conditions
are met.

It tests the following events now:
RESET SHUTDOWN STOP RESUME WATCHDOG.

All tests follow the qmp commands:
system_reset, quit, system_powerdown.

Signed-off-by: Feng Yang <fyang@redhat.com>
config: Update qmp_event_notification config for rhel4 guest

RHEL4 guests need some special config to make this test work.

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest.storage: Pylint/Eclipse style fixes

No actual changes, just cleanups.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
virttest.storage: Change default location

Use root_dir/$backup_dir in case $backup_dir is not absolute path
and change the default backup location to $autotest_data/images/.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
virttest.storage: Don't overwrite backup image during preprocess

Allow backup_image to skip_existing files and use this during
preprocess_image. This could save a lot of time with intrusive tests.

The idea is to create backup image only once and in case of
intrusive tests use restore_image_after_testing_on_error.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
qemu: Add new test case kexec

Design this case according to manual case

[x2APIC] switch kernel with kexec

This case check that x2apic is still enabled after kexec.

Signed-off-by: Feng Yang <fyang@redhat.com>
tests.cfg: Add a config block for simple ping test

The ping test contains 2 subtest now, this patch adds one
more subtest for a simple single-nic-card ping test.

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

Adapt to final version which was committed to qemu upstream.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
qemu.tests: Install cygwin in windows guest

Add case for install cygwin env in windows guests.

change from v1:
   - Add cdrom letter replace to fit different system
   - typo fix and parameter adjust
change from v2:
   - cdrom check command change and the install command update

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Acked-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests: Add case for device properties bit check

This case will check some properties bits for virtio devices set in
the command line. This script will support both block and nic devices.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest.qemu_vm: Change snapshot and boot default to None

Ignore boot and snapshot if not set. This affects only cdrom and
floppy, which doesn't set those variables explicitly.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
qemu: Add test kernbench2

This case is used for performance testing.

Changes for V2
1. Only update gcc when testing on host.
2. Add record_result() function to record the result value to a file.
Changes for V3:
Clean the folder used to make kernel

Signed-off-by: Feng Yang <fyang@redhat.com>
Acked-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Amos Kong <akong@redhat.com>
qemu.tests.kexec: Fix a couple of problems found by pylint

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virt-libvirt: fix wrong directory for virsh schedinfo test module.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
utils_net: Handle missing ctypes module on python 2.4

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest.qemu_vm: Add a new list for supported devices

Other test scripts can use this list directly to check
whether some device is supported by qemu binary.

This patch also moves 'has_device' function in
'make_create_command' method into VM class, so that we
can use this method out of VM class scope.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Qemu Test: pci_hotplug: Update this test case

This patch creates a series of sub functions for device add
action in different version of qemu.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.pci_hotplug: Add sub test support

This patch adds sub test support for pci_hotplug test.
So that we can use following parameters to run some
sub test scripts during hotplug test.
 * sub_type_before_plug
 * sub_type_after_plug
 * sub_type_before_unplug
 * sub_type_after_unplug

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
qemu.tests.cfg: Add config file for pci_hotplug test

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.cfg: Update config for nic_hotplug test

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