Message ID | 20180320173632.25480-7-kwolf@redhat.com |
---|---|
State | New |
Headers | show |
Series | block: Follow-up for .bdrv_co_create (part 1) | expand |
On 03/20/2018 12:36 PM, Kevin Wolf wrote: > This tests that the .bdrv_truncate implementation for luks doesn't crash > for invalid image sizes. > > Signed-off-by: Kevin Wolf <kwolf@redhat.com> > --- > tests/qemu-iotests/210 | 37 +++++++++++++++++++++++++++++++++++++ > 1 file changed, 37 insertions(+) Missing a change to 210.out?
On Tue, Mar 20, 2018 at 06:36:26PM +0100, Kevin Wolf wrote: > This tests that the .bdrv_truncate implementation for luks doesn't crash > for invalid image sizes. > > Signed-off-by: Kevin Wolf <kwolf@redhat.com> > --- > tests/qemu-iotests/210 | 37 +++++++++++++++++++++++++++++++++++++ > 1 file changed, 37 insertions(+) Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Regards, Daniel
Am 20.03.2018 um 19:33 hat Eric Blake geschrieben: > On 03/20/2018 12:36 PM, Kevin Wolf wrote: > > This tests that the .bdrv_truncate implementation for luks doesn't crash > > for invalid image sizes. > > > > Signed-off-by: Kevin Wolf <kwolf@redhat.com> > > --- > > tests/qemu-iotests/210 | 37 +++++++++++++++++++++++++++++++++++++ > > 1 file changed, 37 insertions(+) > > Missing a change to 210.out? Obviously. I wonder how that happened... Thanks! Kevin
diff --git a/tests/qemu-iotests/210 b/tests/qemu-iotests/210 index 96a5213e77..e607c0d296 100755 --- a/tests/qemu-iotests/210 +++ b/tests/qemu-iotests/210 @@ -204,6 +204,43 @@ run_qemu -blockdev driver=file,filename="$TEST_IMG_FILE",node-name=node0 \ { "execute": "quit" } EOF +echo +echo "=== Resize image with invalid sizes ===" +echo + +run_qemu -blockdev driver=file,filename="$TEST_IMG_FILE",node-name=node0 \ + -blockdev driver=luks,file=node0,key-secret=keysec0,node-name=node1 \ + -object secret,id=keysec0,data="foo" <<EOF +{ "execute": "qmp_capabilities" } +{ "execute": "block_resize", + "arguments": { + "node-name": "node1", + "size": 9223372036854775296 + } +} +{ "execute": "block_resize", + "arguments": { + "node-name": "node1", + "size": 9223372036854775808 + } +} +{ "execute": "block_resize", + "arguments": { + "node-name": "node1", + "size": 18446744073709551104 + } +} +{ "execute": "block_resize", + "arguments": { + "node-name": "node1", + "size": -9223372036854775808 + } +} +{ "execute": "quit" } +EOF + +_img_info | _filter_img_info + # success, all done echo "*** done" rm -f $seq.full
This tests that the .bdrv_truncate implementation for luks doesn't crash for invalid image sizes. Signed-off-by: Kevin Wolf <kwolf@redhat.com> --- tests/qemu-iotests/210 | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+)