qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH] qemu-iotests: add 194 non-shared storage migrat


From: Eric Blake
Subject: Re: [Qemu-block] [PATCH] qemu-iotests: add 194 non-shared storage migration test
Date: Thu, 24 Aug 2017 11:03:07 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 08/23/2017 09:05 AM, Stefan Hajnoczi wrote:
> Non-shared storage migration with NBD and drive-mirror is currently not
> tested by qemu-iotests.  This test case covers the basic migration
> scenario.
> 
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> Based-on: <address@hidden>
> ---
>  tests/qemu-iotests/194        | 73 
> +++++++++++++++++++++++++++++++++++++++++++
>  tests/qemu-iotests/194.out    | 13 ++++++++
>  tests/qemu-iotests/group      |  1 +
>  tests/qemu-iotests/iotests.py | 13 ++++++++
>  4 files changed, 100 insertions(+)
>  create mode 100755 tests/qemu-iotests/194
>  create mode 100644 tests/qemu-iotests/194.out
> 

> +iotests.log('Waiting for drive-mirror to complete...')
> +iotests.log(source_vm.event_wait('BLOCK_JOB_READY'),
> +            filters=[iotests.filter_qmp_event])
> +
> +iotests.log('Starting migration...')
> +source_vm.qmp('migrate-set-capabilities',
> +              capabilities=[{'capability': 'events', 'state': True}])
> +dest_vm.qmp('migrate-set-capabilities',
> +            capabilities=[{'capability': 'events', 'state': True}])
> +iotests.log(source_vm.qmp('migrate', 
> uri='unix:{0}'.format(migration_sock_path)))
> +
> +while True:
> +    event = source_vm.event_wait('MIGRATION')
> +    iotests.log(event, filters=[iotests.filter_qmp_event])
> +    if event['data']['status'] in ('completed', 'failed'):
> +        break

As a followup patch for 2.11, we could extend this test to also issue a
block-job-cancel (to further imitate the sequence of commands issued by
libvirt).  But that enhancement is not a show-stopper for what got
committed for 2.10-rc4.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]