diff mbox

[Autotest,2/2] KVM-test: guest_s4 subtest: Tune up timeout value for `set_s4_cmd' command

Message ID 1262680316-32500-2-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/guest_s4.py b/client/tests/kvm/tests/guest_s4.py
index f08b9d2..82572f6 100644
--- a/client/tests/kvm/tests/guest_s4.py
+++ b/client/tests/kvm/tests/guest_s4.py
@@ -45,7 +45,8 @@  def run_guest_s4(test, params, env):
     session2.sendline(params.get("set_s4_cmd"))
 
     # Make sure the VM goes down
-    if not kvm_utils.wait_for(vm.is_dead, 240, 2, 2):
+    suspend_timeout = 240 + int(params.get("smp")) * 60
+    if not kvm_utils.wait_for(vm.is_dead, suspend_timeout, 2, 2):
         raise error.TestFail("VM refuses to go down. Suspend failed.")
     logging.info("VM suspended successfully. Sleeping for a while before "
                  "resuming it.")