Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Unified Diff: client/tests/kvm/tests/jumbo.py

Issue 6246035: Merge remote branch 'cros/upstream' into master (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: client/tests/kvm/tests/jumbo.py
diff --git a/client/tests/kvm/tests/jumbo.py b/client/tests/kvm/tests/jumbo.py
index 2c91c839071b9d65d6338c7141f66d8d5d48c06b..b7f88aed47cf5894331a9aa9dc2a33cb6b1870c4 100644
--- a/client/tests/kvm/tests/jumbo.py
+++ b/client/tests/kvm/tests/jumbo.py
@@ -3,6 +3,7 @@ from autotest_lib.client.common_lib import error
from autotest_lib.client.bin import utils
import kvm_test_utils, kvm_utils
+
def run_jumbo(test, params, env):
"""
Test the RX jumbo frame function of vnics:
@@ -22,9 +23,9 @@ def run_jumbo(test, params, env):
@param params: Dictionary with the test parameters.
@param env: Dictionary with test environment.
"""
-
- vm = kvm_test_utils.get_living_vm(env, params.get("main_vm"))
- session = kvm_test_utils.wait_for_login(vm)
+ vm = env.get_vm(params["main_vm"])
+ vm.verify_alive()
+ session = vm.wait_for_login(timeout=int(params.get("login_timeout", 360)))
mtu = params.get("mtu", "1500")
flood_time = params.get("flood_time", "300")
max_icmp_pkt_size = int(mtu) - 28
@@ -40,11 +41,7 @@ def run_jumbo(test, params, env):
logging.info("Changing the MTU of guest ...")
guest_mtu_cmd = "ifconfig %s mtu %s" % (ethname , mtu)
- s, o = session.get_command_status_output(guest_mtu_cmd)
- if s != 0:
- logging.error(o)
- raise error.TestError("Fail to set the MTU of guest NIC: %s" %
- ethname)
+ session.cmd(guest_mtu_cmd)
logging.info("Chaning the MTU of host tap ...")
host_mtu_cmd = "ifconfig %s mtu %s" % (ifname, mtu)
@@ -92,7 +89,7 @@ def run_jumbo(test, params, env):
def size_increase_ping(step=random.randrange(90, 110)):
logging.info("Size increase ping")
for size in range(0, max_icmp_pkt_size + 1, step):
- logging.info("Ping %s with size %s" % (ip, size))
+ logging.info("Ping %s with size %s", ip, size)
s, o = kvm_test_utils.ping(ip, 1, interface=ifname,
packetsize=size,
hint="do", timeout=1)

Powered by Google App Engine
This is Rietveld 408576698