Skip to contentSkip to conversation

KVM test: guest_s4 subtest - Expose timeout on config

PATCH In review Lucas Meneghel Rodrigues 2 participants 2 messages May 6, 2010 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM test: guest_s4 subtest - Expose timeout on config

After the test guest_s4 hibernates the VM, we try to loging on it. Let's make the login timeout configurable on the configuration file, since different systems might need more time to recover. Also, increasing the default timeout from 120s to 240s.

---
 client/tests/kvm/tests/guest_s4.py     |    5 +++--
 client/tests/kvm/tests_base.cfg.sample |    1 +
 2 files changed, 4 insertions(+), 2 deletions(-)
client/tests/kvm/tests/guest_s4.py +3 -2
index a289148..88b2b7c 100644
@@ -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")
client/tests/kvm/tests_base.cfg.sample +1 -0
index ee83ac2..21ffa56 100644
@@ -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
Signature · 1 line
1.7.0.1
#1 lore raw
Quoted 7 lines · Lucas Meneghel Rodrigues

After the test guest_s4 hibernates the VM, we try to loging on it. Let's make the login timeout configurable on the configuration file, since different systems might need more time to recover. Also, increasing the default timeout from 120s to 240s.

Thanks Lucas. I will try to test my F13 system again with this patch where i was getting consistent failure for guest_s4.

Regards--
Subrata

Quoted 33 lines
---
 client/tests/kvm/tests/guest_s4.py     |    5 +++--
 client/tests/kvm/tests_base.cfg.sample |    1 +
 2 files changed, 4 insertions(+), 2 deletions(-)
client/tests/kvm/tests/guest_s4.py +3 -2
index a289148..88b2b7c 100644
@@ -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")
client/tests/kvm/tests_base.cfg.sample +1 -0
index ee83ac2..21ffa56 100644
@@ -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