[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 24/27] iotests: Disable image locking in 085
From: |
Max Reitz |
Subject: |
Re: [Qemu-devel] [PATCH v5 24/27] iotests: Disable image locking in 085 |
Date: |
Wed, 25 May 2016 15:52:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 |
On 17.05.2016 09:35, Fam Zheng wrote:
> The cases is about live snapshot features. Disable image locking because
> otherwise a few tests are going to fail because we reuse the same images
> at blockdev-add.
>
> Signed-off-by: Fam Zheng <address@hidden>
> ---
> tests/qemu-iotests/085 | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tests/qemu-iotests/085 b/tests/qemu-iotests/085
> index aa77eca..48f6684 100755
> --- a/tests/qemu-iotests/085
> +++ b/tests/qemu-iotests/085
> @@ -102,6 +102,7 @@ function add_snapshot_image()
> cmd="{ 'execute': 'blockdev-add', 'arguments':
> { 'options':
> { 'driver': 'qcow2', 'node-name': 'snap_${1}', ${extra_params}
> + 'lock-mode': 'off',
> 'file':
> { 'driver': 'file', 'filename': '${snapshot_file}',
> 'node-name': 'file_${1}' } } } }"
> @@ -130,7 +131,7 @@ echo === Running QEMU ===
> echo
>
> qemu_comm_method="qmp"
> -_launch_qemu -drive file="${TEST_IMG}.1",if=virtio -drive
> file="${TEST_IMG}.2",if=virtio
> +_launch_qemu -drive file="${TEST_IMG}.1",if=virtio,lock-mode=off -drive
> file="${TEST_IMG}.2",if=virtio,lock-mode=off
> h=$QEMU_HANDLE
>
> echo
>
So as far as I understand it, add_snapshot_image() is supposed to add
images from the backing chain to the running VM. The top image is never
used by add_snapshot_image(), thus the lock-mode=off in the QEMU command
line seems superfluous.
Since the backing chain is opened read-only by the VM, it is locked in
shared mode, basically. Therefore, we can simply use explicitly shared
lock mode in add_snapshot_image(); or, alternatively, it is completely
sufficient to specify "'read-only': true" there instead of forcing a
non-exclusive locking mode.
And indeed, for me the test passes if I undo the changes done by this
patch and just insert said "'read-only': true" in the blockdev-add
invocation done by add_snapshot_image().
Max
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v5 21/27] qemu-iotests: Wait for QEMU processes before checking image in 091, (continued)
- [Qemu-devel] [PATCH v5 21/27] qemu-iotests: Wait for QEMU processes before checking image in 091, Fam Zheng, 2016/05/17
- [Qemu-devel] [PATCH v5 20/27] qemu-iotests: 046: Move version detection out from verify_io, Fam Zheng, 2016/05/17
- [Qemu-devel] [PATCH v5 23/27] iotests: 087: Disable image lock in cases where file is shared, Fam Zheng, 2016/05/17
- [Qemu-devel] [PATCH v5 22/27] qemu-iotests: 030: Disable image lock when checking test image, Fam Zheng, 2016/05/17
- [Qemu-devel] [PATCH v5 24/27] iotests: Disable image locking in 085, Fam Zheng, 2016/05/17
- Re: [Qemu-devel] [PATCH v5 24/27] iotests: Disable image locking in 085,
Max Reitz <=
- [Qemu-devel] [PATCH v5 26/27] block: Turn on image locking by default, Fam Zheng, 2016/05/17
- [Qemu-devel] [PATCH v5 25/27] tests: Use null-co:// instead of /dev/null, Fam Zheng, 2016/05/17
- [Qemu-devel] [PATCH v5 27/27] qemu-iotests: Add test case 153 for image locking, Fam Zheng, 2016/05/17
- Re: [Qemu-devel] [PATCH v5 00/27] block: Lock images when opening, Richard W.M. Jones, 2016/05/24