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

Unified Diff: client/tests/kvm/tests/linux_s3.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/ksm_overcommit.py ('k') | client/tests/kvm/tests/mac_change.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/tests/kvm/tests/linux_s3.py
diff --git a/client/tests/kvm/tests/linux_s3.py b/client/tests/kvm/tests/linux_s3.py
index 8a0f5ebd1ea970d9e4f69e76ebf857a6f3ea2a50..4a782b82fb225cf5ae3a575fdc7b0b186d3707bd 100644
--- a/client/tests/kvm/tests/linux_s3.py
+++ b/client/tests/kvm/tests/linux_s3.py
@@ -16,12 +16,16 @@ def run_linux_s3(test, params, env):
session = kvm_test_utils.wait_for_login(vm, timeout=timeout)
logging.info("Checking that VM supports S3")
- session.cmd("grep -q mem /sys/power/state")
+ status = session.get_command_status("grep -q mem /sys/power/state")
+ if status == None:
+ logging.error("Failed to check if S3 exists")
+ elif status != 0:
+ raise error.TestFail("Guest does not support S3")
logging.info("Waiting for a while for X to start")
time.sleep(10)
- src_tty = session.cmd_output("fgconsole").strip()
+ src_tty = session.get_command_output("fgconsole").strip()
logging.info("Current virtual terminal is %s" % src_tty)
if src_tty not in map(str, range(1,10)):
raise error.TestFail("Got a strange current vt (%s)" % src_tty)
@@ -34,7 +38,9 @@ def run_linux_s3(test, params, env):
command = "chvt %s && echo mem > /sys/power/state && chvt %s" % (dst_tty,
src_tty)
suspend_timeout = 120 + int(params.get("smp")) * 60
- session.cmd(command, timeout=suspend_timeout)
+ status = session.get_command_status(command, timeout=suspend_timeout)
+ if status != 0:
+ raise error.TestFail("Suspend to mem failed")
logging.info("VM resumed after S3")
« no previous file with comments | « client/tests/kvm/tests/ksm_overcommit.py ('k') | client/tests/kvm/tests/mac_change.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698