kvm: Fix vm.add_nic() bug from vmnet list/dict ambeguity

Signed-off-by: Chris Evich <cevich@redhat.com>
virt: add fail test

Signed-off-by: Chris Evich <cevich@redhat.com>
ltp: Use absolute paths to copy.

The relative locations between bindir and srcdir have changed.

Signed-off-by: Vinson Lee <vlee@twitter.com>
virt test: Fix bug global name 'blkdebug' is not defined in kvm_storage.py

Signed-off-by: Feng Yang <fyang@redhat.com>
KVM-Test: kvm_test_utils: add function for updating grub

Changes from v1:
Add error context mechanism.
Add docstring for parameters introduction.
Use 'os_type'.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Feng Yang <fyang@redhat.com>
add anaconda logging

Anaconda in recent fedora versions sends logs to the virtio serial port named
'org.fedoraproject.anaconda.log.0' if present.  Wind up autotest logging for it.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
KVM Test: usb_storage: Ignore letter case when checking removable option

The pattern string for removable option in usb_storage
test script isn't suitable for RHEL5 guest. Thus ignore
the letter case when checking this option.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
KVM Test: usb_storage: Disable io_size check in RHEL5 guest

According to the doc [1], the {minimum,optimal}_io_size
options are only for RHEL6 kernel, so disable them in
RHEL5 guest.

[1] http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/newstorage-iolimits.html

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
virt.cfg: Update config for kernel_install

Update the default and example config for kernel_install case

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
client.tests: kernelinstall: Update control file

Update the control file for kernelinstall test:
 - Correct a typo in control file
 - Update params dict, adding some example in it.
 - Remove unused function.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt.kvm_vm: Check if qemu support 'boot' parameter for drive option

Since 'boot' parameter for 'drive' option is obsoleted, Adding some
checking step to remove this parameter when using newer qemu version.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt.cfg: update netdev_peer_re for RHEL6

The original regex pattern netdev_peer_re gets a '\r'
charactor by mistake, it makes autotest framework
crash when parsing error message.

This patch updates this regex pattern, getting rid
of the special charactor at the end of string.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
virt: Update sample linux test sets to use virtio drivers

These days, the current versions of Ubuntu ship sufficiently
new qemu, also, we had a recent patch that only adds boot=on/off
if qemu supports it. So now, finally, it *should* be
safe to have virtio_net and virtio_blk on the default
sample test sets for linux.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
dbench: Fix patch file location.

Signed-off-by: Vinson Lee <vlee@twitter.com>
dbench: Compile with pthread instead of lpthread.

Fix build on Ubuntu 11.10 and Ubuntu 12.04.

Tested that dbench still builds with Ubuntu 11.04, CentOS 5, CentOS 6,
and Fedora 17.

Signed-off-by: Vinson Lee <vlee@twitter.com>
iozone: Fix patch file location.

Signed-off-by: Vinson Lee <vlee@twitter.com>
virt: To run ltp tests on guest

Signed-off-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
frontend.db.backends: Fix undefined name error in _valid_connection

We've experienced some problems in a newer instance of
our autotest server, when we discovered that one exception
handling in the django db code (introduced by
ee3cced1afb6bc45216c7038472827ad4033c3f5) had the wrong
namespace for the DatabaseError. Without the appropriate
path, the exception handling would itself throw a NameError
exception, making the function return None.

This is expected to fix errors like:

[Tue Jul 10 10:35:04 2012] [error] [client 1.2.3.4]     return
self.connection.rollback(), referer:
http://foo.com/afe

[Tue Jul 10 10:35:04 2012] [error] [client 1.2.3.4] OperationalError:
(2006, 'MySQL server has gone away'), referer:
http://foo.com/afe/

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Client: Enhancements for xml_utils & unittest

* Added abstract base classes
    * TempXMLFile - Temporary file that unlinks on destruction
    * XMLBackup - Backup temporary file of some source content
    * XMLBase - ElementTree from Backup temporary file of source content
* ElementTree and xml_utils update
    * Convert all ElementTree classes into "new-style" classes
      (ugly, best of two evils)
    * Impliment string.Template based XML templates and unittests
* Uniformly support ElementTree XPATH refs.
    * Included 2.6 copy of ElementPath module
    * Hard-coded autotest ElementTree to use bundled ElementPath
      (ugly, best of two evils)
* Unittests for all classes & methods

Signed-off-by: Chris Evich <cevich@redhat.com>
virt: Run vm.pause/resume methond instead of call monitor cmd

Some cases call Monitor.cmd method directly, and they can't
work with qmp monitor, we need to make them call the wrapper
of monitor instead.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>