virt.virt_v2v_utils: Fix incorrect class calls

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.shared.test:No need to check self.srcdir for twice

Currently, self.srcdir is checked twice in
shard.test,maybe a waste Now just check once
is enough.

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
tests.dbt2: Copy pgpool.conf to parent dir of self.srcdir

Currently,srcdir has change in to client/tmp/dbt2/src,but the config
file pgpool.conf still in client/tests/dbt2/
Now,copy the pgpool.conf from client/tests/dbt2/ to client/tmp/dbt2/
to make the test work.

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
kvm.tests.unittest_kvmctl: Need to check whether the dir exist or not

Currently,there is no file or dir named kvm_userspace/kvm/user,so need
to check,and create it if it doesn't exist.

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
server: Making sleeptest in server mode pass

Testing sleeptest in server mode caused falling in infinte loop.
Checking value of 'initialized' in _init_on_demand_ executed
__getattr__ because 'initialized' wasn't class attribute.
Setting it as class attribute solve problem.

Signed-off-by: Rafal Mackowski <mackoraf@tieto.com>
server: Run server side sleeptest in the client rather than the server

time.sleep(seconds) was executed on server not a client.
After changes client execute sleep and server wait
until client finish the job.

Signed-off-by: Rafal Mackowski <mackoraf@tieto.com>
client.config.kernel_io_tunable_defs:add newest kernel version support

Currently,The kernel version in  kernel_io_tunable_defs is too old,
so that many tests can't be run in the newest kernel.
Now to make it support 3.3.8/3.4.4/3.4.7

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
client.config.kernel_io_tunable_values:add newest kernel version support

Currently,The kernel version in  kernel_io_tunable_values is too old,
so that many tests can't be run in the newest kernel.
Now to make it support 3.3.8/3.4.4/3.4.7

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
client.partition: Change queue for the entire disk, instead of the partition

Currently,it try to return the queue for device,which may cause an
error when run the test about I/O Scheduler,because the device may be
the partition like sdaj12(more than 26+ disks),or whole disk like sda,
for obvious reasons,queue is for the entire disk, not for the partition.
This change try to find out the entire disk of the partition, and get
the queue for the entire disk

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
client.fsdev_disks: Change anticipatory scheduler to cfq scheduler

Currently,the anticipatory scheduler has been chose for I/O scheduler
test, while it has been removed from the 2.6.33 kernel.
Now change it into the cfq scheduler which is the default in current
kernel.

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
client.fsdev_disks: Change filesystem to fstype

Currently, FsOptions has changed the filesystem to fstype in
partition, but in fsdev_disks it does not change yet.
Now to change the filesystem to fstype to make the test work.

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
client.partition: Check the mountpoint before mount

Currently, when mounting a device to a mountpoint,
the code doesn't whether the mountpoint exists,
and this might cause a mount failure. Now check the
mountpoint before mount, if it doesn't exist,
create the mountpoint dir.

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
tests.fsdev: Add utils import to use drop_caches

The control file of test fsdev, uses utils.drop_caches,
which can't be used without importing utils.
Add the appropriate import to make the test case work.

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
virt: openSUSE 11.4 32 bit: fixed wrong boot_path

Signed-off-by: Yury Tsarev <ytsarev@suse.com>
virt: Add openSUSE 12.1 to guest list

Signed-off-by: Yury Tsarev <ytsarev@suse.com>
virt: openSUSE 12.1: workaround of systemd related bug

Autoyast does not properly runs custom stage2 init scripts on systemd
enabled systems which eventually leads to failure of boot test.

Add chroot script of 'insserv autoyast' on stage1 to mitigate
the issue.

Signed-off-by: Yury Tsarev <ytsarev@suse.com>
shared.git: Remove double quotes on result of get_topmost_commit

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virt.installer: Register keyval with installed sw versions

In order to display the appropriate virt software versions
installed in the autotest results email, we can register
versions like the precise git repo definition used to
build that software, or all the packages from Brew/Koji
that were installed.

This is attained by creating an additional method,
write_version_keyval, that gets executed after the
installation was performed. The first Installer class
that gets a get_version method is GitRepoInstaller.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
scheduler.scheduler_models: Tidy up results format email

Make the autotest results email to be more concise and
legible. The current specification of the format follows:

Subject: Autotest <#jobid> | <job name> | success: <x%>

<job name>
<job URL>
Tests run: <n>; pass: <n>; skip: <n>; fail: <n>; sucess rate: <x%>

FAIL (n):
  <shortened test name>
      <failure description, restricted to 76 collumns, no
      trailling whitespaces, idented and aligned>
  <shortened test name>
      <failure description, restricted to 76 collumns, no
      trailling whitespaces, idented and aligned>

SKIPPED (n):
  <shortened test name>
      <reason>
  <shortened test name>
      <reason>
  <shortened test name>
      <reason>
  <shortened test name>
      <reason>
  <shortened test name>
      <reason>

PASS (n):
  <shortened test name>
  <shortened test name>

This patch implements this new formatting. Some adjustment
is required before we get it to a more final version.

Also, make it possible to print on the results email
arbitrary keyvals recorded by tests. It works by providing
a comma or space separated value list on global_config.ini
with the name of the keyvals, so it's possible to display
useful information.

Example: On the kvm tests, it's useful to know the exact
git version used to build qemu-kvm and the unittests, so
we can just specify them on global_config.ini and then
you'd have things like:

software_version_qemu_kvm: git://github.com/avikivity/qemu.git:master:233c709c4c6384d50004f8413d0a465ac1d29419

software_version_kvm_unit_test: git://github.com/avikivity/kvm-unit-tests.git:master:d423ca3642579c76f3f6784ae2b7827f36d940a0

On the results e-mail.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
libvirt: hvm_or_pv='hvm' when not specified

Signed-off-by: Chris Evich <cevich@redhat.com>