]> git.proxmox.com Git - mirror_qemu.git/commit - tests/qemu-iotests/283.out
block: Clarify error messages pertaining to 'node-name'
authorConnor Kuehl <ckuehl@redhat.com>
Fri, 5 Mar 2021 15:19:28 +0000 (09:19 -0600)
committerKevin Wolf <kwolf@redhat.com>
Mon, 8 Mar 2021 13:56:55 +0000 (14:56 +0100)
commit785ec4b1b968906ea1d22f753a3b199be946550b
tree3a485c16996e771baa773603ab3f37877a1da39e
parentef809f709de81aef01bbb7403b87cbe2ac7e0c10
block: Clarify error messages pertaining to 'node-name'

Some error messages contain ambiguous representations of the 'node-name'
parameter. This can be particularly confusing when exchanging QMP
messages (C = client, S = server):

C: {"execute": "block_resize", "arguments": { "device": "my_file", "size": 26843545600 }}
S: {"error": {"class": "GenericError", "desc": "Cannot find device=my_file nor node_name="}}
                                                                               ^^^^^^^^^

This error message suggests one could send a message with a key called
'node_name':

C: {"execute": "block_resize", "arguments": { "node_name": "my_file", "size": 26843545600 }}
                                               ^^^^^^^^^

but using the underscore is actually incorrect, the parameter should be
'node-name':

S: {"error": {"class": "GenericError", "desc": "Parameter 'node_name' is unexpected"}}

This behavior was uncovered in bz1651437, but I ended up going down a
rabbit hole looking for other areas where this miscommunication might
occur and changing those accordingly as well.

Fixes: https://bugzilla.redhat.com/1651437
Signed-off-by: Connor Kuehl <ckuehl@redhat.com>
Message-Id: <20210305151929.1947331-2-ckuehl@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
18 files changed:
block.c
tests/qemu-iotests/030
tests/qemu-iotests/040
tests/qemu-iotests/051.pc.out
tests/qemu-iotests/081.out
tests/qemu-iotests/085.out
tests/qemu-iotests/087.out
tests/qemu-iotests/206.out
tests/qemu-iotests/210.out
tests/qemu-iotests/211.out
tests/qemu-iotests/212.out
tests/qemu-iotests/213.out
tests/qemu-iotests/223.out
tests/qemu-iotests/237.out
tests/qemu-iotests/245
tests/qemu-iotests/249.out
tests/qemu-iotests/283.out
tests/qemu-iotests/300