qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Jeff Cody <jcody@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Max Reitz <mreitz@redhat.com>
Subject: [Qemu-devel] [PATCH 3/3] iotests: qemu-img info output for corrupt image
Date: Tue, 30 Sep 2014 21:31:29 +0200	[thread overview]
Message-ID: <1412105489-7681-4-git-send-email-mreitz@redhat.com> (raw)
In-Reply-To: <1412105489-7681-1-git-send-email-mreitz@redhat.com>

The "corrupt" entry in the format-specific information section should be
"true".

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 tests/qemu-iotests/060     | 3 +++
 tests/qemu-iotests/060.out | 9 +++++++++
 2 files changed, 12 insertions(+)

diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060
index 2355567..9772d36 100755
--- a/tests/qemu-iotests/060
+++ b/tests/qemu-iotests/060
@@ -76,6 +76,9 @@ $QEMU_IO -c "$OPEN_RW" -c "write -P 0x2a 0 512" | _filter_qemu_io
 # The corrupt bit must now be set
 $PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
 
+# This information should be available through qemu-img info
+$QEMU_IMG info "$TEST_IMG" | _filter_testdir
+
 # Try to open the image R/W (which should fail)
 $QEMU_IO -c "$OPEN_RW" -c "read 0 512" 2>&1 | _filter_qemu_io \
                                             | _filter_testdir \
diff --git a/tests/qemu-iotests/060.out b/tests/qemu-iotests/060.out
index 4f0c6d0..cd679f9 100644
--- a/tests/qemu-iotests/060.out
+++ b/tests/qemu-iotests/060.out
@@ -11,6 +11,15 @@ incompatible_features     0x0
 qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps with active L1 table); further corruption events will be suppressed
 write failed: Input/output error
 incompatible_features     0x2
+image: TEST_DIR/t.qcow2
+file format: qcow2
+virtual size: 64M (67108864 bytes)
+disk size: 196K
+cluster_size: 65536
+Format specific information:
+    compat: 1.1
+    lazy refcounts: false
+    corrupt: true
 qemu-io: can't open device TEST_DIR/t.IMGFMT: IMGFMT: Image is corrupt; cannot be opened read/write
 read 512/512 bytes at offset 0
 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-- 
2.1.1

  parent reply	other threads:[~2014-09-30 19:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-30 19:31 [Qemu-devel] [PATCH 0/3] qcow2/qapi: Add "corrupt" to ImageInfoSpecificQCow2 Max Reitz
2014-09-30 19:31 ` [Qemu-devel] [PATCH 1/3] iotests: Use _img_info Max Reitz
2014-09-30 20:14   ` Eric Blake
2014-09-30 19:31 ` [Qemu-devel] [PATCH 2/3] qapi: Add corrupt field to ImageInfoSpecificQCow2 Max Reitz
2014-09-30 20:17   ` Eric Blake
2014-09-30 19:31 ` Max Reitz [this message]
2014-09-30 20:21   ` [Qemu-devel] [PATCH 3/3] iotests: qemu-img info output for corrupt image Eric Blake
2014-10-04 18:18 ` [Qemu-devel] [PATCH 0/3] qcow2/qapi: Add "corrupt" to ImageInfoSpecificQCow2 Stefan Hajnoczi

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=1412105489-7681-4-git-send-email-mreitz@redhat.com \
    --to=mreitz@redhat.com \
    --cc=jcody@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).