From patchwork Wed Feb 29 14:02:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 143732 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6C83DB6F9F for ; Thu, 1 Mar 2012 00:59:16 +1100 (EST) Received: from localhost ([::1]:39699 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2k3m-0003xe-82 for incoming@patchwork.ozlabs.org; Wed, 29 Feb 2012 08:59:14 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2k3X-0003xP-68 for qemu-devel@nongnu.org; Wed, 29 Feb 2012 08:59:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2k3P-0004J1-HN for qemu-devel@nongnu.org; Wed, 29 Feb 2012 08:58:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38958) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2k3P-0004Il-9E for qemu-devel@nongnu.org; Wed, 29 Feb 2012 08:58:51 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1TDwndi014288 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 29 Feb 2012 08:58:49 -0500 Received: from dhcp-5-188.str.redhat.com (dhcp-5-175.str.redhat.com [10.32.5.175]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q1TDwmdS014147; Wed, 29 Feb 2012 08:58:48 -0500 From: Kevin Wolf To: qemu-devel@nongnu.org Date: Wed, 29 Feb 2012 15:02:20 +0100 Message-Id: <1330524140-15098-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com Subject: [Qemu-devel] [PATCH] qemu-iotests: 026: Reduce output changes for cache=none qcow2 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org qemu-iotests supports the -nocache option which makes the tests run with cache=none. For blkdebug tests with qcow2 this means that we may see test results that differ from cache=writethrough. This patch makes the diff a bit smaller and therefore easier to review. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/026 | 6 ++++++ tests/qemu-iotests/check | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/026 b/tests/qemu-iotests/026 index 33e7da6..1602ccd 100755 --- a/tests/qemu-iotests/026 +++ b/tests/qemu-iotests/026 @@ -87,6 +87,12 @@ _make_test_img 1G echo echo "Event: $event; errno: $errno; imm: $imm; once: $once; write $vmstate" + +# We want to catch a simple L2 update, not the allocation of the first L2 table +if [ "$event" == "l2_update" ]; then + $QEMU_IO -c "write $vmstate 0 512" $TEST_IMG > /dev/null 2>&1 +fi + $QEMU_IO -c "write $vmstate 0 128k " $BLKDBG_TEST_IMG | _filter_qemu_io # l2_load is not called on allocation, so issue a second write diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index 8499a04..aae1378 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -243,7 +243,7 @@ do echo " - no qualified output" err=true else - if diff $seq.out $tmp.out >/dev/null 2>&1 + if diff -w $seq.out $tmp.out >/dev/null 2>&1 then echo "" if $err @@ -255,7 +255,7 @@ do else echo " - output mismatch (see $seq.out.bad)" mv $tmp.out $seq.out.bad - $diff $seq.out $seq.out.bad + $diff -w $seq.out $seq.out.bad err=true fi fi