1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

tests: Report expected monitor command for simulated commands

There are two tests currently that simulate QMP talk:
qemucapabilitiestest and qemuhotplugtest. In both cases they
check whether currently executed command is the one for which
reply was provided. If not an error message is reported. However,
the error message contains only the actual command and not the
expected one. This makes it harder to navigate through .replies
files.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Michal Privoznik 2021-11-30 18:16:32 +01:00
parent 6076ca7a03
commit 4f6d5656d3

View File

@ -648,7 +648,8 @@ qemuMonitorTestProcessCommandVerbatim(qemuMonitorTest *test,
ret = qemuMonitorTestAddResponse(test, data->response); ret = qemuMonitorTestAddResponse(test, data->response);
} else { } else {
if (data->cmderr) { if (data->cmderr) {
qemuMonitorTestError("%s: %s", data->cmderr, cmdstr); qemuMonitorTestError("%s: %s expected %s",
data->cmderr, cmdstr, data->command_name);
} else { } else {
qemuMonitorTestErrorInvalidCommand(data->command_name, cmdstr); qemuMonitorTestErrorInvalidCommand(data->command_name, cmdstr);
} }