block: Fix iotests 059
cover block: Fix iotests 059
The 059.out went out of sync, bring it back in line.
Fam Zheng (2):
qapi: Tweak error message of bdrv_query_image_info
iotests: Fix reference output for 059
block/qapi.c | 4 ++-- tests/qemu-iotests/059.out | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.9.3
PATCH 1/2 qapi: Tweak error message of bdrv_query_image_info
@bs doesn't always have a device name, such as when it comes from "qemu-img info". Report file name instead.
--- block/qapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
block/qapi.c +2 -2
@@ -237,8 +237,8 @@ void bdrv_query_image_info(BlockDriverState *bs, size =bdrv_getlength (bs);if (size <0 ) { -error_setg_errno (errp, -size,"Can't get size of device '%s'" , -bdrv_get_device_name (bs)); +error_setg_errno (errp, -size,"Can't get image size '%s'" , + bs->exact_filename); goto out; }
Signature · 1 line
2.9.3
PATCH 2/2 iotests: Fix reference output for 059
In reply to Fam ZhengIt was broken by efaa7c4eeb7 when it dropped the device name "image" from BB API. Now this error message text is updated again, sync it up.
--- tests/qemu-iotests/059.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qemu-iotests/059.out +1 -1
@@ -2361,5 +2361,5 @@ Offset Length Mapped to File 0x140000000 0x10000 0x50000 TEST_DIR/iotest-version3-s003.vmdk === Testing afl image with a very large capacity === -qemu-img: Can't get size of device 'image': File too large +qemu-img: Can't get image size 'TEST_DIR/afl9.IMGFMT': File too large *** done
Signature · 1 line
2.9.3
Quoted 6 lines · Fam Zheng
The 059.out went out of sync, bring it back in line.
Fam Zheng (2):
qapi: Tweak error message ofbdrv_query_image_info
iotests: Fix reference output for 059
Quoted 4 lines
block/qapi.c | 4 ++-- tests/qemu-iotests/059.out | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Re: [Qemu-devel] [PATCH 1/2] qapi: Tweak error message of bdrv_query_image_info
In reply to Fam ZhengQuoted 7 lines · Fam Zheng
@bs doesn't always have a device name, such as when it comes from "qemu-img info". Report file name instead.
Signed-off-by Fam Zheng <[email protected]>--- block/qapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Yes, I had a discussion with Kevin whether we should add some function like bdrv_error_setg() which automatically prepends some description™ of a BDS (e.g. node name if user-set, or device name if meaningful, or filename if not JSON). Spoiler: We probably should.
This is fine for now, though, because this function specifically deals with images.
Max
Quoted 16 lines
block/qapi.c +2
-2@@ -237,8 +237,8 @@ void bdrv_query_image_info(BlockDriverState *bs, size =bdrv_getlength (bs);if (size <0 ) { -error_setg_errno (errp, -size,"Can't get size of device '%s'" , -bdrv_get_device_name (bs)); +error_setg_errno (errp, -size,"Can't get image size '%s'" , + bs->exact_filename); goto out; }
Max Reitz
AppliedQuoted 9 lines · Fam Zheng
The 059.out went out of sync, bring it back in line.
Fam Zheng (2):
qapi: Tweak error message ofbdrv_query_image_info
iotests: Fix reference output for 059block/qapi.c | 4 ++-- tests/qemu-iotests/059.out | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
Thanks, applied to my block tree:
https://github.com/XanClic/qemu/commits/block
Max