From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Goldish Subject: Re: [AUTOTEST] print login command and change some timeout values Date: Fri, 24 Jul 2009 08:24:03 -0400 (EDT) Message-ID: <1931580588.954131248438243416.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> References: <181931540.953991248437806958.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: kvm-devel , Lucas Meneghel Rodrigues , Autotest mailing list To: sudhir kumar Return-path: Received: from mx1.redhat.com ([66.187.233.31]:34103 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752625AbZGXMYH (ORCPT ); Fri, 24 Jul 2009 08:24:07 -0400 In-Reply-To: <181931540.953991248437806958.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: ----- "sudhir kumar" wrote: > This patch does two small things. > 1. Prints the guest login command to debug messages. Why do we want to do that? > 2. Changes the guest login timeout to 240 seconds. I see the timeout > for > *.wait_for() functions in boot test is 240 seconds, while in reboot is > 120 > seconds which causes the test to fail. We might have missed it by > mistake. > 240 seconds is a reasonable timeout duration. This patch fixes that. Using the same timeout value everywhere makes sense, but it surprises me that tests are failing because 120 isn't enough. It sounds like the host has to be heavily loaded for the boot to take longer than 2 minutes. But if it happened to you then let's increase the timeout. > Signed-off-by: Sudhir Kumar > > Index: autotest/client/tests/kvm/kvm_utils.py > =================================================================== > --- autotest.orig/client/tests/kvm/kvm_utils.py > +++ autotest/client/tests/kvm/kvm_utils.py > @@ -637,6 +637,7 @@ def remote_login(command, password, prom > password_prompt_count = 0 > > logging.debug("Trying to login...") > + logging.debug("Guest login Command: %s" % command) > > while True: > (match, text) = sub.read_until_last_line_matches( > Index: autotest/client/tests/kvm/kvm_tests.py > =================================================================== > --- autotest.orig/client/tests/kvm/kvm_tests.py > +++ autotest/client/tests/kvm/kvm_tests.py > @@ -48,7 +48,7 @@ def run_boot(test, params, env): > > logging.info("Guest is down; waiting for it to go up > again...") > > - session = kvm_utils.wait_for(vm.ssh_login, 120, 0, 2) > + session = kvm_utils.wait_for(vm.ssh_login, 240, 0, 2) > if not session: > raise error.TestFail("Could not log into guest after > reboot") > > @@ -88,7 +88,7 @@ def run_shutdown(test, params, env): > > logging.info("Shutdown command sent; waiting for guest to go > down...") > > - if not kvm_utils.wait_for(vm.is_dead, 120, 0, 1): > + if not kvm_utils.wait_for(vm.is_dead, 240, 0, 1): > raise error.TestFail("Guest refuses to go down") > > logging.info("Guest is down") > @@ -445,7 +445,7 @@ def run_yum_update(test, params, env): > > logging.info("Logging into guest...") > > - session = kvm_utils.wait_for(vm.ssh_login, 120, 0, 2) > + session = kvm_utils.wait_for(vm.ssh_login, 240, 0, 2) > if not session: > message = "Could not log into guest" > logging.error(message) > > > > -- > Sudhir Kumar