diff mbox

[Autotest,1/2] KVM-test: linux_s3 subtest: Tune up timeout for suspend command

Message ID 1262680316-32500-1-git-send-email-yzhou@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Yolkfull Chow Jan. 5, 2010, 8:31 a.m. UTC
None
diff mbox

Patch

diff --git a/client/tests/kvm/tests/linux_s3.py b/client/tests/kvm/tests/linux_s3.py
index 0292757..39f09e4 100644
--- a/client/tests/kvm/tests/linux_s3.py
+++ b/client/tests/kvm/tests/linux_s3.py
@@ -36,7 +36,8 @@  def run_linux_s3(test, params, env):
     logging.info("Putting VM into S3")
     command = "chvt %s && echo mem > /sys/power/state && chvt %s" % (dst_tty,
                                                                      src_tty)
-    status = session.get_command_status(command, timeout=120)
+    suspend_timeout = 120 + int(params.get("smp")) * 60
+    status = session.get_command_status(command, timeout=suspend_timeout)
     if status != 0:
         raise error.TestFail("Suspend to mem failed")