As suggested by Jason, timeout value can be various if different
guest CPU number specified. This patch fixs the problem.

Signed-off-by: Yolkfull Chow <yz...@redhat.com>
---
 client/tests/kvm/tests/linux_s3.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

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")
 
-- 
1.6.6

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to