diff options
author | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2010-11-24 17:12:21 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-02-23 10:29:46 +0100 |
commit | 62284d1776e4e9d1e39e393398becf7c778ca0ce (patch) | |
tree | 5e3f93d5a29fc61decf57de25c82c4b39cb055d3 /tests | |
parent | 657c166f8ed420dfefd04f7612a727c2ddd7cc26 (diff) |
qemu-iotests: filter IMGFMT correctly in 019
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 <stefanha@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/qemu-iotests/019 | 2 | ||||
-rw-r--r-- | tests/qemu-iotests/019.out | 4 | ||||
-rw-r--r-- | tests/qemu-iotests/common.filter | 8 |
3 files changed, 10 insertions, 4 deletions
diff --git a/tests/qemu-iotests/019 b/tests/qemu-iotests/019 index 4c82be2b52..a2d67c3269 100755 --- a/tests/qemu-iotests/019 +++ b/tests/qemu-iotests/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/tests/qemu-iotests/019.out b/tests/qemu-iotests/019.out index d3913dfea1..63bdd5474e 100644 --- a/tests/qemu-iotests/019.out +++ b/tests/qemu-iotests/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/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter index da55f545a5..da77ede25f 100644 --- a/tests/qemu-iotests/common.filter +++ b/tests/qemu-iotests/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() { |