[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v8 20/36] qemu-iotests: 046: Move version detection
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH v8 20/36] qemu-iotests: 046: Move version detection out from verify_io |
Date: |
Fri, 30 Sep 2016 20:09:50 +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 v8 09/36] qemu-nbd: Add "--no-lock/-L" option, (continued)
- [Qemu-devel] [PATCH v8 09/36] qemu-nbd: Add "--no-lock/-L" option, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 11/36] block: Add blk_lock_image, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 12/36] virtio-blk: Apply lock-mode when realize, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 13/36] scsi-disk: Apply lock-mode when realize, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 14/36] scsi-generic: Apply lock-mode when realize, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 15/36] qdev: Add "lock-mode" to block device options, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 16/36] ide: Apply lock-mode when initialize, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 17/36] nvme: Apply lock-mode when initialize, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 18/36] usb-storage: Apply lock-mode when realize, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 19/36] pflash: Add "lock-mode" property, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 20/36] qemu-iotests: 046: Move version detection out from verify_io,
Fam Zheng <=
- [Qemu-devel] [PATCH v8 21/36] qemu-iotests: 091: Prepare for image lock, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 22/36] qemu-iotests: 030: Disable image locking when checking test image, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 23/36] iotests: 087: Disable image locking in cases where file is shared, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 24/36] iotests: 087: Disable image locking in cases where file is shared, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 25/36] iotests: 130: Check image info locklessly, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 26/36] iotests: Disable image locking in 085, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 27/36] tests: Use null-co:// instead of /dev/null, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 28/36] qemu-iotests: Add test case 153 for image locking, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 29/36] ahci: Use shared lock for shared storage migration, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 30/36] tests/postcopy: Use shared lock for images, Fam Zheng, 2016/09/30