[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH for-2.7 v2 13/17] qemu-iotests: 046: Move version de
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH for-2.7 v2 13/17] qemu-iotests: 046: Move version detection out from verify_io |
Date: |
Fri, 15 Apr 2016 11:28:03 +0800 |
So the image lock won't complain.
Signed-off-by: Fam Zheng <address@hidden>
---
tests/qemu-iotests/046 | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/tests/qemu-iotests/046 b/tests/qemu-iotests/046
index e0be46c..40c4bc0 100755
--- a/tests/qemu-iotests/046
+++ b/tests/qemu-iotests/046
@@ -193,15 +193,7 @@ 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
+ discarded=$1
echo read -P 0 0 0x10000
@@ -262,7 +254,17 @@ function verify_io()
echo read -P 17 0x11c000 0x4000
}
-verify_io | $QEMU_IO "$TEST_IMG" | _filter_qemu_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
+
+verify_io $discarded | $QEMU_IO -L "$TEST_IMG" | _filter_qemu_io
_check_test_img
--
2.8.0
- Re: [Qemu-devel] [Qemu-block] [PATCH for-2.7 v2 06/17] gluster: Implement .bdrv_lockf, (continued)
- [Qemu-devel] [PATCH for-2.7 v2 07/17] rbd: Implement image locking, Fam Zheng, 2016/04/14
- [Qemu-devel] [PATCH for-2.7 v2 08/17] qemu-io: Add "-L" option for BDRV_O_NO_LOCK, Fam Zheng, 2016/04/14
- [Qemu-devel] [PATCH for-2.7 v2 09/17] qemu-img: Add "-L" option to sub commands, Fam Zheng, 2016/04/14
- [Qemu-devel] [PATCH for-2.7 v2 11/17] qemu-nbd: Add "--no-lock/-L" option, Fam Zheng, 2016/04/14
- [Qemu-devel] [PATCH for-2.7 v2 12/17] qemu-iotests: 140: Disable image lock for qemu-io access, Fam Zheng, 2016/04/14
- [Qemu-devel] [PATCH for-2.7 v2 13/17] qemu-iotests: 046: Move version detection out from verify_io,
Fam Zheng <=
- [Qemu-devel] [PATCH for-2.7 v2 14/17] qemu-iotests: Wait for QEMU processes before checking image in 091, Fam Zheng, 2016/04/14
- [Qemu-devel] [PATCH for-2.7 v2 10/17] qemu-img: Update documentation of "-L" option, Fam Zheng, 2016/04/14
- [Qemu-devel] [PATCH for-2.7 v2 15/17] qemu-iotests: Disable image lock when checking test image, Fam Zheng, 2016/04/14
- [Qemu-devel] [PATCH for-2.7 v2 16/17] block: Turn on image locking by default, Fam Zheng, 2016/04/14
- [Qemu-devel] [PATCH for-2.7 v2 17/17] qemu-iotests: Add test case 152 for image locking, Fam Zheng, 2016/04/14
- Re: [Qemu-devel] [PATCH for-2.7 v2 00/17] block: Lock images when opening, Denis V. Lunev, 2016/04/16
- Re: [Qemu-devel] [PATCH for-2.7 v2 00/17] block: Lock images when opening, Daniel P. Berrange, 2016/04/18