From patchwork Tue Mar 23 19:10:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 87746 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2NJBLp6032583 for ; Tue, 23 Mar 2010 19:11:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752899Ab0CWTLS (ORCPT ); Tue, 23 Mar 2010 15:11:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48766 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754008Ab0CWTLP (ORCPT ); Tue, 23 Mar 2010 15:11:15 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2NJBEUo020822 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 23 Mar 2010 15:11:14 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2NJBE0O012327; Tue, 23 Mar 2010 15:11:14 -0400 Received: from localhost.localdomain (dhcp-1-188.tlv.redhat.com [10.35.1.188]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o2NJB3OH015534; Tue, 23 Mar 2010 15:11:12 -0400 From: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish Subject: [KVM-AUTOTEST PATCH 4/5] KVM test: stress_boot: make boot timeout controllable Date: Tue, 23 Mar 2010 21:10:00 +0200 Message-Id: <1269371401-9341-4-git-send-email-mgoldish@redhat.com> In-Reply-To: <1269371401-9341-3-git-send-email-mgoldish@redhat.com> References: <1269371401-9341-1-git-send-email-mgoldish@redhat.com> <1269371401-9341-2-git-send-email-mgoldish@redhat.com> <1269371401-9341-3-git-send-email-mgoldish@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 23 Mar 2010 19:11:22 +0000 (UTC) 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