提交 e8574938 编写于 作者: C Cong 提交者: GitHub

Merge pull request #772 from Zhengtong/fix_1337028

Fix the problem that can't get return value from echo %OS% cmd in pktgen test case
...@@ -113,7 +113,8 @@ def run(test, params, env): ...@@ -113,7 +113,8 @@ def run(test, params, env):
utils_misc.verify_host_dmesg() utils_misc.verify_host_dmesg()
error.context("Ping external host after pktgen test", logging.info) error.context("Ping external host after pktgen test", logging.info)
status, output = utils_test.ping(dest=external_host, session=session, session_ping = vm.wait_for_login(timeout=login_timeout)
status, output = utils_test.ping(dest=external_host, session=session_ping,
timeout=240, count=20) timeout=240, count=20)
loss_ratio = utils_test.get_loss_ratio(output) loss_ratio = utils_test.get_loss_ratio(output)
if (loss_ratio > int(params.get("packet_lost_ratio", 5)) or if (loss_ratio > int(params.get("packet_lost_ratio", 5)) or
...@@ -125,3 +126,5 @@ def run(test, params, env): ...@@ -125,3 +126,5 @@ def run(test, params, env):
server_session.close() server_session.close()
if session: if session:
session.close() session.close()
if session_ping:
session_ping.close()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册