aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/040
diff options
context:
space:
mode:
authorConnor Kuehl <ckuehl@redhat.com>2021-03-05 09:19:28 -0600
committerKevin Wolf <kwolf@redhat.com>2021-03-08 14:56:55 +0100
commit785ec4b1b968906ea1d22f753a3b199be946550b (patch)
tree3a485c16996e771baa773603ab3f37877a1da39e /tests/qemu-iotests/040
parentef809f709de81aef01bbb7403b87cbe2ac7e0c10 (diff)
downloadqemu-785ec4b1b968906ea1d22f753a3b199be946550b.zip
qemu-785ec4b1b968906ea1d22f753a3b199be946550b.tar.gz
qemu-785ec4b1b968906ea1d22f753a3b199be946550b.tar.bz2
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>
Diffstat (limited to 'tests/qemu-iotests/040')
-rwxr-xr-xtests/qemu-iotests/0404
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/qemu-iotests/040 b/tests/qemu-iotests/040
index 7ebc9ed..336ff7c 100755
--- a/tests/qemu-iotests/040
+++ b/tests/qemu-iotests/040
@@ -175,13 +175,13 @@ class TestSingleDrive(ImageCommitTestCase):
self.assert_no_active_block_jobs()
result = self.vm.qmp('block-commit', device='drive0', top_node='badfile', base_node='base')
self.assert_qmp(result, 'error/class', 'GenericError')
- self.assert_qmp(result, 'error/desc', "Cannot find device= nor node_name=badfile")
+ self.assert_qmp(result, 'error/desc', "Cannot find device='' nor node-name='badfile'")
def test_base_node_invalid(self):
self.assert_no_active_block_jobs()
result = self.vm.qmp('block-commit', device='drive0', top_node='mid', base_node='badfile')
self.assert_qmp(result, 'error/class', 'GenericError')
- self.assert_qmp(result, 'error/desc', "Cannot find device= nor node_name=badfile")
+ self.assert_qmp(result, 'error/desc', "Cannot find device='' nor node-name='badfile'")
def test_top_path_and_node(self):
self.assert_no_active_block_jobs()