diff options
author | Kevin Wolf <kwolf@redhat.com> | 2020-09-24 17:27:07 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2020-10-02 15:46:40 +0200 |
commit | 1a9f7a804f52caee6bc6769a8bb0a018e6c8ec81 (patch) | |
tree | 7e490524d05050c6c2f07b71fce77f4952736ef9 /tests/qemu-iotests/140 | |
parent | 3c3bc462adeb561f5dfdcbb84ae691c95ccef916 (diff) |
block/export: Add BLOCK_EXPORT_DELETED event
Clients may want to know when an export has finally disappeard
(block-export-del returns earlier than that in the general case), so add
a QAPI event for it.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200924152717.287415-22-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/140')
-rwxr-xr-x | tests/qemu-iotests/140 | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/qemu-iotests/140 b/tests/qemu-iotests/140 index 8d2ce5d9e3..309b177e77 100755 --- a/tests/qemu-iotests/140 +++ b/tests/qemu-iotests/140 @@ -81,10 +81,17 @@ $QEMU_IO_PROG -f raw -r -c 'read -P 42 0 64k' \ "nbd+unix:///drv?socket=$SOCK_DIR/nbd" 2>&1 \ | _filter_qemu_io | _filter_nbd +# The order of 'return' and the BLOCK_EXPORT_DELETED event is undefined. Just +# wait until we've twice seen one of them. Filter the 'return' line out so that +# the output is defined. _send_qemu_cmd $QEMU_HANDLE \ "{ 'execute': 'eject', 'arguments': { 'device': 'drv' }}" \ - 'return' + 'return\|BLOCK_EXPORT_DELETED' | + grep -v 'return' + +_send_qemu_cmd $QEMU_HANDLE '' 'return\|BLOCK_EXPORT_DELETED' | + grep -v 'return' $QEMU_IO_PROG -f raw -r -c close \ "nbd+unix:///drv?socket=$SOCK_DIR/nbd" 2>&1 \ |