diff options
author | Peter Maydell | 2017-08-31 14:51:40 +0200 |
---|---|---|
committer | Peter Maydell | 2017-08-31 14:51:42 +0200 |
commit | 2e75021eb64485f7a7cec98d18f40650516641d0 (patch) | |
tree | 738c204041586917bfefb491767b674daa27e6f8 /tests/qemu-iotests/194 | |
parent | Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20170830' into staging (diff) | |
parent | block/nbd-client: refactor request send/receive (diff) | |
download | qemu-2e75021eb64485f7a7cec98d18f40650516641d0.tar.gz qemu-2e75021eb64485f7a7cec98d18f40650516641d0.tar.xz qemu-2e75021eb64485f7a7cec98d18f40650516641d0.zip |
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2017-08-30' into staging
nbd patches for 2017-08-30
- Kashyap Chamarthy: qemu-iotests: Extend non-shared storage migration test (194)
- Stefan Hajnaczi: 0/3 nbd-client: enter read_reply_co during init to avoid crash
- Vladimir Sementsov-Ogievskiy: portions of 0/17 nbd client refactoring and fixing
# gpg: Signature made Wed 30 Aug 2017 19:03:46 BST
# gpg: using RSA key 0xA7A16B4A2527436A
# gpg: Good signature from "Eric Blake <eblake@redhat.com>"
# gpg: aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>"
# gpg: aka "[jpeg image of size 6874]"
# Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2 F3AA A7A1 6B4A 2527 436A
* remotes/ericb/tags/pull-nbd-2017-08-30:
block/nbd-client: refactor request send/receive
block/nbd-client: rename nbd_recv_coroutines_enter_all
block/nbd-client: get rid of ssize_t
nbd/client: fix nbd_send_request to return int
nbd/client: refactor nbd_receive_reply
nbd/client: refactor nbd_read_eof
nbd/client: fix nbd_opt_go
qemu-iotests: test NBD over UNIX domain sockets in 083
qemu-iotests: improve nbd-fault-injector.py startup protocol
nbd-client: avoid read_reply_co entry if send failed
qemu-iotests: Extend non-shared storage migration test (194)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/qemu-iotests/194')
-rwxr-xr-x | tests/qemu-iotests/194 | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/tests/qemu-iotests/194 b/tests/qemu-iotests/194 index 8028111e21..a3e3bad664 100755 --- a/tests/qemu-iotests/194 +++ b/tests/qemu-iotests/194 @@ -46,16 +46,17 @@ iotests.log('Launching NBD server on destination...') iotests.log(dest_vm.qmp('nbd-server-start', addr={'type': 'unix', 'data': {'path': nbd_sock_path}})) iotests.log(dest_vm.qmp('nbd-server-add', device='drive0', writable=True)) -iotests.log('Starting drive-mirror on source...') +iotests.log('Starting `drive-mirror` on source...') iotests.log(source_vm.qmp( 'drive-mirror', device='drive0', target='nbd+unix:///drive0?socket={0}'.format(nbd_sock_path), sync='full', format='raw', # always raw, the server handles the format - mode='existing')) + mode='existing', + job_id='mirror-job0')) -iotests.log('Waiting for drive-mirror to complete...') +iotests.log('Waiting for `drive-mirror` to complete...') iotests.log(source_vm.event_wait('BLOCK_JOB_READY'), filters=[iotests.filter_qmp_event]) @@ -67,7 +68,17 @@ dest_vm.qmp('migrate-set-capabilities', 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'): + event1 = source_vm.event_wait('MIGRATION') + iotests.log(event1, filters=[iotests.filter_qmp_event]) + if event1['data']['status'] in ('completed', 'failed'): + iotests.log('Gracefully ending the `drive-mirror` job on source...') + iotests.log(source_vm.qmp('block-job-cancel', device='mirror-job0')) + break + +while True: + event2 = source_vm.event_wait('BLOCK_JOB_COMPLETED') + iotests.log(event2, filters=[iotests.filter_qmp_event]) + if event2['event'] == 'BLOCK_JOB_COMPLETED': + iotests.log('Stopping the NBD server on destination...') + iotests.log(dest_vm.qmp('nbd-server-stop')) break |