Am 20.03.2018 um 19:53 hat Eric Blake geschrieben: > On 03/20/2018 12:36 PM, Kevin Wolf wrote: > > Signed-off-by: Kevin Wolf <kw...@redhat.com> > > --- > > tests/qemu-iotests/213 | 349 > > +++++++++++++++++++++++++++++++++++++++++++++ > > tests/qemu-iotests/213.out | 121 ++++++++++++++++ > > tests/qemu-iotests/group | 1 + > > 3 files changed, 471 insertions(+) > > create mode 100755 tests/qemu-iotests/213 > > create mode 100644 tests/qemu-iotests/213.out > > > > > + > > +echo > > +echo "=== Invalid sizes ===" > > +echo > > + > > +# TODO Negative image sizes aren't handled correctly, but this is a problem > > +# with QAPI's implementation of the 'size' type and affects other commands > > as > > +# well. Once this is fixed, we may want to add a test case here. > > + > > +# 1. 2^64 - 512 > > +# 2. 2^63 = 8 EB (qemu-img enforces image sizes less than this) > > +# 3. 2^63 - 512 (generally valid, but with the crypto header the file will > > +# exceed 63 bits) > > Same comments as before on whether this comment is slightly stale after > copy-and-paste.
Will do the same thing as there ("image header"). > > +# 4. 2^46 + 1 (512 bytes more than maximum image size) > > Does this image format require 512-byte alignment? If so, are you missing a > test of unaligned sizes? If not, why not just 1 byte more than the maximum? The comment is wrong, the code already does just 1 byte more. Kevin