[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 17/23] iotests: qemu-img info output for corrupt imag
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 17/23] iotests: qemu-img info output for corrupt image |
Date: |
Sat, 4 Oct 2014 21:24:43 +0100 |
From: Max Reitz <address@hidden>
The "corrupt" entry in the format-specific information section should be
"true".
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
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)
--
1.9.3
- [Qemu-devel] [PULL 06/23] make check-block: Use default cache modes, (continued)
- [Qemu-devel] [PULL 06/23] make check-block: Use default cache modes, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 07/23] qemu-iotests: Fix supported cache modes for 052, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 08/23] blockdev: Orphaned drive search, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 09/23] blockdev: Allow overriding if_max_dev property, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 11/23] ide: Update ide_drive_get to be HBA agnostic, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 12/23] qtest/bios-tables: Correct Q35 command line, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 10/23] pc/vl: Add units-per-default-bus property, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 13/23] q35/ahci: Pick up -cdrom and -hda options, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 14/23] util: Emancipate id_wellformed() from QemuOpts, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 15/23] iotests: Use _img_info, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 17/23] iotests: qemu-img info output for corrupt image,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 16/23] qapi: Add corrupt field to ImageInfoSpecificQCow2, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 18/23] drive_del-test: Merge of qdev-monitor-test, blockdev-test, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 19/23] blockdev-test: Use single rather than double quotes in QMP, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 20/23] blockdev-test: Clean up bogus drive_add argument, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 21/23] blockdev-test: Simplify by using g_assert_cmpstr(), Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 22/23] blockdev-test: Factor out some common code into helpers, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 23/23] blockdev-test: Test device_del after drive_del, Stefan Hajnoczi, 2014/10/04
- Re: [Qemu-devel] [PULL 00/23] Block patches, Peter Maydell, 2014/10/06