From 4f6d5656d321a877bd750858e5d7819c15ec2a2c Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Tue, 30 Nov 2021 18:16:32 +0100 Subject: [PATCH] tests: Report expected monitor command for simulated commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Ján Tomko --- tests/qemumonitortestutils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index f7a0a37685..073ae5d73a 100644 --- a/tests/qemumonitortestutils.c +++ b/tests/qemumonitortestutils.c @@ -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); }