On 4/10/19 12:45 PM, Max Reitz wrote: > On 01.04.19 16:08, Eric Blake wrote: >> 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. >> >> +++ b/tests/qemu-iotests/241.out >> +=== Exporting unaligned raw image, forced server sector alignment === >> + >> +WARNING: Image format was not specified for '/home/eblake/qemu/tests/qemu-iotests/scratch/t.raw' and probing guessed raw. >> + Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. >> + Specify the 'raw' format explicitly to remove the restrictions. > > Is there a patch for this already? Oh shoot. I saw the complaint about the hard-coded path needing a filter, and still failed to fix it in time for 4.0-rc3. Not a driver for -rc4 on its own, but if we have something else pop up that mandates -rc4, I'll get that fix in. Will post shortly... > > Also, I planned to reply to the original patch – but where is it? The > latest version I can see on the list is v3, and that only has seven > lines in the reference output. Well, the difference would explain why > Vladimir would give a Tested-by to a test that clearly will not run on > his machine. Yeah, this line in the commit message is evidence of my botching things: > [eblake: add forced-512 alignment, and nbdkit reproducer comment] -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org