]> git.proxmox.com Git - mirror_qemu.git/commit
iotests: Add 241 to test NBD on unaligned images
authorEric Blake <eblake@redhat.com>
Fri, 29 Mar 2019 04:27:45 +0000 (23:27 -0500)
committerEric Blake <eblake@redhat.com>
Sun, 31 Mar 2019 01:50:58 +0000 (20:50 -0500)
commite9dce9cb6eae57834cd80324ff43069299198bab
tree34ab01ee5e7aacc051c114d0203e92c9cf724baf
parent737d3f524481bb2ef68d3eba1caa636ff143e16a
iotests: Add 241 to test NBD on unaligned images

Add a test for the NBD client workaround in the previous patch.  It's
not really feasible for an iotest to assume a specific tracing engine,
so we can't really probe trace_nbd_parse_blockstatus_compliance to see
if the server was fixed vs. whether the client just worked around the
server (other than by rearranging order between code patches and this
test). But having a successful exchange sure beats the previous state
of an error message. Since format probing can change alignment, we can
use that as an easy way to test several configurations.

Not tested yet, but worth adding to this test in future patches: an
NBD server that can advertise a non-sector-aligned size (such as
nbdkit) causes qemu as the NBD client to misbehave when it rounds the
size up and accesses beyond the advertised size. Qemu as NBD server
never advertises a non-sector-aligned size (since bdrv_getlength()
currently rounds up to sector boundaries); until qemu can act as such
a server, testing that flaw will have to rely on external binaries.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20190329042750.14704-2-eblake@redhat.com>
Tested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
[eblake: add forced-512 alignment, and nbdkit reproducer comment]
tests/qemu-iotests/241 [new file with mode: 0755]
tests/qemu-iotests/241.out [new file with mode: 0644]
tests/qemu-iotests/group