From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=38092 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PLHR6-0006JP-Lu for qemu-devel@nongnu.org; Wed, 24 Nov 2010 10:39:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PLHR3-0000tb-G7 for qemu-devel@nongnu.org; Wed, 24 Nov 2010 10:39:08 -0500 Received: from mtagate4.uk.ibm.com ([194.196.100.164]:56661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PLHR3-0000si-8L for qemu-devel@nongnu.org; Wed, 24 Nov 2010 10:39:05 -0500 Received: from d06nrmr1707.portsmouth.uk.ibm.com (d06nrmr1707.portsmouth.uk.ibm.com [9.149.39.225]) by mtagate4.uk.ibm.com (8.13.1/8.13.1) with ESMTP id oAOFd1Do007958 for ; Wed, 24 Nov 2010 15:39:01 GMT Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by d06nrmr1707.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id oAOFd16B2846794 for ; Wed, 24 Nov 2010 15:39:01 GMT Received: from d06av04.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id oAOFd0Jv004116 for ; Wed, 24 Nov 2010 08:39:01 -0700 From: Stefan Hajnoczi Date: Wed, 24 Nov 2010 15:38:46 +0000 Message-Id: <1290613126-26785-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH][qemu-iotests] filter IMGFMT correctly in 019 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Christoph Hellwig , Stefan Hajnoczi Test 019 can be run with qcow2 and qed image formats. Replace the specific image format value with "IMGFMT" so the golden output does not hardcode qcow2 or qed. This patch also includes a typo fix for "occurrences". Signed-off-by: Stefan Hajnoczi --- 019 | 2 +- 019.out | 4 ++-- common.filter | 8 +++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/019 b/019 index 4c82be2..a2d67c3 100755 --- a/019 +++ b/019 @@ -92,7 +92,7 @@ mv $TEST_IMG $TEST_IMG.orig for backing_option in "-B $TEST_IMG.base" "-o backing_file=$TEST_IMG.base"; do echo - echo Testing conversion with $backing_option | _filter_testdir + echo Testing conversion with $backing_option | _filter_testdir | _filter_imgfmt echo $QEMU_IMG convert -O $IMGFMT $backing_option $TEST_IMG.orig $TEST_IMG diff --git a/019.out b/019.out index d3913df..63bdd54 100644 --- a/019.out +++ b/019.out @@ -538,7 +538,7 @@ qemu-io> wrote 65536/65536 bytes at offset 4296146944 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) qemu-io> No errors were found on the image. -Testing conversion with -B TEST_DIR/t.qcow2.base +Testing conversion with -B TEST_DIR/t.IMGFMT.base Checking if backing clusters are allocated when they shouldn't @@ -1082,7 +1082,7 @@ qemu-io> read 65536/65536 bytes at offset 4296343552 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) qemu-io> No errors were found on the image. -Testing conversion with -o backing_file=TEST_DIR/t.qcow2.base +Testing conversion with -o backing_file=TEST_DIR/t.IMGFMT.base Checking if backing clusters are allocated when they shouldn't diff --git a/common.filter b/common.filter index da55f54..da77ede 100644 --- a/common.filter +++ b/common.filter @@ -128,12 +128,18 @@ _filter_date() -e 's/[A-Z][a-z][a-z] [A-z][a-z][a-z] *[0-9][0-9]* [0-9][0-9]:[0-9][0-9]:[0-9][0-9] [0-9][0-9][0-9][0-9]$/DATE/' } -# replace occurances of the actual TEST_DIR value with TEST_DIR +# replace occurrences of the actual TEST_DIR value with TEST_DIR _filter_testdir() { sed -e "s#$TEST_DIR#TEST_DIR#g" } +# replace occurrences of the actual IMGFMT value with IMGFMT +_filter_imgfmt() +{ + sed -e "s#$IMGFMT#IMGFMT#g" +} + # sanitize qemu-io output _filter_qemu_io() { -- 1.7.2.3