]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
iotests: qemu-img info output for corrupt image
authorMax Reitz <mreitz@redhat.com>
Tue, 30 Sep 2014 19:31:29 +0000 (21:31 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Sat, 4 Oct 2014 18:18:17 +0000 (19:18 +0100)
The "corrupt" entry in the format-specific information section should be
"true".

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1412105489-7681-4-git-send-email-mreitz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
tests/qemu-iotests/060
tests/qemu-iotests/060.out

index 23555679517f5196f769e0fd6a107804a29741de..9772d365ae359fb91fdb0635f9e70fe11b2991b2 100755 (executable)
@@ -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 \
index 4f0c6d0c8e034f9f2154b8c171f3e716c829fd7e..cd679f9454a5082b635564425bfd2cdcec6042b6 100644 (file)
@@ -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)