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

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

Issue 6883246: Merge autotest upstream from @5318 ~ @5336 (Closed) Base URL: ssh://gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 8 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
« no previous file with comments | « client/tests/kvm/tests/qmp_basic_rhel6.py ('k') | client/tests/kvm/tests/stepmaker.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/tests/kvm/tests/set_link.py
diff --git a/client/tests/kvm/tests/set_link.py b/client/tests/kvm/tests/set_link.py
index a4a78ea29ea9f3a9eafe19f814ea2bb0fe7c1b02..94ca30aa9921bd051b7b3ec2ded47b7913cea589 100644
--- a/client/tests/kvm/tests/set_link.py
+++ b/client/tests/kvm/tests/set_link.py
@@ -1,7 +1,7 @@
import logging
from autotest_lib.client.common_lib import error
from autotest_lib.client.tests.kvm.tests import file_transfer
-import kvm_test_utils
+from autotest_lib.client.virt import virt_test_utils
def run_set_link(test, params, env):
@@ -17,9 +17,9 @@ def run_set_link(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"))
+ vm = virt_test_utils.get_living_vm(env, params.get("main_vm"))
timeout = float(params.get("login_timeout", 360))
- session = kvm_test_utils.wait_for_login(vm, 0, timeout, 0, 2)
+ session = virt_test_utils.wait_for_login(vm, 0, timeout, 0, 2)
def set_link_test(linkid):
"""
@@ -30,16 +30,16 @@ def run_set_link(test, params, env):
ip = vm.get_address(0)
vm.monitor.cmd("set_link %s down" % linkid)
- s, o = kvm_test_utils.ping(ip, count=10, timeout=20)
- if kvm_test_utils.get_loss_ratio(o) != 100:
+ s, o = virt_test_utils.ping(ip, count=10, timeout=20)
+ if virt_test_utils.get_loss_ratio(o) != 100:
raise error.TestFail("Still can ping the %s after down %s" %
(ip, linkid))
vm.monitor.cmd("set_link %s up" % linkid)
- s, o = kvm_test_utils.ping(ip, count=10, timeout=20)
+ s, o = virt_test_utils.ping(ip, count=10, timeout=20)
# we use 100% here as the notification of link status changed may be
# delayed in guest driver
- if kvm_test_utils.get_loss_ratio(o) == 100:
+ if virt_test_utils.get_loss_ratio(o) == 100:
raise error.TestFail("Packet loss during ping %s after up %s" %
(ip, linkid))
« no previous file with comments | « client/tests/kvm/tests/qmp_basic_rhel6.py ('k') | client/tests/kvm/tests/stepmaker.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698