virsh_domxml_to_native test improvements

Various changes to make the test function:
    Adjust the read process cmdline based on the knowledge that on
        Fedora 18 or later host, the qemu-kvm command line argument
        can be changed to be "qemu-system-x86_64 accel=kvm"
    Adjust the splitting of the command line from a list of each element
        that was separated by a space to a more ordered and natural
        looking list of items with "-option [arg]" on one line rather
        than adjacent "-option" "argument" elements
    Adjust the logic to perform better diffs using sets and determining
        what is in one list and not the other
    If differences are found, print them and in which order to make for
        easier debugging of problems

Signed-off-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
virttest.libvirt_storage: Add define_disk_pool function for StoragePool class.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
v2v.tests: Support disk type pool for local virt-v2v test.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
qemu.test: Restructure balloon_check

Now have two different class for Windows and Linux balloon test. Most of the
functions in these classes are same and inherit from class BallooningTest.
They have different error_report and get_memory_status. Also add some different
method to set ballooned memory in cfg files. Now the ballooned memory size also
can be set by a given value or a ratio base on the assign memory value.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
qemu.test.cfg: Add a balloon check case with fixed value.

This case follows the following steps:
ballooned memory to 1/2
do guest s3
ballooned memory to 3/4
do guest s4
ballooned memory to 7/8

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
compute total-significance by ratio paired t-test

Total-significance isn't good in current results, we should not use
standard paired t-test for it.

This patch use ratio paired t-test to compute total-significance,
just compute logarithm of samples and then execute standard paired
t-test.

Example: (we can see the p-value is reduced obviously, expected)
 control: [ 1  2  4  8 16]
 treated: [ 2  4  8 16 32]
 p-value: 0.0854412369731

 control: [ log(1)  log(2)  log(4)  log(8)  log(16)]
 treated: [ log(2)  log(4)  log(8)  log(16) log(32)]
 p-value: 8.88531529942e-65

Signed-off-by: Amos Kong <akong@redhat.com>
rh_perf_envsetup.sh: fix disable/stop services

The services to disable are difference with the services to stop,
it should be same.

smartd is stopped twice, so sort services alphabetically to avoid
duplicates.

Signed-off-by: Amos Kong <akong@redhat.com>
virsh_net_create: Remove incorrect redundant test

Remove the 'variant' for 'existing_network' within the variants for
bad_command_line.  Since each of the error_test variants already has
a 'no_existing_removal' and 'existing_removal' option, the removed
code would was redundant. Additionally, since the existing_network
option didn't have a net_create_options_ref, net_create_options_extra,
or net_create_corrupt_xml parameter, the test went through the high
level test code which was not expected for error_test code unless
the net_create_remove_existing is set to yes.
virttest.libvirt_xml: Fix wrong comment of vm_xml.set_cpu_mode.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virttest.libvirt_xml: Add get_first_mac_by_name method for VMXML class.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virttest.utils_libguestfs: Add functions for libguestfs tools.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libguestfs.testcases: Add test for guestfish disk operations.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
v2v.tests: Adjust parameters for convert_local_image test.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
v2v.tests: Minor fix to convert_local_image module.

* Add debugging for test module.
* Make sure converted vm is down when cleanup.
* Change temp dir for pool from test.tmpdir to data_dir.TMPDIR.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
v2v.tests.convert_remote_vm: Fix syntax error
virttest.virsh: Fix syntax error
qemu.tests.readonly_disk: Remove unused utils_test import

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
qemu.tests.enforce_quit: Remove unused utils_test import

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
qemu.tests.live_snapshot_chain: Remove unused utils_test import

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest: Create module utils_test

In order to split the utils_test module, turn it into
a python module first. This change shouldn't affect
virt-test, while it allows us to start moving code around.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>