qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

iotests: Enhance 223 to cover qemu-img map improvements

Since qemu-img map + x-dirty-bitmap remains the easiest way to read
persistent bitmaps at the moment, it makes a reasonable place to add
coverage to ensure we do not regress on the just-added parameters to
qemu-img map.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200513181455.295267-1-eblake@redhat.com>

+6 -3
+4 -2
tests/qemu-iotests/223
··· 2 2 # 3 3 # Test reading dirty bitmap over NBD 4 4 # 5 - # Copyright (C) 2018-2019 Red Hat, Inc. 5 + # Copyright (C) 2018-2020 Red Hat, Inc. 6 6 # 7 7 # This program is free software; you can redistribute it and/or modify 8 8 # it under the terms of the GNU General Public License as published by ··· 206 206 207 207 nbd_server_start_unix_socket -f $IMGFMT -B b2 "$TEST_IMG" 208 208 IMG="driver=nbd,server.type=unix,server.path=$nbd_unix_socket" 209 - $QEMU_IMG map --output=json --image-opts \ 209 + $QEMU_IMG map --output=json --image-opts --max-length=12345 \ 210 + "$IMG,x-dirty-bitmap=qemu:dirty-bitmap:b2" | _filter_qemu_img_map 211 + $QEMU_IMG map --output=json --image-opts --start-offset=12345 \ 210 212 "$IMG,x-dirty-bitmap=qemu:dirty-bitmap:b2" | _filter_qemu_img_map 211 213 212 214 # success, all done
+2 -1
tests/qemu-iotests/223.out
··· 201 201 { "start": 2097152, "length": 2097152, "depth": 0, "zero": false, "data": false}] 202 202 [{ "start": 0, "length": 512, "depth": 0, "zero": false, "data": true, "offset": OFFSET}, 203 203 { "start": 512, "length": 512, "depth": 0, "zero": false, "data": false}, 204 - { "start": 1024, "length": 2096128, "depth": 0, "zero": false, "data": true, "offset": OFFSET}, 204 + { "start": 1024, "length": 11321, "depth": 0, "zero": false, "data": true, "offset": OFFSET}] 205 + [{ "start": 12345, "length": 2084807, "depth": 0, "zero": false, "data": true, "offset": OFFSET}, 205 206 { "start": 2097152, "length": 2097152, "depth": 0, "zero": false, "data": false}] 206 207 *** done