[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v8 21/36] qemu-iotests: 091: Prepare for image lock
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH v8 21/36] qemu-iotests: 091: Prepare for image lock |
Date: |
Fri, 30 Sep 2016 20:09:51 +0800 |
We should wait for the QEMU process to terminate and close the image
before we check the data.
Also use shared lock in migration source and target.
Signed-off-by: Fam Zheng <address@hidden>
---
tests/qemu-iotests/091 | 9 +++++++--
tests/qemu-iotests/091.out | 1 +
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/091 b/tests/qemu-iotests/091
index 32bbd56..d54ab73 100755
--- a/tests/qemu-iotests/091
+++ b/tests/qemu-iotests/091
@@ -61,13 +61,15 @@ echo === Starting QEMU VM1 ===
echo
qemu_comm_method="monitor"
-_launch_qemu -drive file="${TEST_IMG}",cache=${CACHEMODE},id=disk
+_launch_qemu -drive file="${TEST_IMG}",cache=${CACHEMODE},id=disk,if=none \
+ -device virtio-blk,drive=disk,lock-mode=shared
h1=$QEMU_HANDLE
echo
echo === Starting QEMU VM2 ===
echo
-_launch_qemu -drive file="${TEST_IMG}",cache=${CACHEMODE},id=disk \
+_launch_qemu -drive file="${TEST_IMG}",cache=${CACHEMODE},id=disk,if=none \
+ -device virtio-blk,drive=disk,lock-mode=shared \
-incoming "exec: cat '${MIG_FIFO}'"
h2=$QEMU_HANDLE
@@ -95,6 +97,9 @@ echo "vm2: qemu process running successfully"
echo "vm2: flush io, and quit"
_send_qemu_cmd $h2 'qemu-io disk flush' "(qemu)"
_send_qemu_cmd $h2 'quit' ""
+echo "vm1: quit"
+_send_qemu_cmd $h1 'quit' ""
+wait
echo "Check image pattern"
${QEMU_IO} -c "read -P 0x22 0 4M" "${TEST_IMG}" | _filter_testdir |
_filter_qemu_io
diff --git a/tests/qemu-iotests/091.out b/tests/qemu-iotests/091.out
index 5017f8c..6658ca8 100644
--- a/tests/qemu-iotests/091.out
+++ b/tests/qemu-iotests/091.out
@@ -18,6 +18,7 @@ vm1: live migration completed
vm2: qemu-io disk write complete
vm2: qemu process running successfully
vm2: flush io, and quit
+vm1: quit
Check image pattern
read 4194304/4194304 bytes at offset 0
4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
--
2.7.4
- [Qemu-devel] [PATCH v8 11/36] block: Add blk_lock_image, (continued)
- [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, 2016/09/30
- [Qemu-devel] [PATCH v8 21/36] qemu-iotests: 091: Prepare for image lock,
Fam Zheng <=
- [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
- [Qemu-devel] [PATCH v8 31/36] fdc: Add lock-mode qdev properties, Fam Zheng, 2016/09/30