[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v7 12/20] qemu-iotests: 046: Move version detection
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH v7 12/20] qemu-iotests: 046: Move version detection out from verify_io |
Date: |
Mon, 8 Aug 2016 21:13:25 +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 e528b67..f15ccbf 100755
--- a/tests/qemu-iotests/046
+++ b/tests/qemu-iotests/046
@@ -192,15 +192,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
@@ -261,7 +253,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 "$TEST_IMG" | _filter_qemu_io
_check_test_img
--
2.7.4
- [Qemu-devel] [PATCH v7 02/20] qapi: Add lock-mode in blockdev-add options, (continued)
- [Qemu-devel] [PATCH v7 02/20] qapi: Add lock-mode in blockdev-add options, Fam Zheng, 2016/08/08
- [Qemu-devel] [PATCH v7 03/20] block: Add and parse "lock-mode" option for image locking, Fam Zheng, 2016/08/08
- [Qemu-devel] [PATCH v7 04/20] block: Introduce image file locking, Fam Zheng, 2016/08/08
- [Qemu-devel] [PATCH v7 05/20] osdep: Add qemu_lock_fd and qemu_unlock_fd, Fam Zheng, 2016/08/08
- [Qemu-devel] [PATCH v7 07/20] qemu-io: Add "-L" option for BDRV_O_NO_LOCK, Fam Zheng, 2016/08/08
- [Qemu-devel] [PATCH v7 06/20] raw-posix: Add image locking support, Fam Zheng, 2016/08/08
- [Qemu-devel] [PATCH v7 08/20] qemu-img: Add "-L" option to sub commands, Fam Zheng, 2016/08/08
- [Qemu-devel] [PATCH v7 09/20] qemu-img: Update documentation of "-L" option, Fam Zheng, 2016/08/08
- [Qemu-devel] [PATCH v7 10/20] qemu-nbd: Add "--no-lock/-L" option, Fam Zheng, 2016/08/08
- [Qemu-devel] [PATCH v7 11/20] block: Don't lock drive-backup target image in none mode, Fam Zheng, 2016/08/08
- [Qemu-devel] [PATCH v7 12/20] qemu-iotests: 046: Move version detection out from verify_io,
Fam Zheng <=
- [Qemu-devel] [PATCH v7 13/20] qemu-iotests: Wait for QEMU processes before checking image in 091, Fam Zheng, 2016/08/08
- [Qemu-devel] [PATCH v7 15/20] iotests: 087: Disable image locking in cases where file is shared, Fam Zheng, 2016/08/08
- [Qemu-devel] [PATCH v7 16/20] iotests: 130: Check image info locklessly, Fam Zheng, 2016/08/08
- [Qemu-devel] [PATCH v7 19/20] block: Turn on image locking by default, Fam Zheng, 2016/08/08
- [Qemu-devel] [PATCH v7 18/20] tests: Use null-co:// instead of /dev/null, Fam Zheng, 2016/08/08
- [Qemu-devel] [PATCH v7 17/20] iotests: Disable image locking in 085, Fam Zheng, 2016/08/08
- [Qemu-devel] [PATCH v7 20/20] qemu-iotests: Add test case 153 for image locking, Fam Zheng, 2016/08/08
- [Qemu-devel] [PATCH v7 14/20] qemu-iotests: 030: Disable image locking when checking test image, Fam Zheng, 2016/08/08
- Re: [Qemu-devel] [PATCH v7 00/20] block: Image locking series for 2.8, no-reply, 2016/08/08