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

Unified Diff: client/tests/kvm/tests/migration.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/mac_change.py ('k') | client/tests/kvm/tests/migration_multi_host.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/tests/kvm/tests/migration.py
diff --git a/client/tests/kvm/tests/migration.py b/client/tests/kvm/tests/migration.py
index 1c9f178ee6961be210b8f0a4a528ce22afa2e265..d6f4b11459632b4ffc5d3031b9617e0b62eadd2b 100644
--- a/client/tests/kvm/tests/migration.py
+++ b/client/tests/kvm/tests/migration.py
@@ -26,12 +26,10 @@ def run_migration(test, params, env):
mig_timeout = float(params.get("mig_timeout", "3600"))
mig_protocol = params.get("migration_protocol", "tcp")
mig_cancel = bool(params.get("mig_cancel"))
- offline = params.get("offline", "no") == "yes"
- check = params.get("vmstate_check", "no") == "yes"
# Get the output of migration_test_command
test_command = params.get("migration_test_command")
- reference_output = session.cmd_output(test_command)
+ reference_output = session.get_command_output(test_command)
# Start some process in the background (and leave the session open)
background_command = params.get("migration_bg_command", "")
@@ -44,12 +42,14 @@ def run_migration(test, params, env):
try:
check_command = params.get("migration_bg_check_command", "")
- session2.cmd(check_command, timeout=30)
+ if session2.get_command_status(check_command, timeout=30) != 0:
+ raise error.TestError("Could not start background process '%s'" %
+ background_command)
session2.close()
# Migrate the VM
dest_vm = kvm_test_utils.migrate(vm, env,mig_timeout, mig_protocol,
- mig_cancel, offline, check)
+ mig_cancel)
# Log into the guest again
logging.info("Logging into guest after migration...")
@@ -59,10 +59,12 @@ def run_migration(test, params, env):
logging.info("Logged in after migration")
# Make sure the background process is still running
- session2.cmd(check_command, timeout=30)
+ if session2.get_command_status(check_command, timeout=30) != 0:
+ raise error.TestFail("Could not find running background process "
+ "after migration: '%s'" % background_command)
# Get the output of migration_test_command
- output = session2.cmd_output(test_command)
+ output = session2.get_command_output(test_command)
# Compare output to reference output
if output != reference_output:
@@ -79,7 +81,8 @@ def run_migration(test, params, env):
finally:
# Kill the background process
if session2 and session2.is_alive():
- session2.cmd_output(params.get("migration_bg_kill_command", ""))
+ session2.get_command_output(params.get("migration_bg_kill_command",
+ ""))
session2.close()
session.close()
« no previous file with comments | « client/tests/kvm/tests/mac_change.py ('k') | client/tests/kvm/tests/migration_multi_host.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698