1 Star 0 Fork 71

jokenzhang/src-libvirt

forked from src-openEuler/libvirt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
tests-Report-expected-monitor-command-for-simulated-.patch 1.58 KB
一键复制 编辑 原始数据 按行查看 历史
Jiangjiacheng 提交于 2023-01-04 12:02 . Backport patches from upstream
From 31a4a7ecceeeaccfc016d28aa80f8a668c203ce0 Mon Sep 17 00:00:00 2001
From: Bihong Yu <yubihong@huawei.com>
Date: Tue, 30 Nov 2021 18:16:32 +0100
Subject: [PATCH 09/13] 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 <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Bihong Yu <yubihong@huawei.com>
---
tests/qemumonitortestutils.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c
index 159b1b909e..78d52028de 100644
--- a/tests/qemumonitortestutils.c
+++ b/tests/qemumonitortestutils.c
@@ -637,7 +637,8 @@ qemuMonitorTestProcessCommandVerbatim(qemuMonitorTestPtr test,
ret = qemuMonitorTestAddResponse(test, data->response);
} else {
if (data->cmderr) {
- errmsg = g_strdup_printf("%s: %s", data->cmderr, cmdstr);
+ errmsg = g_strdup_printf("%s: %s expected %s",
+ data->cmderr, cmdstr, data->command_name);
ret = qemuMonitorTestAddErrorResponse(test, errmsg);
} else {
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/omnihorizon/src-libvirt.git
git@gitee.com:omnihorizon/src-libvirt.git
omnihorizon
src-libvirt
src-libvirt
master

搜索帮助