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

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

Issue 6124004: Revert "Merge remote branch 'cros/upstream' into autotest-rebase" (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: 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
« no previous file with comments | « client/tests/kvm/tests/qemu_img.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
deleted file mode 100644
index e88a1ef4c1f4e0311d44b33ca19ea13684d388cc..0000000000000000000000000000000000000000
--- a/client/tests/kvm/tests/set_link.py
+++ /dev/null
@@ -1,60 +0,0 @@
-import logging
-from autotest_lib.client.common_lib import error
-from tests import file_transfer
-import kvm_test_utils
-
-
-def run_set_link(test, params, env):
- """
- KVM guest link test:
- 1) Boot up guest with one nic
- 2) Ping guest from host
- 3) Disable guest link and ping guest from host
- 4) Re-enable guest link and ping guest from host
- 5) Do file transfer test
-
- @param test: kvm test object
- @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"))
- timeout = float(params.get("login_timeout", 360))
- session = kvm_test_utils.wait_for_login(vm, 0, timeout, 0, 2)
-
- ip = vm.get_address(0)
- linkname = vm.netdev_id[0]
-
- logging.info("Pinging guest from host")
- s, o = kvm_test_utils.ping(ip, count=10, timeout=20)
- if s != 0:
- raise error.TestFail("Ping failed, status: %s, output: %s" % (s, o))
- ratio = kvm_test_utils.get_loss_ratio(o)
- if ratio != 0:
- raise error.TestFail("Loss ratio is %s, output: %s" % (ratio, o))
-
- logging.info("Executing 'set link %s off'" % linkname)
- vm.monitor.cmd("set_link %s off" % linkname)
- logging.info(vm.monitor.info("network"))
- logging.info("Pinging guest from host")
- s, o = kvm_test_utils.ping(ip, count=10, timeout=20)
- if s == 0:
- raise error.TestFail("Ping unexpectedly succeeded, status: %s,"
- "output: %s" % (s, o))
- ratio = kvm_test_utils.get_loss_ratio(o)
- if ratio != 100:
- raise error.TestFail("Loss ratio is not 100%%,"
- "Loss ratio is %s" % ratio)
-
- logging.info("Executing 'set link %s on'" % linkname)
- vm.monitor.cmd("set_link %s on" % linkname)
- logging.info(vm.monitor.info("network"))
- logging.info("Pinging guest from host")
- s, o = kvm_test_utils.ping(ip, count=10, timeout=20)
- if s != 0:
- raise error.TestFail("Ping failed, status: %s, output: %s" % (s, o))
- ratio = kvm_test_utils.get_loss_ratio(o)
- if ratio != 0:
- raise error.TestFail("Loss ratio is %s, output: %s" % (ratio, o))
-
- file_transfer.run_file_transfer(test, params, env)
- session.close()
« no previous file with comments | « client/tests/kvm/tests/qemu_img.py ('k') | client/tests/kvm/tests/stepmaker.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698