diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-02-25 10:50:11 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-02-25 10:50:11 +0000 |
commit | e7a1d6c52a3ac6e76e5653c830b2545e0a4043d3 (patch) | |
tree | c79235495674ca3dceded77db7224e54419f6f61 /tests/qemu-iotests/046 | |
parent | c58e291591dbc1c846fa152d4792554803405ebb (diff) | |
parent | 6141f3bd6904df7cf9519c6444a14a608b9874c4 (diff) | |
download | qemu-e7a1d6c52a3ac6e76e5653c830b2545e0a4043d3.tar.gz |
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block patches
# gpg: Signature made Fri 21 Feb 2014 21:42:24 GMT using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
* remotes/kevin/tags/for-upstream: (54 commits)
iotests: Mixed quorum child device specifications
quorum: Simplify quorum_open()
quorum: Add unit test.
quorum: Add quorum_open() and quorum_close().
quorum: Implement recursive .bdrv_recurse_is_first_non_filter in quorum.
quorum: Add quorum_co_flush().
quorum: Add quorum_invalidate_cache().
quorum: Add quorum_getlength().
quorum: Add quorum mechanism.
quorum: Add quorum_aio_readv.
blkverify: Extract qemu_iovec_clone() and qemu_iovec_compare() from blkverify.
quorum: Add quorum_aio_writev and its dependencies.
quorum: Create BDRVQuorumState and BlkDriver and do init.
quorum: Create quorum.c, add QuorumChildRequest and QuorumAIOCB.
check-qdict: Test termination of qdict_array_split()
check-qdict: Adjust test for qdict_array_split()
qdict: Extract non-QDicts in qdict_array_split()
qemu-config: Sections must consist of keys
qemu-iotests: Check qemu-img command line parsing
qemu-img: Allow -o help with incomplete argument list
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/qemu-iotests/046')
-rwxr-xr-x | tests/qemu-iotests/046 | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/tests/qemu-iotests/046 b/tests/qemu-iotests/046 index 2d44bbb187..e0be46cf2b 100755 --- a/tests/qemu-iotests/046 +++ b/tests/qemu-iotests/046 @@ -193,6 +193,16 @@ echo "== Verify image content ==" function verify_io() { + if ($QEMU_IMG info -f "$IMGFMT" "$TEST_IMG" | grep "compat: 0.10" > /dev/null); then + # For v2 images, discarded clusters are read from the backing file + # Keep the variable empty so that the backing file value can be used as + # the default below + discarded= + else + # Discarded clusters are zeroed for v3 or later + discarded=0 + fi + echo read -P 0 0 0x10000 echo read -P 1 0x10000 0x2000 @@ -221,16 +231,16 @@ function verify_io() echo read -P 70 0x78000 0x6000 echo read -P 7 0x7e000 0x2000 - echo read -P 8 0x80000 0x6000 + echo read -P ${discarded:-8} 0x80000 0x6000 echo read -P 80 0x86000 0x2000 - echo read -P 8 0x88000 0x2000 + echo read -P ${discarded:-8} 0x88000 0x2000 echo read -P 81 0x8a000 0xe000 echo read -P 90 0x98000 0x6000 echo read -P 9 0x9e000 0x2000 - echo read -P 10 0xa0000 0x6000 + echo read -P ${discarded:-10} 0xa0000 0x6000 echo read -P 100 0xa6000 0x2000 - echo read -P 10 0xa8000 0x2000 + echo read -P ${discarded:-10} 0xa8000 0x2000 echo read -P 101 0xaa000 0xe000 echo read -P 110 0xb8000 0x8000 |