All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Anthony Liguori <aliguori@amazon.com>
Subject: [Qemu-devel] [PULL 06/11] block: qemu-iotests - add vhdx log replay tests for qemu-img
Date: Fri, 14 Feb 2014 18:29:28 +0100	[thread overview]
Message-ID: <1392398973-15092-7-git-send-email-stefanha@redhat.com> (raw)
In-Reply-To: <1392398973-15092-1-git-send-email-stefanha@redhat.com>

From: Jeff Cody <jcody@redhat.com>

VHDX logs can now be replayed via 'qemu-img check -r all'.  Add
tests to verify that the log replay is successful when using qemu-img.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 tests/qemu-iotests/070     | 10 ++++++++++
 tests/qemu-iotests/070.out | 11 +++++++++++
 2 files changed, 21 insertions(+)

diff --git a/tests/qemu-iotests/070 b/tests/qemu-iotests/070
index f84d2cb..ce71fa4 100755
--- a/tests/qemu-iotests/070
+++ b/tests/qemu-iotests/070
@@ -62,6 +62,16 @@ $QEMU_IO -r -c "read -pP 0xa5 0 18M" "$TEST_IMG" 2>&1 | _filter_testdir \
 echo "=== Verify open image replays log  ==="
 $QEMU_IO  -c "read -pP 0xa5 0 18M" "$TEST_IMG" | _filter_qemu_io
 
+# extract fresh sample image again
+_use_sample_img iotest-dirtylog-10G-4M.vhdx.bz2
+
+echo "=== Verify qemu-img check -r all replays log  ==="
+$QEMU_IMG check -r all "$TEST_IMG" 2>&1 | _filter_testdir | _filter_qemu
+
+echo "=== Verify open image read-only succeeds after log replay ==="
+$QEMU_IO -r -c "read -pP 0xa5 0 18M" "$TEST_IMG" 2>&1 | _filter_testdir \
+                                                      | _filter_qemu_io
+
 # success, all done
 echo "*** done"
 rm -f $seq.full
diff --git a/tests/qemu-iotests/070.out b/tests/qemu-iotests/070.out
index 0352adc..922d62c 100644
--- a/tests/qemu-iotests/070.out
+++ b/tests/qemu-iotests/070.out
@@ -7,4 +7,15 @@ qemu-io: can't open device TEST_DIR/iotest-dirtylog-10G-4M.vhdx: VHDX image file
 === Verify open image replays log  ===
 read 18874368/18874368 bytes at offset 0
 18 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+=== Verify qemu-img check -r all replays log  ===
+The following inconsistencies were found and repaired:
+
+    0 leaked clusters
+    1 corruptions
+
+Double checking the fixed image now...
+No errors were found on the image.
+=== Verify open image read-only succeeds after log replay ===
+read 18874368/18874368 bytes at offset 0
+18 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 *** done
-- 
1.8.5.3

  parent reply	other threads:[~2014-02-14 17:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14 17:29 [Qemu-devel] [PULL 00/11] Block patches Stefan Hajnoczi
2014-02-14 17:29 ` [Qemu-devel] [PULL 01/11] sdhci: Drop unnecessary #include Stefan Hajnoczi
2014-02-14 17:29 ` [Qemu-devel] [PULL 02/11] blockdev: Remove 'type' parameter from blockdev_init() Stefan Hajnoczi
2014-02-14 17:29 ` [Qemu-devel] [PULL 03/11] block: Add notes to iSCSI's .bdrv_open and .bdrv_reopen_prepare Stefan Hajnoczi
2014-02-14 17:29 ` [Qemu-devel] [PULL 04/11] block: Don't throw away errno via error_setg Stefan Hajnoczi
2014-02-14 17:29 ` [Qemu-devel] [PULL 05/11] block: qemu-iotests - fix test 070 (vhdx) Stefan Hajnoczi
2014-02-14 17:29 ` Stefan Hajnoczi [this message]
2014-02-14 17:29 ` [Qemu-devel] [PULL 07/11] qemu-iotests: Don't run 005 on vmdk split formats Stefan Hajnoczi
2014-02-14 17:29 ` [Qemu-devel] [PULL 08/11] block: mirror - use local_err to avoid NULL errp Stefan Hajnoczi
2014-02-14 17:29 ` [Qemu-devel] [PULL 09/11] blockdev: Fix wrong usage of QDECREF causing snapshoted quorum to crash on close Stefan Hajnoczi
2014-02-14 17:29 ` [Qemu-devel] [PULL 10/11] block: Relax bdrv_lookup_bs constraints Stefan Hajnoczi
2014-02-14 17:29 ` [Qemu-devel] [PULL 11/11] block: Open by reference will try device then node_name Stefan Hajnoczi
2014-02-15 16:37 ` [Qemu-devel] [PULL 00/11] Block patches Peter Maydell

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=1392398973-15092-7-git-send-email-stefanha@redhat.com \
    --to=stefanha@redhat.com \
    --cc=aliguori@amazon.com \
    --cc=peter.maydell@linaro.org \
    --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.