From patchwork Wed Oct 7 17:54:22 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 52324 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n97I5tBH015201 for ; Wed, 7 Oct 2009 18:05:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759799AbZJGR63 (ORCPT ); Wed, 7 Oct 2009 13:58:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759794AbZJGR63 (ORCPT ); Wed, 7 Oct 2009 13:58:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16455 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759766AbZJGR6S (ORCPT ); Wed, 7 Oct 2009 13:58:18 -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 n97Hvq0l002016; Wed, 7 Oct 2009 13:57:52 -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 n97Hvp7K024778; Wed, 7 Oct 2009 13:57:52 -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 n97Hve8A014834; Wed, 7 Oct 2009 13:57:50 -0400 From: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish Subject: [KVM-AUTOTEST PATCH 7/7] KVM test: kvm_preprocessing.py: fix indentation and logging messages in postprocess_vm Date: Wed, 7 Oct 2009 19:54:22 +0200 Message-Id: <1254938062-15286-7-git-send-email-mgoldish@redhat.com> In-Reply-To: <1254938062-15286-6-git-send-email-mgoldish@redhat.com> References: <1254938062-15286-1-git-send-email-mgoldish@redhat.com> <1254938062-15286-2-git-send-email-mgoldish@redhat.com> <1254938062-15286-3-git-send-email-mgoldish@redhat.com> <1254938062-15286-4-git-send-email-mgoldish@redhat.com> <1254938062-15286-5-git-send-email-mgoldish@redhat.com> <1254938062-15286-6-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 diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py index e624a42..5bae2bd 100644 --- a/client/tests/kvm/kvm_preprocessing.py +++ b/client/tests/kvm/kvm_preprocessing.py @@ -116,9 +116,12 @@ def postprocess_vm(test, params, env, name): vm.send_monitor_cmd("screendump %s" % scrdump_filename) if params.get("kill_vm") == "yes": - if not kvm_utils.wait_for(vm.is_dead, - float(params.get("kill_vm_timeout", 0)), 0.0, 1.0, - "Waiting for VM to kill itself..."): + kill_vm_timeout = float(params.get("kill_vm_timeout", 0)) + if kill_vm_timeout: + logging.debug("'kill_vm' specified; waiting for VM to shut down " + "before killing it...") + kvm_utils.wait_for(vm.is_dead, kill_vm_timeout, 0, 1) + else: logging.debug("'kill_vm' specified; killing VM...") vm.destroy(gracefully = params.get("kill_vm_gracefully") == "yes")