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>
virt tests: Add test for removing guest

Running libvirt test with sample configuration create guest that stays
in system after the test. This complicate running test again. For xen is
this issue bigger complication as it does not allow to run pv and hvm test
in one run (second of them will fail as name exists).

This patch adds simple test 'remove_guest' that take care of removing guest
from system. This test is added to sample configuration of libvirt too.

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
virt.kvm_vm: Fix shell_prompt regular expression not passed to "ShellSession"

if we don't pass the shell_prompt to the class "ShellSession",
it will use the default one from __init__ of "ShellSession",
if it doesn't match it, it will cause a failure.

Signed-off-by: Lei Yang <yanglei.fage@gmail.com>
virt: subtests.cfg.sample - Add "only Windows" to ntttcp testcases

So far, this testcase is designed for Windows,
so add "only Windows" in the config file to make
sure linux guest not run it.

Signed-off-by: Lei Yang <yanglei.fage@gmail.com>
virt.kvm_vm: Extend SPICE support

The past SPICE support was covering only old qemu-kvm and it's not
working any more with recent qemu

Added SPICE features (configurable qemu-kvm options):
* QXL: configurable memory for qxl
* SSL :x509-dir, x509-key-file, x509-cacert-file, x509-cert-file,
* x509-key-password, tls-port, tls-ciphers, secure-channels
* SSL: added virt_utils.create_x509_dir() which creates required
* certificates for x509 options
* Compression: image-compression, jpeg-wan-compression,
* zlib-glz-wan-compression, playback-compression
* Networking: ipv4, ipv6, addr
* Other: agent-mouse

Modified:
* QXL: replaced old way of defining number of qxl devices qxl=n ->
* -device qxl
* QXL is now being trough in kvm_vm.add_vga()
* VGA: vga = std is now defined in base.cfg.sample (removed from
* -nodefaults in kvm_vm.py)
* drop add_qxl_vga() into favor of add_vga() (+ add_qxl() in case that
* user defined qxl memory or extra qxl devices)

Signed-off-by: Lubos Kockman <lkocman@redhat.com>
virt.virt_utils: Fix create_x509_dir function

As it had several coding style inconsistencies. Also,
move it in the virt_utils file.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
ltp: Fix duplicate names in list of failed tests.

Signed-off-by: Vinson Lee <vlee@twitter.com>