All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] qemu-iotests: make a few more tests generic
Date: Wed, 8 Jul 2009 21:41:43 +0200	[thread overview]
Message-ID: <20090708194143.GA14640@lst.de> (raw)

Pretend that a non-implemented check is always successful and thus allow
various tests that were qcow2-specific before to be generic.


Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: qemu-iotests/009
===================================================================
--- qemu-iotests.orig/009	2009-07-08 21:03:29.268364164 +0200
+++ qemu-iotests/009	2009-07-08 21:10:26.103364516 +0200
@@ -40,7 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 1
 . ./common.rc
 . ./common.filter
 
-_supported_fmt qcow2
+_supported_fmt generic
 _supported_os Linux
 
 
Index: qemu-iotests/010
===================================================================
--- qemu-iotests.orig/010	2009-07-08 21:03:29.274364788 +0200
+++ qemu-iotests/010	2009-07-08 21:10:26.104364852 +0200
@@ -40,7 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 1
 . ./common.rc
 . ./common.filter
 
-_supported_fmt qcow2
+_supported_fmt generic
 _supported_os Linux
 
 
Index: qemu-iotests/011
===================================================================
--- qemu-iotests.orig/011	2009-07-08 21:03:29.281364421 +0200
+++ qemu-iotests/011	2009-07-08 21:10:26.104364852 +0200
@@ -40,7 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 1
 . ./common.rc
 . ./common.filter
 
-_supported_fmt qcow2
+_supported_fmt generic
 _supported_os Linux
 
 
Index: qemu-iotests/013
===================================================================
--- qemu-iotests.orig/013	2009-07-08 21:10:19.394364074 +0200
+++ qemu-iotests/013	2009-07-08 21:29:03.448264691 +0200
@@ -42,7 +42,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 1
 . ./common.pattern
 
 # much of this could be generic for any format supporting compression.
-_supported_fmt qcow2
+_supported_fmt qcow qcow2
 _supported_os Linux
 
 TEST_OFFSETS="0 4294967296"
@@ -66,7 +66,7 @@ echo "Compressing image"
 echo
 
 mv $TEST_IMG $TEST_IMG.orig
-$QEMU_IMG convert -f qcow2 -O qcow2 -c $TEST_IMG.orig $TEST_IMG
+$QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c $TEST_IMG.orig $TEST_IMG
 
 echo "Testing compressed image"
 echo
Index: qemu-iotests/014
===================================================================
--- qemu-iotests.orig/014	2009-07-08 21:03:29.384364533 +0200
+++ qemu-iotests/014	2009-07-08 21:10:26.109364301 +0200
@@ -42,7 +42,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 1
 . ./common.filter
 . ./common.pattern
 
-# much of this could be generic for any format supporting compression.
+# much of this could be generic for any format supporting snapshots
 _supported_fmt qcow2
 _supported_os Linux
 
Index: qemu-iotests/015
===================================================================
--- qemu-iotests.orig/015	2009-07-08 21:10:24.862372246 +0200
+++ qemu-iotests/015	2009-07-08 21:10:26.110364568 +0200
@@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 1
 . ./common.rc
 . ./common.filter
 
-# currently only qcow2 allows for consistency checks using qemu-img
+# actually any format that supports snapshots
 _supported_fmt qcow2
 _supported_os Linux
 
Index: qemu-iotests/common.rc
===================================================================
--- qemu-iotests.orig/common.rc	2009-07-08 21:03:29.393364072 +0200
+++ qemu-iotests/common.rc	2009-07-08 21:10:26.111364626 +0200
@@ -75,7 +75,8 @@ _cleanup_test_img()
 
 _check_test_img()
 {
-    $QEMU_IMG check -f $IMGFMT $TEST_IMG
+    $QEMU_IMG check -f $IMGFMT $TEST_IMG 2>&1 | \
+    	sed -e 's/qemu-img\: This image format does not support checks/No errors were found on the image./'
 }
 
 _get_pids_by_name()
Index: qemu-iotests/common.pattern
===================================================================
--- qemu-iotests.orig/common.pattern	2009-07-08 21:03:29.398364429 +0200
+++ qemu-iotests/common.pattern	2009-07-08 21:10:26.112364683 +0200
@@ -96,7 +96,7 @@ function io_test2() {
     io_pattern writev $((offset + 8 * 4096)) 4096 $((9 * 4096)) 256 165
 
     mv $TEST_IMG $TEST_IMG.orig
-    $QEMU_IMG convert -f qcow2 -O qcow2 -c $TEST_IMG.orig $TEST_IMG
+    $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c $TEST_IMG.orig $TEST_IMG
 
     # Write the used clusters
     echo === Used clusters [1]

             reply	other threads:[~2009-07-08 19:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-08 19:41 Christoph Hellwig [this message]
2009-07-09  9:58 ` [Qemu-devel] [PATCH] qemu-iotests: make a few more tests generic Kevin Wolf
2009-07-09 13:25   ` Christoph Hellwig
2009-07-10  7:47     ` Kevin Wolf
2009-07-10 10:00       ` Christoph Hellwig
2009-07-10 12:50       ` Anthony Liguori
2009-07-10 13:10         ` Kevin Wolf
2009-07-10 13:34         ` Christoph Hellwig
2009-07-10 13:39           ` Anthony Liguori
2009-07-10 14:27             ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090708194143.GA14640@lst.de \
    --to=hch@lst.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.