From patchwork Wed Jun 8 11:23:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 99406 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 92E8BB6FB9 for ; Wed, 8 Jun 2011 21:31:56 +1000 (EST) Received: from localhost ([::1]:60592 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUGzJ-0002Rt-BU for incoming@patchwork.ozlabs.org; Wed, 08 Jun 2011 07:31:53 -0400 Received: from eggs.gnu.org ([140.186.70.92]:53574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUGoZ-0000kG-MO for qemu-devel@nongnu.org; Wed, 08 Jun 2011 07:20:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUGoX-0004N5-0e for qemu-devel@nongnu.org; Wed, 08 Jun 2011 07:20:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUGoW-0004Mk-Le for qemu-devel@nongnu.org; Wed, 08 Jun 2011 07:20:44 -0400 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 p58BKgU0031410 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 8 Jun 2011 07:20:42 -0400 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 p58BKeRA006724; Wed, 8 Jun 2011 07:20:41 -0400 From: Kevin Wolf To: hch@lst.de Date: Wed, 8 Jun 2011 13:23:33 +0200 Message-Id: <1307532213-6206-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, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH] [qemu-iotests] Update filter for default cluster size 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 Until recently, qemu-img create displayed cluster_size=0 for the default cluster size. It is changed to display the real cluster size now, which results in the cluster size not being filtered out any more. If the cluster size is specified explicitly in CLUSTER_SIZE, keep the output, and if using the default, filter it out. This mostly restores the old behaviour of the test cases; test 015 must be fixed to use CLUSTER_SIZE instead of using extra_img_options for it. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- 015 | 3 ++- common.rc | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/015 b/015 index bdafd26..44c134f 100755 --- a/015 +++ b/015 @@ -56,7 +56,8 @@ echo "creating image" # for the refcount table. On the other hand this is big enough to cause a # refcount table growth when rewriting the image after creating one snapshot. size=36M -_make_test_img -o cluster_size=1k $size +CLUSTER_SIZE=1k +_make_test_img $size # Create two snapshots which fill the image with two different patterns echo "creating first snapshot" diff --git a/common.rc b/common.rc index cdefafc..26811ca 100644 --- a/common.rc +++ b/common.rc @@ -58,9 +58,11 @@ _make_test_img() # extra qemu-img options can be added by tests # at least one argument (the image size) needs to be added local extra_img_options=$* + local cluster_size_filter="s# cluster_size=[0-9]\\+##g" if [ \( "$IMGFMT" = "qcow2" -o "$IMGFMT" = "qed" \) -a -n "$CLUSTER_SIZE" ]; then extra_img_options="-o cluster_size=$CLUSTER_SIZE $extra_img_options" + cluster_size_filter="" fi # XXX(hch): have global image options? @@ -69,7 +71,7 @@ _make_test_img() sed -e "s#$TEST_DIR#TEST_DIR#g" | \ sed -e "s#$IMGFMT#IMGFMT#g" | \ sed -e "s# encryption=off##g" | \ - sed -e "s# cluster_size=0##g" | \ + sed -e "$cluster_size_filter" | \ sed -e "s# table_size=0##g" | \ sed -e "s# compat6=off##g" | \ sed -e "s# static=off##g"