Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
239caffb
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
239caffb
编写于
5月 26, 2016
作者:
T
Tomáš Ryšavý
提交者:
John Ferlan
6月 08, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tests: Rename virtTestCompareToFile to virTestCompareToFile.
This function doesn't follow our convention of naming functions.
上级
401bb813
变更
33
隐藏空白更改
内联
并排
Showing
33 changed file
with
41 addition
and
41 deletion
+41
-41
tests/bhyvexml2argvtest.c
tests/bhyvexml2argvtest.c
+3
-3
tests/cputest.c
tests/cputest.c
+1
-1
tests/domaincapstest.c
tests/domaincapstest.c
+1
-1
tests/lxcconf2xmltest.c
tests/lxcconf2xmltest.c
+1
-1
tests/networkxml2conftest.c
tests/networkxml2conftest.c
+1
-1
tests/networkxml2firewalltest.c
tests/networkxml2firewalltest.c
+1
-1
tests/networkxml2xmltest.c
tests/networkxml2xmltest.c
+1
-1
tests/networkxml2xmlupdatetest.c
tests/networkxml2xmlupdatetest.c
+1
-1
tests/nodeinfotest.c
tests/nodeinfotest.c
+2
-2
tests/nwfilterxml2firewalltest.c
tests/nwfilterxml2firewalltest.c
+1
-1
tests/nwfilterxml2xmltest.c
tests/nwfilterxml2xmltest.c
+1
-1
tests/qemuargv2xmltest.c
tests/qemuargv2xmltest.c
+1
-1
tests/qemucapabilitiestest.c
tests/qemucapabilitiestest.c
+1
-1
tests/qemucaps2xmltest.c
tests/qemucaps2xmltest.c
+1
-1
tests/qemumonitorjsontest.c
tests/qemumonitorjsontest.c
+1
-1
tests/qemuxml2argvtest.c
tests/qemuxml2argvtest.c
+1
-1
tests/secretxml2xmltest.c
tests/secretxml2xmltest.c
+1
-1
tests/sexpr2xmltest.c
tests/sexpr2xmltest.c
+1
-1
tests/storagepoolxml2xmltest.c
tests/storagepoolxml2xmltest.c
+1
-1
tests/storagevolxml2argvtest.c
tests/storagevolxml2argvtest.c
+1
-1
tests/storagevolxml2xmltest.c
tests/storagevolxml2xmltest.c
+1
-1
tests/sysinfotest.c
tests/sysinfotest.c
+1
-1
tests/testutils.c
tests/testutils.c
+3
-3
tests/testutils.h
tests/testutils.h
+2
-2
tests/vircaps2xmltest.c
tests/vircaps2xmltest.c
+1
-1
tests/vircgrouptest.c
tests/vircgrouptest.c
+1
-1
tests/virnetdaemontest.c
tests/virnetdaemontest.c
+1
-1
tests/vmx2xmltest.c
tests/vmx2xmltest.c
+1
-1
tests/xencapstest.c
tests/xencapstest.c
+1
-1
tests/xlconfigtest.c
tests/xlconfigtest.c
+2
-2
tests/xmconfigtest.c
tests/xmconfigtest.c
+2
-2
tests/xml2sexprtest.c
tests/xml2sexprtest.c
+1
-1
tests/xml2vmxtest.c
tests/xml2vmxtest.c
+1
-1
未找到文件。
tests/bhyvexml2argvtest.c
浏览文件 @
239caffb
...
...
@@ -66,14 +66,14 @@ static int testCompareXMLToArgvFiles(const char *xml,
if
(
!
(
actualld
=
virCommandToString
(
ldcmd
)))
goto
out
;
if
(
vir
t
TestCompareToFile
(
actualargv
,
cmdline
)
<
0
)
if
(
virTestCompareToFile
(
actualargv
,
cmdline
)
<
0
)
goto
out
;
if
(
vir
t
TestCompareToFile
(
actualld
,
ldcmdline
)
<
0
)
if
(
virTestCompareToFile
(
actualld
,
ldcmdline
)
<
0
)
goto
out
;
if
(
virFileExists
(
dmcmdline
)
||
actualdm
)
{
if
(
vir
t
TestCompareToFile
(
actualdm
,
dmcmdline
)
<
0
)
if
(
virTestCompareToFile
(
actualdm
,
dmcmdline
)
<
0
)
goto
out
;
}
...
...
tests/cputest.c
浏览文件 @
239caffb
...
...
@@ -168,7 +168,7 @@ cpuTestCompareXML(const char *arch,
if
(
!
(
actual
=
virCPUDefFormat
(
cpu
,
NULL
,
updateCPU
)))
goto
cleanup
;
if
(
vir
t
TestCompareToFile
(
actual
,
xml
)
<
0
)
if
(
virTestCompareToFile
(
actual
,
xml
)
<
0
)
goto
cleanup
;
ret
=
0
;
...
...
tests/domaincapstest.c
浏览文件 @
239caffb
...
...
@@ -217,7 +217,7 @@ test_virDomainCapsFormat(const void *opaque)
if
(
!
(
domCapsXML
=
virDomainCapsFormat
(
domCaps
)))
goto
cleanup
;
if
(
vir
t
TestCompareToFile
(
domCapsXML
,
path
)
<
0
)
if
(
virTestCompareToFile
(
domCapsXML
,
path
)
<
0
)
goto
cleanup
;
ret
=
0
;
...
...
tests/lxcconf2xmltest.c
浏览文件 @
239caffb
...
...
@@ -45,7 +45,7 @@ testCompareXMLToConfigFiles(const char *xmlfile,
if
(
!
(
actualxml
=
virDomainDefFormat
(
vmdef
,
caps
,
0
)))
goto
fail
;
if
(
vir
t
TestCompareToFile
(
actualxml
,
xmlfile
)
<
0
)
if
(
virTestCompareToFile
(
actualxml
,
xmlfile
)
<
0
)
goto
fail
;
}
...
...
tests/networkxml2conftest.c
浏览文件 @
239caffb
...
...
@@ -45,7 +45,7 @@ testCompareXMLToConfFiles(const char *inxml, const char *outconf, dnsmasqCapsPtr
dctx
,
caps
)
<
0
)
goto
fail
;
if
(
vir
t
TestCompareToFile
(
actual
,
outconf
)
<
0
)
if
(
virTestCompareToFile
(
actual
,
outconf
)
<
0
)
goto
fail
;
ret
=
0
;
...
...
tests/networkxml2firewalltest.c
浏览文件 @
239caffb
...
...
@@ -68,7 +68,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
virtTestClearCommandPath
(
actualargv
);
virCommandSetDryRun
(
NULL
,
NULL
,
NULL
);
if
(
vir
t
TestCompareToFile
(
actualargv
,
cmdline
)
<
0
)
if
(
virTestCompareToFile
(
actualargv
,
cmdline
)
<
0
)
goto
cleanup
;
ret
=
0
;
...
...
tests/networkxml2xmltest.c
浏览文件 @
239caffb
...
...
@@ -47,7 +47,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml,
if
(
expectResult
==
TEST_COMPARE_NET_XML2XML_RESULT_FAIL_FORMAT
)
goto
cleanup
;
if
(
vir
t
TestCompareToFile
(
actual
,
outxml
)
<
0
)
{
if
(
virTestCompareToFile
(
actual
,
outxml
)
<
0
)
{
result
=
TEST_COMPARE_NET_XML2XML_RESULT_FAIL_COMPARE
;
goto
cleanup
;
}
...
...
tests/networkxml2xmlupdatetest.c
浏览文件 @
239caffb
...
...
@@ -41,7 +41,7 @@ testCompareXMLToXMLFiles(const char *netxml, const char *updatexml,
goto
fail
;
if
(
!
expectFailure
)
{
if
(
vir
t
TestCompareToFile
(
actual
,
outxml
)
<
0
)
if
(
virTestCompareToFile
(
actual
,
outxml
)
<
0
)
goto
error
;
}
...
...
tests/nodeinfotest.c
浏览文件 @
239caffb
...
...
@@ -60,7 +60,7 @@ linuxTestCompareFiles(char *sysfs_prefix,
nodeinfo
.
cores
,
nodeinfo
.
threads
)
<
0
)
goto
fail
;
if
(
vir
t
TestCompareToFile
(
actualData
,
outputfile
)
<
0
)
if
(
virTestCompareToFile
(
actualData
,
outputfile
)
<
0
)
goto
fail
;
ret
=
0
;
...
...
@@ -137,7 +137,7 @@ linuxCPUStatsCompareFiles(const char *cpustatfile,
goto
fail
;
}
if
(
vir
t
TestCompareToFile
(
actualData
,
outfile
)
<
0
)
if
(
virTestCompareToFile
(
actualData
,
outfile
)
<
0
)
goto
fail
;
ret
=
0
;
...
...
tests/nwfilterxml2firewalltest.c
浏览文件 @
239caffb
...
...
@@ -405,7 +405,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
testRemoveCommonRules
(
actualargv
);
if
(
vir
t
TestCompareToFile
(
actualargv
,
cmdline
)
<
0
)
if
(
virTestCompareToFile
(
actualargv
,
cmdline
)
<
0
)
goto
cleanup
;
ret
=
0
;
...
...
tests/nwfilterxml2xmltest.c
浏览文件 @
239caffb
...
...
@@ -40,7 +40,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml,
if
(
!
(
actual
=
virNWFilterDefFormat
(
dev
)))
goto
fail
;
if
(
vir
t
TestCompareToFile
(
actual
,
outxml
)
<
0
)
if
(
virTestCompareToFile
(
actual
,
outxml
)
<
0
)
goto
fail
;
done:
...
...
tests/qemuargv2xmltest.c
浏览文件 @
239caffb
...
...
@@ -103,7 +103,7 @@ static int testCompareXMLToArgvFiles(const char *xmlfile,
if
(
!
(
actualxml
=
virDomainDefFormat
(
vmdef
,
driver
.
caps
,
0
)))
goto
fail
;
if
(
vir
t
TestCompareToFile
(
actualxml
,
xmlfile
)
<
0
)
if
(
virTestCompareToFile
(
actualxml
,
xmlfile
)
<
0
)
goto
fail
;
ret
=
0
;
...
...
tests/qemucapabilitiestest.c
浏览文件 @
239caffb
...
...
@@ -118,7 +118,7 @@ testQemuCaps(const void *opaque)
if
(
!
(
actual
=
virQEMUCapsFormatCache
(
capsActual
,
0
,
0
)))
goto
cleanup
;
if
(
vir
t
TestCompareToFile
(
actual
,
capsFile
)
<
0
)
if
(
virTestCompareToFile
(
actual
,
capsFile
)
<
0
)
goto
cleanup
;
ret
=
0
;
...
...
tests/qemucaps2xmltest.c
浏览文件 @
239caffb
...
...
@@ -145,7 +145,7 @@ testQemuCapsXML(const void *opaque)
if
(
!
capsXml
)
goto
cleanup
;
if
(
vir
t
TestCompareToFile
(
capsXml
,
xmlFile
)
<
0
)
if
(
virTestCompareToFile
(
capsXml
,
xmlFile
)
<
0
)
goto
cleanup
;
ret
=
0
;
...
...
tests/qemumonitorjsontest.c
浏览文件 @
239caffb
...
...
@@ -2189,7 +2189,7 @@ testQemuMonitorJSONGetCPUData(const void *opaque)
if
(
!
(
actual
=
cpuDataFormat
(
cpuData
)))
goto
cleanup
;
if
(
vir
t
TestCompareToFile
(
actual
,
dataFile
)
<
0
)
if
(
virTestCompareToFile
(
actual
,
dataFile
)
<
0
)
goto
cleanup
;
ret
=
0
;
...
...
tests/qemuxml2argvtest.c
浏览文件 @
239caffb
...
...
@@ -340,7 +340,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
if
(
!
(
actualargv
=
virCommandToString
(
cmd
)))
goto
out
;
if
(
vir
t
TestCompareToFile
(
actualargv
,
cmdline
)
<
0
)
if
(
virTestCompareToFile
(
actualargv
,
cmdline
)
<
0
)
goto
out
;
ret
=
0
;
...
...
tests/secretxml2xmltest.c
浏览文件 @
239caffb
...
...
@@ -21,7 +21,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml)
if
(
!
(
actual
=
virSecretDefFormat
(
secret
)))
goto
fail
;
if
(
vir
t
TestCompareToFile
(
actual
,
outxml
)
<
0
)
if
(
virTestCompareToFile
(
actual
,
outxml
)
<
0
)
goto
fail
;
ret
=
0
;
...
...
tests/sexpr2xmltest.c
浏览文件 @
239caffb
...
...
@@ -65,7 +65,7 @@ testCompareFiles(const char *xml, const char *sexpr)
if
(
!
(
gotxml
=
virDomainDefFormat
(
def
,
caps
,
0
)))
goto
fail
;
if
(
vir
t
TestCompareToFile
(
gotxml
,
xml
)
<
0
)
if
(
virTestCompareToFile
(
gotxml
,
xml
)
<
0
)
goto
fail
;
ret
=
0
;
...
...
tests/storagepoolxml2xmltest.c
浏览文件 @
239caffb
...
...
@@ -29,7 +29,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml)
if
(
!
(
actual
=
virStoragePoolDefFormat
(
dev
)))
goto
fail
;
if
(
vir
t
TestCompareToFile
(
actual
,
outxml
)
<
0
)
if
(
virTestCompareToFile
(
actual
,
outxml
)
<
0
)
goto
fail
;
ret
=
0
;
...
...
tests/storagevolxml2argvtest.c
浏览文件 @
239caffb
...
...
@@ -95,7 +95,7 @@ testCompareXMLToArgvFiles(bool shouldFail,
if
(
!
(
actualCmdline
=
virCommandToString
(
cmd
)))
goto
cleanup
;
if
(
vir
t
TestCompareToFile
(
actualCmdline
,
cmdline
)
<
0
)
if
(
virTestCompareToFile
(
actualCmdline
,
cmdline
)
<
0
)
goto
cleanup
;
ret
=
0
;
...
...
tests/storagevolxml2xmltest.c
浏览文件 @
239caffb
...
...
@@ -34,7 +34,7 @@ testCompareXMLToXMLFiles(const char *poolxml, const char *inxml,
if
(
!
(
actual
=
virStorageVolDefFormat
(
pool
,
dev
)))
goto
fail
;
if
(
vir
t
TestCompareToFile
(
actual
,
outxml
)
<
0
)
if
(
virTestCompareToFile
(
actual
,
outxml
)
<
0
)
goto
fail
;
ret
=
0
;
...
...
tests/sysinfotest.c
浏览文件 @
239caffb
...
...
@@ -79,7 +79,7 @@ testSysinfo(const void *data)
if
(
!
(
sysfsActualData
=
virBufferCurrentContent
(
&
buf
)))
goto
cleanup
;
if
(
vir
t
TestCompareToFile
(
sysfsActualData
,
testdata
->
expected
)
<
0
)
if
(
virTestCompareToFile
(
sysfsActualData
,
testdata
->
expected
)
<
0
)
goto
cleanup
;
result
=
0
;
...
...
tests/testutils.c
浏览文件 @
239caffb
...
...
@@ -686,8 +686,8 @@ int virtTestDifferenceBin(FILE *stream,
* @param filename: File to compare strcontent against
*/
int
vir
t
TestCompareToFile
(
const
char
*
strcontent
,
const
char
*
filename
)
virTestCompareToFile
(
const
char
*
strcontent
,
const
char
*
filename
)
{
int
ret
=
-
1
;
char
*
filecontent
=
NULL
;
...
...
@@ -1138,7 +1138,7 @@ testCompareDomXML2XMLFiles(virCapsPtr caps, virDomainXMLOptionPtr xmlopt,
goto
out
;
}
if
(
vir
t
TestCompareToFile
(
actual
,
outfile
)
<
0
)
{
if
(
virTestCompareToFile
(
actual
,
outfile
)
<
0
)
{
result
=
TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_COMPARE
;
goto
out
;
}
...
...
tests/testutils.h
浏览文件 @
239caffb
...
...
@@ -73,8 +73,8 @@ int virtTestDifferenceBin(FILE *stream,
const
char
*
expect
,
const
char
*
actual
,
size_t
length
);
int
vir
t
TestCompareToFile
(
const
char
*
strcontent
,
const
char
*
filename
);
int
virTestCompareToFile
(
const
char
*
strcontent
,
const
char
*
filename
);
unsigned
int
virTestGetDebug
(
void
);
unsigned
int
virTestGetVerbose
(
void
);
...
...
tests/vircaps2xmltest.c
浏览文件 @
239caffb
...
...
@@ -120,7 +120,7 @@ test_virCapabilitiesFormat(const void *opaque)
abs_srcdir
,
data
->
filename
)
<
0
)
goto
cleanup
;
if
(
vir
t
TestCompareToFile
(
capsXML
,
path
)
<
0
)
if
(
virTestCompareToFile
(
capsXML
,
path
)
<
0
)
goto
cleanup
;
ret
=
0
;
...
...
tests/vircgrouptest.c
浏览文件 @
239caffb
...
...
@@ -190,7 +190,7 @@ testCgroupDetectMounts(const void *args)
goto
cleanup
;
actual
=
virBufferCurrentContent
(
&
buf
);
if
(
vir
t
TestCompareToFile
(
actual
,
parsed
)
<
0
)
if
(
virTestCompareToFile
(
actual
,
parsed
)
<
0
)
goto
cleanup
;
result
=
0
;
...
...
tests/virnetdaemontest.c
浏览文件 @
239caffb
...
...
@@ -258,7 +258,7 @@ static int testExecRestart(const void *opaque)
if
(
!
(
outjsonstr
=
virJSONValueToString
(
outjson
,
true
)))
goto
cleanup
;
if
(
vir
t
TestCompareToFile
(
outjsonstr
,
outfile
)
<
0
)
if
(
virTestCompareToFile
(
outjsonstr
,
outfile
)
<
0
)
goto
cleanup
;
ret
=
0
;
...
...
tests/vmx2xmltest.c
浏览文件 @
239caffb
...
...
@@ -90,7 +90,7 @@ testCompareFiles(const char *vmx, const char *xml)
VIR_DOMAIN_DEF_FORMAT_SECURE
)))
goto
cleanup
;
if
(
vir
t
TestCompareToFile
(
formatted
,
xml
)
<
0
)
if
(
virTestCompareToFile
(
formatted
,
xml
)
<
0
)
goto
cleanup
;
ret
=
0
;
...
...
tests/xencapstest.c
浏览文件 @
239caffb
...
...
@@ -45,7 +45,7 @@ testCompareFiles(virArch hostmachine, const char *xml_rel,
if
(
!
(
actualxml
=
virCapabilitiesFormatXML
(
caps
)))
goto
fail
;
if
(
vir
t
TestCompareToFile
(
actualxml
,
xml
)
<
0
)
if
(
virTestCompareToFile
(
actualxml
,
xml
)
<
0
)
goto
fail
;
ret
=
0
;
...
...
tests/xlconfigtest.c
浏览文件 @
239caffb
...
...
@@ -79,7 +79,7 @@ testCompareParseXML(const char *xlcfg, const char *xml)
goto
fail
;
gotxlcfgData
[
wrote
]
=
'\0'
;
if
(
vir
t
TestCompareToFile
(
gotxlcfgData
,
xlcfg
)
<
0
)
if
(
virTestCompareToFile
(
gotxlcfgData
,
xlcfg
)
<
0
)
goto
fail
;
ret
=
0
;
...
...
@@ -124,7 +124,7 @@ testCompareFormatXML(const char *xlcfg, const char *xml)
VIR_DOMAIN_XML_SECURE
)))
goto
fail
;
if
(
vir
t
TestCompareToFile
(
gotxml
,
xml
)
<
0
)
if
(
virTestCompareToFile
(
gotxml
,
xml
)
<
0
)
goto
fail
;
ret
=
0
;
...
...
tests/xmconfigtest.c
浏览文件 @
239caffb
...
...
@@ -79,7 +79,7 @@ testCompareParseXML(const char *xmcfg, const char *xml)
goto
fail
;
gotxmcfgData
[
wrote
]
=
'\0'
;
if
(
vir
t
TestCompareToFile
(
gotxmcfgData
,
xmcfg
)
<
0
)
if
(
virTestCompareToFile
(
gotxmcfgData
,
xmcfg
)
<
0
)
goto
fail
;
ret
=
0
;
...
...
@@ -124,7 +124,7 @@ testCompareFormatXML(const char *xmcfg, const char *xml)
if
(
!
(
gotxml
=
virDomainDefFormat
(
def
,
caps
,
VIR_DOMAIN_DEF_FORMAT_SECURE
)))
goto
fail
;
if
(
vir
t
TestCompareToFile
(
gotxml
,
xml
)
<
0
)
if
(
virTestCompareToFile
(
gotxml
,
xml
)
<
0
)
goto
fail
;
ret
=
0
;
...
...
tests/xml2sexprtest.c
浏览文件 @
239caffb
...
...
@@ -39,7 +39,7 @@ testCompareFiles(const char *xml, const char *sexpr)
if
(
!
(
gotsexpr
=
xenFormatSxpr
(
NULL
,
def
)))
goto
fail
;
if
(
vir
t
TestCompareToFile
(
gotsexpr
,
sexpr
)
<
0
)
if
(
virTestCompareToFile
(
gotsexpr
,
sexpr
)
<
0
)
goto
fail
;
ret
=
0
;
...
...
tests/xml2vmxtest.c
浏览文件 @
239caffb
...
...
@@ -91,7 +91,7 @@ testCompareFiles(const char *xml, const char *vmx, int virtualHW_version)
if
(
formatted
==
NULL
)
goto
failure
;
if
(
vir
t
TestCompareToFile
(
formatted
,
vmx
)
<
0
)
if
(
virTestCompareToFile
(
formatted
,
vmx
)
<
0
)
goto
failure
;
result
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录