From patchwork Sun Aug 9 16:51:29 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 40277 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 n79Gn5Ra002795 for ; Sun, 9 Aug 2009 16:49:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752123AbZHIQtA (ORCPT ); Sun, 9 Aug 2009 12:49:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752103AbZHIQtA (ORCPT ); Sun, 9 Aug 2009 12:49:00 -0400 Received: from mx2.redhat.com ([66.187.237.31]:45718 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751957AbZHIQs6 (ORCPT ); Sun, 9 Aug 2009 12:48:58 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n79Gmw9S025825; Sun, 9 Aug 2009 12:48:58 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n79GmwRe000508; Sun, 9 Aug 2009 12:48:58 -0400 Received: from localhost.localdomain (dhcp-1-31.tlv.redhat.com [10.35.1.31]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n79GmoCM022741; Sun, 9 Aug 2009 12:48:56 -0400 From: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish Subject: [KVM-AUTOTEST PATCH 4/7] KVM test: step file tests: do not fail when receiving an invalid screendump Date: Sun, 9 Aug 2009 19:51:29 +0300 Message-Id: <348018b0e8c76a25b2f35829b1f376f77fd8d269.1249835925.git.mgoldish@redhat.com> In-Reply-To: <0cd078eb6e8fc3331afd332b8551a1d981fa183f.1249835925.git.mgoldish@redhat.com> References: <1249836692-18292-1-git-send-email-mgoldish@redhat.com> <8ba0c835ecadb68d1f444e7cbb32a01d9c6dca3c.1249835925.git.mgoldish@redhat.com> <0cd078eb6e8fc3331afd332b8551a1d981fa183f.1249835925.git.mgoldish@redhat.com> In-Reply-To: References: X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Warn, instead of failing, when receiving an invalid PPM screendump. Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_guest_wizard.py | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/client/tests/kvm/kvm_guest_wizard.py b/client/tests/kvm/kvm_guest_wizard.py index 732e427..4efb0e9 100644 --- a/client/tests/kvm/kvm_guest_wizard.py +++ b/client/tests/kvm/kvm_guest_wizard.py @@ -88,14 +88,15 @@ def barrier_2(vm, words, params, debug_dir, data_scrdump_filename, logging.error("Could not fetch screendump") continue - # Make sure image is valid - if not ppm_utils.image_verify_ppm_file(scrdump_filename): - failure_message = "got invalid screendump" - break - # Read image file (w, h, data) = ppm_utils.image_read_from_ppm_file(scrdump_filename) + # Make sure image is valid + if not ppm_utils.image_verify_ppm_file(scrdump_filename): + logging.warn("Got invalid screendump: dimensions: %dx%d, " + "data size: %d" % (w, h, len(data))) + continue + # Compute md5sum of whole image whole_image_md5sum = ppm_utils.image_md5sum(w, h, data)