virt-libvirt: Helpful exception for SELinux enforcing

Signed-off-by: Chris Evich <cevich@redhat.com>
virttest: rename params in QemuImg.convert()

rename image_name_tag to convert_name_xx, because if image format not
change when convert, converted image will over write original;

Changes from V1:
    replace params.get() with params[] to avoid missing param errors.

Signed-off-by: Xu Tian <xutian@redhat.com>
qemu.tests: new class for qemu-img function tests

Implement some basic operations for qemu-img function tests

Changes from V1:
    replace params.get() with params[] to avoid missing param errors.

Signed-off-by: Xu Tian <xutian@redhat.com>
qemu.tests: add qemu_disk_img_convert tests

Implement to test qemu-img convert function; convert base image or
snapshot image from one format to another format, then check image content
not changed after image convert;

Changes from V1:
    replace params.get() with params[] to avoid missing param errors.

Signed-off-by: Xu Tian <xutian@redhat.com>
qemu.tests: add qemu_disk_img_commit test

Implement new test to check qemu-img commit function;

Changes from V1:
    replace params.get() with params[] to avoid missing param errors.

Signed-off-by: Xu Tian <xutian@redhat.com>
qemu.tests: add qemu_disk_img_rebase test

Implement new test to check qemu-img rebase function

Changes from V1:
    replace params.get() with params[] to avoid missing param errors.

Signed-off-by: Xu Tian <xutian@redhat.com>
virt: Fix issue 463

SubdirList.__set_initset__() was modifying the contents of
a list while iterating over it.  This caused every-other
subdirectory to be skipped when building a flat tree list.

Signed-off-by: Chris Evich <cevich@redhat.com>
virt: Reduce extranious test-search debug

If a test cannot be found, the list of searched subdirectories
will be included in the exception.  Otherwise, assume users
aren't interested in seeing the entire tree every run.

Signed-off-by: Chris Evich <cevich@redhat.com>
check_patch.py: Avoid IndexError when checking git status

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
qemu.tests: Updates to smbios_table

Compare SMBIOS data among different machine types

This patch modify smbios_table, add smbios three smbios type
and machine type test(-M) support.

You can run smbios_table using "-smbios type=0" "-smbios type=1"
or both of them in test,and you can run test using diff machine type.

[V3] update base upstream, make all the option and command configurable.
[V4] modify some format problem

signed-off-by: Yunping Zheng <yunzheng@redhat.com>
Acked-by: Suqin Huang <shuang@redhat.com>

qemu.test: Make smbios_table to run on Fedora guests

Add a parameter to test the options not set on Fedora.
And fix the params error when extra_params is empty.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
tests: Update the version command in netperf

This will help to remove the blank lines in the results file. And
make the format suitable for further result analyze.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
tests.netperf: Add some string process code

Process some output value before use them to igonre the problem caused
by different guest os version and session setup.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
tests.boot: Add a parameter to reboot guest for several times

We touched some bugs when rebooting guest for several times.

Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
Acked-by: Suqin Huang <shuang@redhat.com>
qemu.tests.boot: Print test steps

Print boot steps to logging.info

Signed-off-by: Suqin Huang <shuang@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
virt test: ping: Increase timeout of ping external host

The timeout for ping to external host is a bit small,
we can't get the ping summary at last.

>From ping output below (snapped from a windows guest),
ping program will wait about 4s for every packet.
We'd better to set the timeout value to 10 * (4 + 1) = 50s
for windows guest at least.

C:\> ping someserver -n 10 -l 65500
2012-12-28 13:44:02: Pinging someserver [1.1.1.1] with 65500 bytes of data:
2012-12-28 13:44:02: Reply from 1.1.1.1: bytes=65500 time=3ms TTL=63
2012-12-28 13:44:07: Request timed out.
2012-12-28 13:44:08: Reply from 1.1.1.1: bytes=65500 time=6ms TTL=63
2012-12-28 13:44:09: Reply from 1.1.1.1: bytes=65500 time=6ms TTL=63
2012-12-28 13:44:10: Reply from 1.1.1.1: bytes=65500 time=6ms TTL=63
2012-12-28 13:44:15: Request timed out.
2012-12-28 13:44:16: Reply from 1.1.1.1: bytes=65500 time=6ms TTL=63
2012-12-28 13:44:21: Request timed out.
2012-12-28 13:44:22: Reply from 1.1.1.1: bytes=65500 time=6ms TTL=63
2012-12-28 13:44:22: (Process terminated with status 0)

This patch increases the timeout to 60s, to make us can
get a meaningful result except for a ShellTimeoutError.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by:  Xu Tian <xutian@redhat.com>
tests.ping: Update test steps info

This patch also:
 * removes session close action at the end of script.
 * Update some parameters.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
tests.ping: Test all packet sizes for non-windows guest

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
tests.cfg: Disable ping.multi_nics for win guest

Windows os doesn't allow ips of same subnet are set to
different nic cards. So this script can't work in windows
guest, just disable it.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
qemu.tests.multi_disk: Update coding style

This patch:
 * Update docstring, add detail test steps.
 * Add error.context struct to multi_disk case.
 * Fix some coding style problem.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.multi_disk: Fix github issue #438

This is a bug which was introduced in
a1c46d139b79ad7f27ab2dee6f6ff58ac9de65d1

This is no 'qtree' keyword in the output of any
version of qemu, thus the method to check if
qemu supports qtree in that commit would disable
qtree check for every qemu binary.

This commit tries to run the 'info qtree' command
directly, if everything goes well, it means we
have qtree support.

Reported-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>