]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: Report expected monitor command for simulated commands
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 30 Nov 2021 17:16:32 +0000 (18:16 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Sat, 15 Jan 2022 05:33:33 +0000 (06:33 +0100)
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>
tests/qemumonitortestutils.c

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