virt: replace is_alive with isAlive as commit d03dd090

Check the whole autotest repo by grep, fix rest problem.

threading.is_alive is only available starting with Python 2.6.

Signed-off-by: Amos Kong <akong@redhat.com>
client.fio: Update fio from 1.16.5 to 2.0.5

Since 1.16.5 version of fio can't be compiled on Fedora16 and
RHEL6 boxes, update this fio package to 2.0.5.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt.tests.netstress_kill_guest: Workaround udev writing to serial

On some Linux guests such as RHEL 6.2, it's common that when
the succession of rmmods and modprobes happen, udev, SELinux
and other platform software write messages directly to the
serial, confusing aexpect. So let's write some code to
work around this peculiarity, being more robust in handling
these situations.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virt.tests.ethtool: Improving logging and fixing loop execution

Make sure we go through all tests available and record the failures.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client tests: Introduce libvirt_tck wrapper

    This is an autotest wrapper based on the released
    TCK version 0.1.0.

     *Sys-Virt-TCK-v0.1.0.tar.gz  libvirt-tck tarball
     *control
     *default.cfg
     *ks.cfg
     *libvirt_tck.py
     *testcase.cfg

Signed-off-by: Guannan Ren <gren@redhat.com>
tests.cgroup: Fix cfg parameters

This patch solves the problem with smp parameter.
* cpu_cfs_util - test creates the first VM instead of preprocess
* cpu_share - 'cgroup_use_max_smp' cfg parameter let test calculate smp
* cpuset_cpus - when cpusets is defined it calculates smp from it. Otherwise
                user can force test to set smp by cgroup_use_half_smp.
                When nothing is specified it tries to run on current VM(s).

Signed-off-by: Lukas Doktor <ldoktor@redhat.com>
client.tests.cpu_hotplug: Fix test execution and parsing

As it was, the cpu_hotplug test was executing the lhcs
suite main entry point and checking its return value.
However, the suite was not well structured, and it will
return 0 even if the subtests failed.

So worked on the suite itself and created a patch
that makes it comply with the rules stablished by
the testsuite author:

http://cpansearch.perl.org/src/BRYCE/Test-Parser-1.3/lib/Test/Parser/LHCS.pm

Also, made the autotest wrapper to parse correctly
the test suite output. Now it should execute and
actually report failures during the test execution.

Some of the testcases were disabled, since they
describe a behavior in the userspace program sar
that I can't reproduce with any sar available in
Fedora or RHEL 5-6 to date, and one of the testcases
does require a linux kernel tree for kernel
compilation.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
kernbench: Bump kernel version used to 3.2.1

The version 2.6.11 does not compile anymore on older
distros, asking for an update.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Disable drive_cache for xen hvm installation

Commit b6bb71130 fix using drive_cache option. However, this is not
supported by xen qemu and so breaks xen hvm installation.

This patch unset drive_cache so it is not used for hvm installation.

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
common_lib.base_utils: Fix spelling errors.

Signed-off-by: Vinson Lee <vlee@twitter.com>
virt test: Make cpus check pattern configurable

The cpus info output from monitor is different between human
monitor and qmp monitor, so make it configurable to fit different
cases.

changes from v1:
  - typo fix
  - Add default value for the pattern. Use the pattern for human
    monitor as default
  - Add comments in base.cfg.sample for the value of qmp monitor

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
memory_api: Do not recreate the temporary test directory.

The directory has already been created by base_test.

Fixes OSError exception.

Signed-off-by: Vinson Lee <vlee@twitter.com>
dhclient failed in nic_bonding cases V3

Before dhclient, we need to check if it has been running,and then kill it

Signed-off-by: Lei Yang <yanglei.fage@gmail.com>
Add three test cases for "virsh capabilities" command

This patch adds three test cases for "virsh capabilities" command.

Use three cases:(1) Call virsh capabilities
                 (2) Call virsh capabilities with an unexpected option
                 (3) Call virsh capabilities with libvirtd service stop

Signed-off-by: Gu Yanhua <guyanhua-fnst@cn.fujitsu.com>
Add configuration for "virsh capabilities" test

This adds configuration for "virsh capabilities" test.

Signed-off-by: Gu Yanhua <guyanhua-fnst@cn.fujitsu.com>
deps: Update stale tarball links.

Signed-off-by: Vinson Lee <vlee@twitter.com>
apache: avoid globally modifying /media serving

When attempting to serve a sles11-sp2 install from cobbler on the same
host as autotest, I got 404s for

http://<server>/cblr/links/sles11-sp2-suseboot-ppc64/media.1

with httpd complaining:

File does not exist: x/usr/lib/python2.7/site-packages/django/contrib/admin/media/.1

This is because of the django directives from autotest being global to
apache's configuration, so they affect more than just autotest's
installation. Fix this by pushing the RewriteRules under the Location
tag.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
client.tests: Introduce libvirt-test-api wrapper

Introduce a wrapper for the libvirt_test_api. This
testsuite is a functional suite for libvirt, that
makes use of the python bindings available.

Some base config files are provided so the user
can tweak appropriately before running the test.
The tests currently cover:

 * domain: all classical lifetime operations, installation of
various guests OSes, snapshots
 * interfaces: define, create, destroy, undefine, NPIV
 * virtual networks: define, create, destroy, undefine
 * storage: regression tests for most storage types and
configurations dir, disk, netfs, iSCSI, multipath

Signed-off-by: Guannan Ren <gren@redhat.com>
virt test: Add qemu-io class

Add qemu-io class to provide interface for tests to execute qemu-io
command.
There are two kinds of qemu-io execute way:
  - QemuIOShellSession: Provide a shell session to execute qemu-io
    operates continuously
  - QemuIOSystem: Execute qemu-io command which will return
    immediately. Mainly for qemu-io -c, -h and -V

changes from v1:
  - typo fix
changes from v2:
  - Add function get_cmd_line to reduce the reduplicate code
  - remove useless lines
  - Use qemu_io_binary to get qemu_io from params

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
KVM test: Add qemu-io blkdebug test

This test will check if the error output from qemu-io is fit the
blkdebug.cfg. Steps as following:
    1. Create image with given parameters
    2. Write the blkdebug config file
    3. Try to do operate in image with qemu-io and get the error
       message
    4. Get the error message from perror by error number set in
       config file
    5. Compare the error message

If you want to make up your own qemu-io blkdebug test with different
error event. You can modify these parameters:
  err_event: the error event will write in blkdebug.cfg
  err_command: the command running in qemu-io which will trigger
the error event

changes from v1:
  - Use ConfigParser to generate the blkdebug.cfg file from the
changes from v2:
  - Update the interface
  - Remove the useless line and fix and make the variable name
    more clear

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