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>