tests.autotest_control: Add function for running autotest in background

Add two helper functions run_autotest_background()
  & wait_autotest_background().
  Some testcases(ioquit,net_perf2,suspendresume) need run_autotest_background()
  to add workload. Both functions are wrapper of run_autotest thus place them
  in run_autotest.py. If we want to use them, we should import test.autotest
  first.
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Amos Kong <akong@redhat.com>

We have update virt/tests/autotest.py to guest_autotest.py
So run_autotest() have to rename to run_guest_autotest()

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

interface update

Signed-off-by: Feng Yang <fyang@redhat.com>
Signed-off-by: Yiqiao Pu <ypu@redhat.com>
tests.guest_test: Add run_guest_test_background and wait_guest_test_background

Add these two functions for running guest tests in Windows guests.
These functions are cloned from autotest.py

Change the exception type of test timeout in run_guest_test from
error.TestFail to error.TestError, because not all tests actually
fail when timeout happens.

Signed-off-by: Chen Cao <kcao@redhat.com>
qemu.tests: Add yonit_bitmap for regression test

Run yonit bitmap benchmark in Windows guests, especially win7 32bit,
for regression test.

Run the benchmark (infinite) loop background using run_guest_test_background,
and detect the existance of the process in guest.

  if the process exits before test timeout, that means the benchmark
  exits unexpectly, and BSOD may have happened, the screenshot is saved
  by kvm-autotest framework for verification.

  if just timeout happen, this test passes, i.e. the guest stays good
  while running the benchmark in the given time.

Signed-off-by: Chen Cao <kcao@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>

Fix SyntaxError: invalid syntax in yonit_bitmap_benchmark

Signed-off-by: Feng Yang <fyang@redhat.com>
Acked-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Golita Yue <gyue@redhat.com>
qemu.tests: add valgrind test support

This patch is adds to support valgrind test for qemu. This case is
from [general operation] Work around valgrind choking on our use of
memalign().

V2 change form V1:
    using yum install valgrind,
    not tar.gz     fix some typo and mistakes
V3 change form V2
    modify import path and fix some error.
    check the host status to decide whether install valgrind or not
V4 change from V3
    Set start_vm = yes and delete vm.create().
    using mem_equal set mem

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>