1 Star 0 Fork 71

章北海/libvirt

forked from src-openEuler/libvirt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
libvirt-virstoragetest-testBackingParse-Use-VIR_DOMAIN_DEF_F.patch 1.43 KB
一键复制 编辑 原始数据 按行查看 历史
From 18c86b74537561ab926f1b5b71a1eea7ae5d0bcb Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Tue, 4 Aug 2020 09:09:04 +0000
Subject: [PATCH] virstoragetest: testBackingParse: Use
VIR_DOMAIN_DEF_FORMAT_SECURE when formatting xml
We want to format even the secure information in tests.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
(cherry-picked from commit 524de6cc35d3b222f0e940bb0fd027f5482572c5)
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
---
tests/virstoragetest.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index 6e8ebeb..6d2b21c 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -594,6 +594,7 @@ testBackingParse(const void *args)
g_autoptr(virStorageSource) src = NULL;
int rc;
int erc = data->rv;
+ unsigned int xmlformatflags = VIR_DOMAIN_DEF_FORMAT_SECURE;
/* expect failure return code with NULL expected data */
if (!data->expect)
@@ -613,7 +614,7 @@ testBackingParse(const void *args)
return -1;
}
- if (virDomainDiskSourceFormat(&buf, src, "source", 0, false, 0, true, NULL) < 0 ||
+ if (virDomainDiskSourceFormat(&buf, src, "source", 0, false, xmlformatflags, true, NULL) < 0 ||
!(xml = virBufferContentAndReset(&buf))) {
fprintf(stderr, "failed to format disk source xml\n");
return -1;
--
2.25.4
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dependent/libvirt.git
git@gitee.com:dependent/libvirt.git
dependent
libvirt
libvirt
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385