All of lore.kernel.org
 help / color / mirror / Atom feed
* [KVM-AUTOTEST PATCH 1/5] KVM test: remote_login(): if rss.exe says "Please wait", wait
@ 2010-03-23 19:09 Michael Goldish
  2010-03-23 19:09 ` [KVM-AUTOTEST PATCH 2/5] KVM test: tests_base.cfg.sample: add /f option to all Windows shutdown commands Michael Goldish
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Goldish @ 2010-03-23 19:09 UTC (permalink / raw)
  To: autotest, kvm

Recognize rss.exe's "Please wait" message and give the login procedure more
time to complete.  The message is sent before spawning cmd.exe, which may take
some time under heavy load.

Signed-off-by: Michael Goldish <mgoldish@redhat.com>
---
 client/tests/kvm/kvm_utils.py |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py
index 5834539..8531c79 100644
--- a/client/tests/kvm/kvm_utils.py
+++ b/client/tests/kvm/kvm_utils.py
@@ -482,7 +482,8 @@ def remote_login(command, password, prompt, linesep="\n", timeout=10):
     while True:
         (match, text) = sub.read_until_last_line_matches(
                 [r"[Aa]re you sure", r"[Pp]assword:\s*$", r"^\s*[Ll]ogin:\s*$",
-                 r"[Cc]onnection.*closed", r"[Cc]onnection.*refused", prompt],
+                 r"[Cc]onnection.*closed", r"[Cc]onnection.*refused",
+                 r"[Pp]lease wait", prompt],
                  timeout=timeout, internal_timeout=0.5)
         if match == 0:  # "Are you sure you want to continue connecting"
             logging.debug("Got 'Are you sure...'; sending 'yes'")
@@ -510,7 +511,11 @@ def remote_login(command, password, prompt, linesep="\n", timeout=10):
             logging.debug("Got 'Connection refused'")
             sub.close()
             return None
-        elif match == 5:  # prompt
+        elif match == 5:  # "Please wait"
+            logging.debug("Got 'Please wait'")
+            timeout = 30
+            continue
+        elif match == 6:  # prompt
             logging.debug("Got shell prompt -- logged in")
             return sub
         else:  # match == None
-- 
1.5.4.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-23 19:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-23 19:09 [KVM-AUTOTEST PATCH 1/5] KVM test: remote_login(): if rss.exe says "Please wait", wait Michael Goldish
2010-03-23 19:09 ` [KVM-AUTOTEST PATCH 2/5] KVM test: tests_base.cfg.sample: add /f option to all Windows shutdown commands Michael Goldish
2010-03-23 19:09   ` [KVM-AUTOTEST PATCH 3/5] KVM test: timedrift: first open ssh/rss sessions with the guest, then start load Michael Goldish
2010-03-23 19:10     ` [KVM-AUTOTEST PATCH 4/5] KVM test: stress_boot: make boot timeout controllable Michael Goldish
2010-03-23 19:10       ` [KVM-AUTOTEST PATCH 5/5] KVM test: abort-on-error mode Michael Goldish

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.