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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <yzhou@xxxxxxxxxx>
---
 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux