diff mbox

KVM test: guest_s4 subtest - Expose timeout on config

Message ID 1273122859-19797-1-git-send-email-lmr@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lucas Meneghel Rodrigues May 6, 2010, 5:14 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 a289148..88b2b7c 100644
--- a/client/tests/kvm/tests/guest_s4.py
+++ b/client/tests/kvm/tests/guest_s4.py
@@ -58,8 +58,9 @@  def run_guest_s4(test, params, env):
         raise error.TestError("Failed to start VM after suspend to disk")
 
     # Log into the resumed VM
-    logging.info("Logging into resumed VM...")
-    session2 = kvm_utils.wait_for(vm.remote_login, 120, 0, 2)
+    relogin_timeout = int(params.get("relogin_timeout", 240))
+    logging.info("Logging into resumed VM, timeout %s", relogin_timeout)
+    session2 = kvm_utils.wait_for(vm.remote_login, relogin_timeout, 0, 2)
     if not session2:
         raise error.TestFail("Could not log into VM after resuming from "
                              "suspend to disk")
diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample
index ee83ac2..21ffa56 100644
--- a/client/tests/kvm/tests_base.cfg.sample
+++ b/client/tests/kvm/tests_base.cfg.sample
@@ -227,6 +227,7 @@  variants:
         set_s4_cmd = echo disk > /sys/power/state
         kill_test_s4_cmd = pkill tcpdump
         services_up_timeout = 30
+        relogin_timeout = 240
 
     - nic_hotplug:  install setup unattended_install
         type = pci_hotplug