tests: Update the version command in netperf

This will help to remove the blank lines in the results file. And
make the format suitable for further result analyze.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
tests.netperf: Add some string process code

Process some output value before use them to igonre the problem caused
by different guest os version and session setup.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
tests.boot: Add a parameter to reboot guest for several times

We touched some bugs when rebooting guest for several times.

Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
Acked-by: Suqin Huang <shuang@redhat.com>
qemu.tests.boot: Print test steps

Print boot steps to logging.info

Signed-off-by: Suqin Huang <shuang@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
virt test: ping: Increase timeout of ping external host

The timeout for ping to external host is a bit small,
we can't get the ping summary at last.

>From ping output below (snapped from a windows guest),
ping program will wait about 4s for every packet.
We'd better to set the timeout value to 10 * (4 + 1) = 50s
for windows guest at least.

C:\> ping someserver -n 10 -l 65500
2012-12-28 13:44:02: Pinging someserver [1.1.1.1] with 65500 bytes of data:
2012-12-28 13:44:02: Reply from 1.1.1.1: bytes=65500 time=3ms TTL=63
2012-12-28 13:44:07: Request timed out.
2012-12-28 13:44:08: Reply from 1.1.1.1: bytes=65500 time=6ms TTL=63
2012-12-28 13:44:09: Reply from 1.1.1.1: bytes=65500 time=6ms TTL=63
2012-12-28 13:44:10: Reply from 1.1.1.1: bytes=65500 time=6ms TTL=63
2012-12-28 13:44:15: Request timed out.
2012-12-28 13:44:16: Reply from 1.1.1.1: bytes=65500 time=6ms TTL=63
2012-12-28 13:44:21: Request timed out.
2012-12-28 13:44:22: Reply from 1.1.1.1: bytes=65500 time=6ms TTL=63
2012-12-28 13:44:22: (Process terminated with status 0)

This patch increases the timeout to 60s, to make us can
get a meaningful result except for a ShellTimeoutError.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by:  Xu Tian <xutian@redhat.com>
tests.ping: Update test steps info

This patch also:
 * removes session close action at the end of script.
 * Update some parameters.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
tests.ping: Test all packet sizes for non-windows guest

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
tests.cfg: Disable ping.multi_nics for win guest

Windows os doesn't allow ips of same subnet are set to
different nic cards. So this script can't work in windows
guest, just disable it.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
qemu.tests.multi_disk: Update coding style

This patch:
 * Update docstring, add detail test steps.
 * Add error.context struct to multi_disk case.
 * Fix some coding style problem.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.multi_disk: Fix github issue #438

This is a bug which was introduced in
a1c46d139b79ad7f27ab2dee6f6ff58ac9de65d1

This is no 'qtree' keyword in the output of any
version of qemu, thus the method to check if
qemu supports qtree in that commit would disable
qtree check for every qemu binary.

This commit tries to run the 'info qtree' command
directly, if everything goes well, it means we
have qtree support.

Reported-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.cfg: Don't add any cdrom in multi_disk.max_disk

This test needs to add as many disk as qemu can accept, so
the cdrom added globally is unnecessary.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.cfg: Disable cdrom_test on RHEL3 guest

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt.cfg: Add some subtests for cdrom test

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.cdrom: Make cdrom_not_insert test work

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.cfg.cdrom_test: Add lock check case when media is not present

changes from v1:
  - Disable this case for RHEL 5 host

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu: cdrom_test - Move isos to the images directory

Move this iso that needs write permissions to the same
directory we use for disk images.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virt: New version Cartesian config.

Changes from old version:
 - Splits lexical analyze from syntax analyze.
    (not fully because speed optimization)
 - Makes parser more strict for easier work with configs.
 - Error message should be more concrete.
 - Adds new syntax features.
 - Adds optimization for generation of lots of variants.
 - Improve generating of huge number of variants.
       (almost 2 x faster than old version)  50s old -> 23s new

Disadvantage:
  Syntax analyze is more strict and takes 1/3 of time more
  for parse text. 220ms -> 320ms

New syntax features:
variants:
   - added metadata variants _name_ [default=aaa] [xxx] [yyy]:
     where:
        _name_           - Name of variants group.
        [default=aaa]    - Alternative for @. It raise error
                           if variant aaa missing in variants.
                         - It is possible add more [default=xxx]
                           but only first of them is expanded if
                           defaults is set.
        [xxx], [yyy]     - Another possible metadata for future.
   - default could be enabled and disabled. Generate only default variant.
        enable:
          cartesian_config.py -d
          Parser(..., ..., defaults=True, ...)
        disable:
          cartesian_config.py
          Parser(..., ..., defaults=False, ...)
   - default variant could be expanded by parser parameters.
        cartesian_config.py --expand _name1_,_name2_
        Parser(..., ..., ..., expand_defualts="_name1_, _name2_")

filters:
  - new examples
   only (guest_os=Fedora).15
   only (guest_os=Fedora)..(fedora_version=15)
   only (15)

   variants group "guest_os" and variant name "Fedora"

  - variants comparison is based on hash value
    instead of pure string comparison.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
tests/unattended_install.py: fix virtio related attribute names

There's a typo in `virtio_nework_path` (missing 't'), and for
`virtio_network_installer`, it's missing '_path'.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
qemu.balloon_check:add the missing command to cfg file

When run the case balloon_check.balloon_evict.balloon-migrate,
it will get 'SKIP' result becasue the needed command
'migration_test_command' has been removed.This command
will be used in migration tests.

Readd the command to solve this problem.

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
virt-libvirt: Simplify libvirt.create() serial

Partial fix for issue 427

Signed-off-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
Signed-off-by: Chris Evich <cevich@redhat.com>