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

Unified Diff: client/tests/kvm/tests/guest_s4.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/file_transfer.py ('k') | client/tests/kvm/tests/guest_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/tests/kvm/tests/guest_s4.py
diff --git a/client/tests/kvm/tests/guest_s4.py b/client/tests/kvm/tests/guest_s4.py
index 0280f71731a8a83733168351b30294b140dffc03..2eb035be30cae9e2b2fa2ce41f218766a656664c 100644
--- a/client/tests/kvm/tests/guest_s4.py
+++ b/client/tests/kvm/tests/guest_s4.py
@@ -16,7 +16,11 @@ def run_guest_s4(test, params, env):
session = kvm_test_utils.wait_for_login(vm, timeout=timeout)
logging.info("Checking whether guest OS supports suspend to disk (S4)...")
- session.cmd(params.get("check_s4_support_cmd"))
+ s, o = session.get_command_status_output(params.get("check_s4_support_cmd"))
+ if "not enough space" in o:
+ raise error.TestError("Check S4 support failed: %s" % o)
+ elif s != 0:
+ raise error.TestNAError("Guest OS does not support S4")
logging.info("Waiting until all guest OS services are fully started...")
time.sleep(float(params.get("services_up_timeout", 30)))
@@ -32,7 +36,9 @@ def run_guest_s4(test, params, env):
# Make sure the background program is running as expected
check_s4_cmd = params.get("check_s4_cmd")
- session2.cmd(check_s4_cmd)
+ if session2.get_command_status(check_s4_cmd) != 0:
+ raise error.TestError("Failed to launch '%s' as a background process" %
+ test_s4_cmd)
logging.info("Launched background command in guest: %s" % test_s4_cmd)
# Suspend to disk
@@ -62,9 +68,11 @@ def run_guest_s4(test, params, env):
# Check whether the test command is still alive
logging.info("Checking if background command is still alive...")
- session2.cmd(check_s4_cmd)
+ if session2.get_command_status(check_s4_cmd) != 0:
+ raise error.TestFail("Background command '%s' stopped running. S4 "
+ "failed." % test_s4_cmd)
logging.info("VM resumed successfuly after suspend to disk")
- session2.cmd_output(params.get("kill_test_s4_cmd"))
+ session2.get_command_output(params.get("kill_test_s4_cmd"))
session.close()
session2.close()
« no previous file with comments | « client/tests/kvm/tests/file_transfer.py ('k') | client/tests/kvm/tests/guest_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698