提交 c890a3ed 编写于 作者: Q Qingtang Zhou 提交者: Lucas Meneghel Rodrigues

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: NQingtang Zhou <qzhou@redhat.com>
Acked-by: NXu Tian <xutian@redhat.com>
上级 095f959d
......@@ -112,7 +112,7 @@ def run_ping(test, params, env):
error.context("Ping with packet size %s" % size,
logging.info)
status, output = session.cmd_status_output(cmd % size,
timeout=20)
timeout=60)
_get_loss_ratio(output)
if status != 0:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册