To fix qemu-img and qemu-io binary path assignment
libvirt: Add test module for virsh net-uuid.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virt: add new_from_net_dumpxml() and get_uuid_by_name() for virsh net-uuid.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
qemu.tests: Add base KSM test case

Add three KSM test:
    - Negative test for ksm
    - KSM per vm
    - Merging and Splitting in one vm

All this three test needs the following steps:
1. Get and set the env parameters for KSM
2. Boot up guest with proper command line
3. Set env inside of guest
4. Allocate 0 pages to make the KSM run
5. Allocate different pages to get split of the pages(option for
   different cases)
6. Result check and env reset

change from v1:
    - add the host depended parameters in cfg file
    - use os.system to restart ksmtund as commands will wait the
      return value.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>

This patch fix the problem caused by the sciprt have move to
another dir. So modify the path of the file.

Signed-off-by: yunzheng <yunzheng@redhat.com>

Fix reference problem

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

Update API using in ksm_base to date

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Signed-off-by: Feng Yang <fyang@redhat.com>

Set up the memory filled in guest lower that the free memory in guest.
To ignore the OOM killer.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
qemu: Add qemu_killer_report test script

Automate the testcase named "QEMU should report
the PID of the process that sent it kill
signals test case" that sent it kill signals.

Signed-off-by: Feng Yang <fyang@redhat.com>
Acked-by: Xiaoqing Wei <xwei@redhat.com>
Acked-by: Qingtang Zhou <qzhou@redhat.com>
virttest.qemu_monitor: Verify hmp cmd in qmp as well

Some QMP's interface will fallback to HMP if there is no
match QMP command, this patch checks HMP before calling
HMP cmd in QMP, to avoid some unexpected failure.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virttest.qemu_vm: Add check for KVM internal error

Verify KVM internal error occurance during VM.verify_alive().

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
virttest.qemu_vm: Speed-up the verify_userspace_crash()

Make verify_userspace_crash() a bit faster for normal execution (a bit
slower on failure, but the test is already failing so it's not an issue).

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
virttest.qemu_vm: Make image_boot optional

Not all disks have to have image_boot specified.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
qemu.tests.multi_disk: Use images/$disk_name location by default

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
qemu.tests.multi_disk: Fix bug in max_disk.ide configuration

Current config generates 5 disks, because one is added by the test
logic. This can be workarounded by setting stg_image_num = 0 and
using old params or using stg_params instead (this patch).

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
qemu.tests.multi_disk: Don't print monitor help to log

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
qemu.tests.multi_disk: start from PCI 3 in max_disk.virtio_blk

For Linux guests we require 27 disk + 1 boot image. We have to start
assigning PCIs from 0x3 in order to have 1 slot for NIC.

It would be also possible to remove VGA and use 28 disks.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
standalone_test: Record the test start time only once

The test output directory is named as the test starting
time, but standalone script gets the start time twice,
this would make the debug directory name different with
its output in debug log.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
standalone: Create a symbolic link for the latest test run

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virttest.version: Get only the first line of top commit cmd output

So we don't get the logs polluted by lines that show
added files.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
qemu.tests: Add live_snapshot case

1. create live snapshot during file creating
2. create live snapshot when guest reboot

Signed-off-by: Suqin Huang <shuang@redhat.com>
Acked-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
qemu.tests: Add live_snapshot with file transfer

create live snapshot during file transfer

Signed-off-by: Suqin Huang <shuang@redhat.com>
Acked-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang<fyang@redhat.com>
qemu.tests: live_snapshot update

Update the functions using in this scripts to date and bug fix

Signed-off-by: Suqing Huang <shuang@redhat.com>
Signed-off-by: Feng Yang <fyang@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Signed-off-by: Yiqiao Pu <ypu@redhat.com>
qemu.tests: add base test for livesnapshot

This script check file content not changes after create livesnapshot;
changes from v1:
    1). used utils.has_file instead get md5 by shell command
    2). instead guest_name param with os_type param to identify guest
    os type

small fix, instead guest_name param with os_type param

Signed-off-by: Xu Tian <xutian@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>