All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Goldish <mgoldish@redhat.com>
To: autotest@test.kernel.org, kvm@vger.kernel.org
Subject: [KVM-AUTOTEST PATCH 4/5] KVM test: stress_boot: make boot timeout controllable
Date: Tue, 23 Mar 2010 21:10:00 +0200	[thread overview]
Message-ID: <1269371401-9341-4-git-send-email-mgoldish@redhat.com> (raw)
In-Reply-To: <1269371401-9341-3-git-send-email-mgoldish@redhat.com>

Use parameter 'boot_timeout'.  Defaults to 240.

Signed-off-by: Michael Goldish <mgoldish@redhat.com>
---
 client/tests/kvm/tests/stress_boot.py  |    9 +++++----
 client/tests/kvm/tests_base.cfg.sample |    1 +
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/client/tests/kvm/tests/stress_boot.py b/client/tests/kvm/tests/stress_boot.py
index 0b5ec02..24a005c 100644
--- a/client/tests/kvm/tests/stress_boot.py
+++ b/client/tests/kvm/tests/stress_boot.py
@@ -21,7 +21,8 @@ def run_stress_boot(tests, params, env):
 
     logging.info("Waiting for first guest to be up...")
 
-    session = kvm_utils.wait_for(vm.remote_login, 240, 0, 2)
+    boot_timeout = float(params.get("boot_timeout", 240))
+    session = kvm_utils.wait_for(vm.remote_login, boot_timeout, 0, 2)
     if not session:
         raise error.TestFail("Could not log into first guest")
 
@@ -32,9 +33,8 @@ def run_stress_boot(tests, params, env):
     # boot the VMs
     while num <= int(params.get("max_vms")):
         try:
-            vm_name = "vm" + str(num)
-
             # clone vm according to the first one
+            vm_name = "vm" + str(num)
             vm_params = vm.get_params().copy()
             vm_params["address_index"] = str(address_index)
             curr_vm = vm.clone(vm_name, vm_params)
@@ -43,7 +43,8 @@ def run_stress_boot(tests, params, env):
             kvm_preprocessing.preprocess_vm(tests, vm_params, env, vm_name)
             params['vms'] += " " + vm_name
 
-            curr_vm_session = kvm_utils.wait_for(curr_vm.remote_login, 240, 0, 2)
+            curr_vm_session = kvm_utils.wait_for(curr_vm.remote_login,
+                                                 boot_timeout, 0, 2)
             if not curr_vm_session:
                 raise error.TestFail("Could not log into guest #%d" % num)
 
diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample
index bacbcee..249f1b4 100644
--- a/client/tests/kvm/tests_base.cfg.sample
+++ b/client/tests/kvm/tests_base.cfg.sample
@@ -179,6 +179,7 @@ variants:
         max_vms = 5    
         alive_test_cmd = uname -a
         clone_address_index_base = 10
+        boot_timeout = 240
         kill_vm = yes
         kill_vm_vm1 = no
         kill_vm_gracefully = no
-- 
1.5.4.1

  reply	other threads:[~2010-03-23 19:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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     ` Michael Goldish [this message]
2010-03-23 19:10       ` [KVM-AUTOTEST PATCH 5/5] KVM test: abort-on-error mode Michael Goldish

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1269371401-9341-4-git-send-email-mgoldish@redhat.com \
    --to=mgoldish@redhat.com \
    --cc=autotest@test.kernel.org \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.