From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Goldish Subject: Re: [PATCH 8/9] KVM test: Create the background threads before calling process() Date: Wed, 28 Apr 2010 14:55:23 +0300 Message-ID: <4BD8222B.90404@redhat.com> References: <20100426095656.26268.50549.stgit@localhost.localdomain> <20100426100426.26268.93216.stgit@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: autotest@test.kernel.org, kvm@vger.kernel.org To: Jason Wang Return-path: In-Reply-To: <20100426100426.26268.93216.stgit@localhost.localdomain> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autotest-bounces@test.kernel.org Errors-To: autotest-bounces@test.kernel.org List-Id: kvm.vger.kernel.org On 04/26/2010 01:04 PM, Jason Wang wrote: > If the screendump and scrialdump threads are created after the > process(), we may lose the progress tracking of guest shutting > down. So this patch creates them before calling process() in preprocess. > > Signed-off-by: Jason Wang > --- > client/tests/kvm/kvm_preprocessing.py | 5 ++--- > 1 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py > index 50d0e35..73e835a 100644 > --- a/client/tests/kvm/kvm_preprocessing.py > +++ b/client/tests/kvm/kvm_preprocessing.py > @@ -257,9 +257,6 @@ def preprocess(test, params, env): > int(params.get("pre_command_timeout", "600")), > params.get("pre_command_noncritical") == "yes") > > - # Preprocess all VMs and images > - process(test, params, env, preprocess_image, preprocess_vm) > - > # Start the screendump thread > if params.get("take_regular_screendumps") == "yes": > logging.debug("Starting screendump thread") > @@ -278,6 +275,8 @@ def preprocess(test, params, env): > args=(test, params, env)) > _serialdump_thread.start() > > + # Preprocess all VMs and images > + process(test, params, env, preprocess_image, preprocess_vm) > > > def postprocess(test, params, env): The initial shutdown procedure is carried out automatically by the preprocessor in order to prepare the VMs for the current test, and is not part of the test. During the procedure VMs from a previous test are shut down and/or restarted. I think it'll be confusing (or at least irrelevant) for the user to see a Fedora guest shutting down at the beginning of a Windows test. Also, it will be inconsistent with the pre_*.ppm screendumps which are taken after the new VMs are started.