From patchwork Wed Sep 9 18:12:07 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 46435 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 n89IFnHp019187 for ; Wed, 9 Sep 2009 18:15:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753984AbZIISPo (ORCPT ); Wed, 9 Sep 2009 14:15:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753974AbZIISPn (ORCPT ); Wed, 9 Sep 2009 14:15:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42579 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753975AbZIISPl (ORCPT ); Wed, 9 Sep 2009 14:15:41 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n89IFiWp014969; Wed, 9 Sep 2009 14:15:44 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n89IFhba004968; Wed, 9 Sep 2009 14:15:43 -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 n89IFNFZ012008; Wed, 9 Sep 2009 14:15:42 -0400 From: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish Subject: [PATCH 14/19] KVM test: kvm_preprocessing.py: don't explicitly print failure messages Date: Wed, 9 Sep 2009 21:12:07 +0300 Message-Id: <1252519932-30733-14-git-send-email-mgoldish@redhat.com> In-Reply-To: <1252519932-30733-13-git-send-email-mgoldish@redhat.com> References: <1252519932-30733-1-git-send-email-mgoldish@redhat.com> <1252519932-30733-2-git-send-email-mgoldish@redhat.com> <1252519932-30733-3-git-send-email-mgoldish@redhat.com> <1252519932-30733-4-git-send-email-mgoldish@redhat.com> <1252519932-30733-5-git-send-email-mgoldish@redhat.com> <1252519932-30733-6-git-send-email-mgoldish@redhat.com> <1252519932-30733-7-git-send-email-mgoldish@redhat.com> <1252519932-30733-8-git-send-email-mgoldish@redhat.com> <1252519932-30733-9-git-send-email-mgoldish@redhat.com> <1252519932-30733-10-git-send-email-mgoldish@redhat.com> <1252519932-30733-11-git-send-email-mgoldish@redhat.com> <1252519932-30733-12-git-send-email-mgoldish@redhat.com> <1252519932-30733-13-git-send-email-mgoldish@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org This is taken care of elsewhere, so currently when something fails during pre/post-processing, messages get logged twice. Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_preprocessing.py | 14 ++++---------- 1 files changed, 4 insertions(+), 10 deletions(-) diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py index 8fa74cf..729e1d4 100644 --- a/client/tests/kvm/kvm_preprocessing.py +++ b/client/tests/kvm/kvm_preprocessing.py @@ -31,11 +31,8 @@ def preprocess_image(test, params): logging.debug("Creating image...") create_image = True - if create_image: - if not kvm_vm.create_image(params, test.bindir): - message = "Could not create image" - logging.error(message) - raise error.TestError(message) + if create_image and not kvm_vm.create_image(params, test.bindir): + raise error.TestError("Could not create image") def preprocess_vm(test, params, env, name): @@ -78,11 +75,8 @@ def preprocess_vm(test, params, env, name): "restarting it...") start_vm = True - if start_vm: - if not vm.create(name, params, test.bindir, for_migration): - message = "Could not start VM" - logging.error(message) - raise error.TestError(message) + if start_vm and not vm.create(name, params, test.bindir, for_migration): + raise error.TestError("Could not start VM") scrdump_filename = os.path.join(test.debugdir, "pre_%s.ppm" % name) vm.send_monitor_cmd("screendump %s" % scrdump_filename)