Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
2dcdb7f6
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看板
提交
2dcdb7f6
编写于
3月 25, 2014
作者:
J
Ján Tomko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Indent top-level labels by one space in tests/
上级
9e7ecabf
变更
80
隐藏空白更改
内联
并排
Showing
80 changed file
with
300 addition
and
300 deletion
+300
-300
tests/commandhelper.c
tests/commandhelper.c
+1
-1
tests/commandtest.c
tests/commandtest.c
+17
-17
tests/cputest.c
tests/cputest.c
+9
-9
tests/domainconftest.c
tests/domainconftest.c
+1
-1
tests/domainsnapshotxml2xmltest.c
tests/domainsnapshotxml2xmltest.c
+3
-3
tests/esxutilstest.c
tests/esxutilstest.c
+2
-2
tests/fchosttest.c
tests/fchosttest.c
+4
-4
tests/fdstreamtest.c
tests/fdstreamtest.c
+2
-2
tests/jsontest.c
tests/jsontest.c
+2
-2
tests/libvirtdconftest.c
tests/libvirtdconftest.c
+2
-2
tests/lxcconf2xmltest.c
tests/lxcconf2xmltest.c
+2
-2
tests/lxcxml2xmltest.c
tests/lxcxml2xmltest.c
+1
-1
tests/metadatatest.c
tests/metadatatest.c
+2
-2
tests/networkxml2conftest.c
tests/networkxml2conftest.c
+1
-1
tests/networkxml2xmltest.c
tests/networkxml2xmltest.c
+1
-1
tests/networkxml2xmlupdatetest.c
tests/networkxml2xmlupdatetest.c
+3
-3
tests/nodeinfotest.c
tests/nodeinfotest.c
+4
-4
tests/nwfilterxml2xmltest.c
tests/nwfilterxml2xmltest.c
+1
-1
tests/objecteventtest.c
tests/objecteventtest.c
+8
-8
tests/openvzutilstest.c
tests/openvzutilstest.c
+2
-2
tests/qemuagenttest.c
tests/qemuagenttest.c
+9
-9
tests/qemuargv2xmltest.c
tests/qemuargv2xmltest.c
+1
-1
tests/qemucapabilitiestest.c
tests/qemucapabilitiestest.c
+3
-3
tests/qemuhelptest.c
tests/qemuhelptest.c
+1
-1
tests/qemuhotplugtest.c
tests/qemuhotplugtest.c
+2
-2
tests/qemumonitorjsontest.c
tests/qemumonitorjsontest.c
+31
-31
tests/qemumonitortestutils.c
tests/qemumonitortestutils.c
+12
-12
tests/qemuxml2argvtest.c
tests/qemuxml2argvtest.c
+6
-6
tests/qemuxml2xmltest.c
tests/qemuxml2xmltest.c
+1
-1
tests/qemuxmlnstest.c
tests/qemuxmlnstest.c
+1
-1
tests/secretxml2xmltest.c
tests/secretxml2xmltest.c
+2
-2
tests/securityselinuxlabeltest.c
tests/securityselinuxlabeltest.c
+3
-3
tests/securityselinuxtest.c
tests/securityselinuxtest.c
+2
-2
tests/sexpr2xmltest.c
tests/sexpr2xmltest.c
+1
-1
tests/storagebackendsheepdogtest.c
tests/storagebackendsheepdogtest.c
+3
-3
tests/storagepoolxml2xmltest.c
tests/storagepoolxml2xmltest.c
+1
-1
tests/storagevolxml2argvtest.c
tests/storagevolxml2argvtest.c
+2
-2
tests/storagevolxml2xmltest.c
tests/storagevolxml2xmltest.c
+1
-1
tests/sysinfotest.c
tests/sysinfotest.c
+2
-2
tests/test_conf.c
tests/test_conf.c
+1
-1
tests/testutils.c
tests/testutils.c
+1
-1
tests/testutilslxc.c
tests/testutilslxc.c
+1
-1
tests/testutilsqemu.c
tests/testutilsqemu.c
+6
-6
tests/testutilsxen.c
tests/testutilsxen.c
+1
-1
tests/virauthconfigtest.c
tests/virauthconfigtest.c
+1
-1
tests/virbitmaptest.c
tests/virbitmaptest.c
+9
-9
tests/virbuftest.c
tests/virbuftest.c
+2
-2
tests/vircapstest.c
tests/vircapstest.c
+2
-2
tests/vircgroupmock.c
tests/vircgroupmock.c
+2
-2
tests/vircgrouptest.c
tests/vircgrouptest.c
+12
-12
tests/virdbustest.c
tests/virdbustest.c
+6
-6
tests/virendiantest.c
tests/virendiantest.c
+2
-2
tests/virhashtest.c
tests/virhashtest.c
+10
-10
tests/virhostdevtest.c
tests/virhostdevtest.c
+10
-10
tests/viridentitytest.c
tests/viridentitytest.c
+3
-3
tests/viriscsitest.c
tests/viriscsitest.c
+2
-2
tests/virkeycodetest.c
tests/virkeycodetest.c
+2
-2
tests/virkeyfiletest.c
tests/virkeyfiletest.c
+1
-1
tests/virkmodtest.c
tests/virkmodtest.c
+4
-4
tests/virlockspacetest.c
tests/virlockspacetest.c
+7
-7
tests/virnetdevbandwidthtest.c
tests/virnetdevbandwidthtest.c
+1
-1
tests/virnetmessagetest.c
tests/virnetmessagetest.c
+5
-5
tests/virnetsockettest.c
tests/virnetsockettest.c
+7
-7
tests/virnettlscontexttest.c
tests/virnettlscontexttest.c
+1
-1
tests/virnettlssessiontest.c
tests/virnettlssessiontest.c
+1
-1
tests/virpcimock.c
tests/virpcimock.c
+9
-9
tests/virpcitest.c
tests/virpcitest.c
+11
-11
tests/virportallocatortest.c
tests/virportallocatortest.c
+2
-2
tests/virscsitest.c
tests/virscsitest.c
+3
-3
tests/virshtest.c
tests/virshtest.c
+1
-1
tests/virstoragetest.c
tests/virstoragetest.c
+3
-3
tests/virstringtest.c
tests/virstringtest.c
+4
-4
tests/viruritest.c
tests/viruritest.c
+1
-1
tests/virusbmock.c
tests/virusbmock.c
+1
-1
tests/virusbtest.c
tests/virusbtest.c
+2
-2
tests/vmwarevertest.c
tests/vmwarevertest.c
+1
-1
tests/vmx2xmltest.c
tests/vmx2xmltest.c
+4
-4
tests/xmconfigtest.c
tests/xmconfigtest.c
+1
-1
tests/xml2sexprtest.c
tests/xml2sexprtest.c
+1
-1
tests/xml2vmxtest.c
tests/xml2vmxtest.c
+4
-4
未找到文件。
tests/commandhelper.c
浏览文件 @
2dcdb7f6
...
...
@@ -156,7 +156,7 @@ int main(int argc, char **argv) {
return
EXIT_SUCCESS
;
error:
error:
return
EXIT_FAILURE
;
}
...
...
tests/commandtest.c
浏览文件 @
2dcdb7f6
...
...
@@ -93,7 +93,7 @@ static int checkoutput(const char *testname)
ret
=
0
;
cleanup:
cleanup:
if
(
actualname
)
unlink
(
actualname
);
VIR_FREE
(
actuallog
);
...
...
@@ -123,7 +123,7 @@ static int test0(const void *unused ATTRIBUTE_UNUSED)
virResetLastError
();
ret
=
0
;
cleanup:
cleanup:
virCommandFree
(
cmd
);
return
ret
;
}
...
...
@@ -152,7 +152,7 @@ static int test1(const void *unused ATTRIBUTE_UNUSED)
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
virCommandFree
(
cmd
);
return
ret
;
}
...
...
@@ -221,7 +221,7 @@ static int test3(const void *unused ATTRIBUTE_UNUSED)
ret
=
checkoutput
(
"test3"
);
cleanup:
cleanup:
virCommandFree
(
cmd
);
/* coverity[double_close] */
VIR_FORCE_CLOSE
(
newfd1
);
...
...
@@ -263,7 +263,7 @@ static int test4(const void *unused ATTRIBUTE_UNUSED)
ret
=
checkoutput
(
"test4"
);
cleanup:
cleanup:
virCommandFree
(
cmd
);
if
(
pidfile
)
unlink
(
pidfile
);
...
...
@@ -512,7 +512,7 @@ static int test13(const void *unused ATTRIBUTE_UNUSED)
ret
=
checkoutput
(
"test13"
);
cleanup:
cleanup:
virCommandFree
(
cmd
);
VIR_FREE
(
outactual
);
return
ret
;
...
...
@@ -584,7 +584,7 @@ static int test14(const void *unused ATTRIBUTE_UNUSED)
ret
=
checkoutput
(
"test14"
);
cleanup:
cleanup:
virCommandFree
(
cmd
);
VIR_FREE
(
outactual
);
VIR_FREE
(
erractual
);
...
...
@@ -615,7 +615,7 @@ static int test15(const void *unused ATTRIBUTE_UNUSED)
ret
=
checkoutput
(
"test15"
);
cleanup:
cleanup:
VIR_FREE
(
cwd
);
virCommandFree
(
cmd
);
...
...
@@ -661,7 +661,7 @@ static int test16(const void *unused ATTRIBUTE_UNUSED)
ret
=
checkoutput
(
"test16"
);
cleanup:
cleanup:
virCommandFree
(
cmd
);
VIR_FORCE_CLOSE
(
fd
);
VIR_FREE
(
outactual
);
...
...
@@ -718,7 +718,7 @@ static int test17(const void *unused ATTRIBUTE_UNUSED)
}
ret
=
0
;
cleanup:
cleanup:
virCommandFree
(
cmd
);
VIR_FREE
(
outbuf
);
VIR_FREE
(
errbuf
);
...
...
@@ -766,7 +766,7 @@ static int test18(const void *unused ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virCommandFree
(
cmd
);
if
(
pidfile
)
unlink
(
pidfile
);
...
...
@@ -806,7 +806,7 @@ static int test19(const void *unused ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virCommandFree
(
cmd
);
return
ret
;
}
...
...
@@ -841,7 +841,7 @@ static int test20(const void *unused ATTRIBUTE_UNUSED)
}
ret
=
checkoutput
(
"test20"
);
cleanup:
cleanup:
virCommandFree
(
cmd
);
VIR_FREE
(
buf
);
return
ret
;
...
...
@@ -900,7 +900,7 @@ static int test21(const void *unused ATTRIBUTE_UNUSED)
}
ret
=
checkoutput
(
"test21"
);
cleanup:
cleanup:
VIR_FREE
(
outbuf
);
VIR_FREE
(
errbuf
);
virCommandFree
(
cmd
);
...
...
@@ -957,7 +957,7 @@ test22(const void *unused ATTRIBUTE_UNUSED)
}
ret
=
0
;
cleanup:
cleanup:
virCommandFree
(
cmd
);
return
ret
;
}
...
...
@@ -1016,7 +1016,7 @@ test23(const void *unused ATTRIBUTE_UNUSED)
}
ret
=
0
;
cleanup:
cleanup:
return
ret
;
}
...
...
@@ -1178,7 +1178,7 @@ mymain(void)
}
virMutexUnlock
(
&
test
->
lock
);
cleanup:
cleanup:
if
(
test
->
running
)
virThreadJoin
(
&
test
->
thread
);
...
...
tests/cputest.c
浏览文件 @
2dcdb7f6
...
...
@@ -96,7 +96,7 @@ cpuTestLoadXML(const char *arch, const char *name)
cpu
=
virCPUDefParseXML
(
ctxt
->
node
,
ctxt
,
VIR_CPU_TYPE_AUTO
);
cleanup:
cleanup:
xmlXPathFreeContext
(
ctxt
);
xmlFreeDoc
(
doc
);
VIR_FREE
(
xml
);
...
...
@@ -136,14 +136,14 @@ cpuTestLoadMultiXML(const char *arch,
*
count
=
n
;
cleanup:
cleanup:
VIR_FREE
(
xml
);
VIR_FREE
(
nodes
);
xmlXPathFreeContext
(
ctxt
);
xmlFreeDoc
(
doc
);
return
cpus
;
cleanup_cpus:
cleanup_cpus:
for
(
i
=
0
;
i
<
n
;
i
++
)
virCPUDefFree
(
cpus
[
i
]);
VIR_FREE
(
cpus
);
...
...
@@ -181,7 +181,7 @@ cpuTestCompareXML(const char *arch,
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
xml
);
VIR_FREE
(
expected
);
VIR_FREE
(
actual
);
...
...
@@ -247,7 +247,7 @@ cpuTestCompare(const void *arg)
ret
=
0
;
cleanup:
cleanup:
virCPUDefFree
(
host
);
virCPUDefFree
(
cpu
);
return
ret
;
...
...
@@ -307,7 +307,7 @@ cpuTestGuestData(const void *arg)
ret
=
cpuTestCompareXML
(
data
->
arch
,
guest
,
result
,
0
);
cleanup:
cleanup:
VIR_FREE
(
result
);
cpuDataFree
(
guestData
);
virCPUDefFree
(
host
);
...
...
@@ -374,7 +374,7 @@ cpuTestBaseline(const void *arg)
ret
=
0
;
cleanup:
cleanup:
if
(
cpus
)
{
for
(
i
=
0
;
i
<
ncpus
;
i
++
)
virCPUDefFree
(
cpus
[
i
]);
...
...
@@ -408,7 +408,7 @@ cpuTestUpdate(const void *arg)
ret
=
cpuTestCompareXML
(
data
->
arch
,
cpu
,
result
,
VIR_DOMAIN_XML_UPDATE_CPU
);
cleanup:
cleanup:
virCPUDefFree
(
host
);
virCPUDefFree
(
cpu
);
VIR_FREE
(
result
);
...
...
@@ -449,7 +449,7 @@ cpuTestHasFeature(const void *arg)
ret
=
0
;
cleanup:
cleanup:
cpuDataFree
(
hostData
);
virCPUDefFree
(
host
);
return
ret
;
...
...
tests/domainconftest.c
浏览文件 @
2dcdb7f6
...
...
@@ -78,7 +78,7 @@ static int testGetFilesystem(const void *opaque)
ret
=
0
;
cleanup:
cleanup:
virDomainDefFree
(
def
);
VIR_FREE
(
xmlData
);
VIR_FREE
(
filename
);
...
...
tests/domainsnapshotxml2xmltest.c
浏览文件 @
2dcdb7f6
...
...
@@ -65,7 +65,7 @@ testFilterXML(char *xml)
ret
=
virBufferContentAndReset
(
&
buf
);
cleanup:
cleanup:
virBufferFreeAndReset
(
&
buf
);
virStringFreeList
(
xmlLines
);
return
ret
;
...
...
@@ -123,7 +123,7 @@ testCompareXMLToXMLFiles(const char *inxml,
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
inXmlData
);
VIR_FREE
(
outXmlData
);
VIR_FREE
(
actual
);
...
...
@@ -226,7 +226,7 @@ mymain(void)
DO_TEST_IN
(
"description_only"
,
NULL
);
DO_TEST_IN
(
"name_only"
,
NULL
);
cleanup:
cleanup:
if
(
testSnapshotXMLVariableLineRegex
)
regfree
(
testSnapshotXMLVariableLineRegex
);
VIR_FREE
(
testSnapshotXMLVariableLineRegex
);
...
...
tests/esxutilstest.c
浏览文件 @
2dcdb7f6
...
...
@@ -75,14 +75,14 @@ testParseDatastorePath(const void *data ATTRIBUTE_UNUSED)
}
}
cleanup:
cleanup:
VIR_FREE
(
datastoreName
);
VIR_FREE
(
directoryName
);
VIR_FREE
(
directoryAndFileName
);
return
result
;
failure:
failure:
result
=
-
1
;
goto
cleanup
;
...
...
tests/fchosttest.c
浏览文件 @
2dcdb7f6
...
...
@@ -107,7 +107,7 @@ test3(const void *data ATTRIBUTE_UNUSED)
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
wwnn
);
VIR_FREE
(
wwpn
);
VIR_FREE
(
fabric_wwn
);
...
...
@@ -133,7 +133,7 @@ test4(const void *data ATTRIBUTE_UNUSED)
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
hostname
);
return
ret
;
}
...
...
@@ -153,7 +153,7 @@ test5(const void *data ATTRIBUTE_UNUSED)
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
hostname
);
return
ret
;
}
...
...
@@ -180,7 +180,7 @@ mymain(void)
if
(
virtTestRun
(
"test5"
,
test5
,
NULL
)
<
0
)
ret
=
-
1
;
cleanup:
cleanup:
VIR_FREE
(
fchost_prefix
);
return
ret
;
}
...
...
tests/fdstreamtest.c
浏览文件 @
2dcdb7f6
...
...
@@ -147,7 +147,7 @@ static int testFDStreamReadCommon(const char *scratchdir, bool blocking)
}
ret
=
0
;
cleanup:
cleanup:
if
(
st
)
virStreamFree
(
st
);
VIR_FORCE_CLOSE
(
fd
);
...
...
@@ -290,7 +290,7 @@ static int testFDStreamWriteCommon(const char *scratchdir, bool blocking)
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
if
(
st
)
virStreamFree
(
st
);
VIR_FORCE_CLOSE
(
fd
);
...
...
tests/jsontest.c
浏览文件 @
2dcdb7f6
...
...
@@ -49,7 +49,7 @@ testJSONFromString(const void *data)
ret
=
0
;
cleanup:
cleanup:
virJSONValueFree
(
json
);
return
ret
;
}
...
...
@@ -122,7 +122,7 @@ testJSONAddRemove(const void *data)
}
ret
=
0
;
cleanup:
cleanup:
virJSONValueFree
(
json
);
virJSONValueFree
(
name
);
VIR_FREE
(
result
);
...
...
tests/libvirtdconftest.c
浏览文件 @
2dcdb7f6
...
...
@@ -153,7 +153,7 @@ testCorrupt(const void *opaque)
break
;
}
cleanup:
cleanup:
VIR_FREE
(
newdata
);
daemonConfigFree
(
conf
);
return
ret
;
...
...
@@ -232,7 +232,7 @@ mymain(void)
ret
=
-
1
;
}
cleanup:
cleanup:
VIR_FREE
(
filename
);
VIR_FREE
(
filedata
);
VIR_FREE
(
params
);
...
...
tests/lxcconf2xmltest.c
浏览文件 @
2dcdb7f6
...
...
@@ -53,7 +53,7 @@ testCompareXMLToConfigFiles(const char *xml,
ret
=
0
;
fail:
fail:
VIR_FREE
(
expectxml
);
VIR_FREE
(
actualxml
);
VIR_FREE
(
config
);
...
...
@@ -82,7 +82,7 @@ testCompareXMLToConfigHelper(const void *data)
result
=
testCompareXMLToConfigFiles
(
xml
,
config
,
info
->
expectError
);
cleanup:
cleanup:
VIR_FREE
(
xml
);
VIR_FREE
(
config
);
return
result
;
...
...
tests/lxcxml2xmltest.c
浏览文件 @
2dcdb7f6
...
...
@@ -101,7 +101,7 @@ testCompareXMLToXMLHelper(const void *data)
}
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
xml_in
);
VIR_FREE
(
xml_out
);
return
ret
;
...
...
tests/metadatatest.c
浏览文件 @
2dcdb7f6
...
...
@@ -76,7 +76,7 @@ getMetadataFromXML(virDomainPtr dom)
ret
=
virXMLNodeToString
(
node
->
doc
,
node
);
cleanup:
cleanup:
VIR_FREE
(
xml
);
xmlFreeDoc
(
doc
);
xmlXPathFreeContext
(
ctxt
);
...
...
@@ -156,7 +156,7 @@ verifyMetadata(virDomainPtr dom,
ret
=
true
;
cleanup:
cleanup:
VIR_FREE
(
metadataXML
);
VIR_FREE
(
metadataAPI
);
...
...
tests/networkxml2conftest.c
浏览文件 @
2dcdb7f6
...
...
@@ -93,7 +93,7 @@ testCompareXMLToConfHelper(const void *data)
result
=
testCompareXMLToConfFiles
(
inxml
,
outxml
,
info
->
caps
);
cleanup:
cleanup:
VIR_FREE
(
inxml
);
VIR_FREE
(
outxml
);
...
...
tests/networkxml2xmltest.c
浏览文件 @
2dcdb7f6
...
...
@@ -74,7 +74,7 @@ testCompareXMLToXMLHelper(const void *data)
result
=
testCompareXMLToXMLFiles
(
inxml
,
outxml
,
info
->
flags
);
cleanup:
cleanup:
VIR_FREE
(
inxml
);
VIR_FREE
(
outxml
);
...
...
tests/networkxml2xmlupdatetest.c
浏览文件 @
2dcdb7f6
...
...
@@ -56,7 +56,7 @@ testCompareXMLToXMLFiles(const char *netxml, const char *updatexml,
ret
=
0
;
fail:
fail:
if
(
expectFailure
)
{
if
(
ret
==
0
)
{
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
"Failed to fail."
);
...
...
@@ -66,7 +66,7 @@ fail:
ret
=
0
;
}
}
error:
error:
VIR_FREE
(
netXmlData
);
VIR_FREE
(
updateXmlData
);
VIR_FREE
(
outXmlData
);
...
...
@@ -109,7 +109,7 @@ testCompareXMLToXMLHelper(const void *data)
info
->
command
,
info
->
section
,
info
->
parentIndex
,
info
->
expectFailure
);
cleanup:
cleanup:
VIR_FREE
(
netxml
);
VIR_FREE
(
updatexml
);
VIR_FREE
(
outxml
);
...
...
tests/nodeinfotest.c
浏览文件 @
2dcdb7f6
...
...
@@ -73,7 +73,7 @@ linuxTestCompareFiles(const char *cpuinfofile,
ret
=
0
;
fail:
fail:
VIR_FREE
(
expectData
);
VIR_FREE
(
actualData
);
return
ret
;
...
...
@@ -157,7 +157,7 @@ linuxCPUStatsCompareFiles(const char *cpustatfile,
ret
=
0
;
fail:
fail:
virBufferFreeAndReset
(
&
buf
);
VIR_FORCE_FCLOSE
(
cpustat
);
VIR_FREE
(
expectData
);
...
...
@@ -193,7 +193,7 @@ linuxTestNodeInfo(const void *data)
result
=
linuxTestCompareFiles
(
cpuinfo
,
sysfs_dir
,
output
);
cleanup:
cleanup:
VIR_FREE
(
cpuinfo
);
VIR_FREE
(
output
);
VIR_FREE
(
sysfs_dir
);
...
...
@@ -223,7 +223,7 @@ linuxTestNodeCPUStats(const void *data)
result
=
linuxCPUStatsCompareFiles
(
cpustatfile
,
testData
->
ncpus
,
outfile
);
fail:
fail:
VIR_FREE
(
cpustatfile
);
VIR_FREE
(
outfile
);
return
result
;
...
...
tests/nwfilterxml2xmltest.c
浏览文件 @
2dcdb7f6
...
...
@@ -85,7 +85,7 @@ testCompareXMLToXMLHelper(const void *data)
result
=
testCompareXMLToXMLFiles
(
inxml
,
outxml
,
tp
->
expect_warning
);
cleanup:
cleanup:
VIR_FREE
(
inxml
);
VIR_FREE
(
outxml
);
...
...
tests/objecteventtest.c
浏览文件 @
2dcdb7f6
...
...
@@ -155,7 +155,7 @@ testDomainCreateXMLOld(const void *data)
registered
=
false
;
ret
=
0
;
cleanup:
cleanup:
if
(
registered
)
virConnectDomainEventDeregister
(
test
->
conn
,
domainLifecycleCb
);
if
(
dom
)
{
...
...
@@ -196,7 +196,7 @@ testDomainCreateXMLNew(const void *data)
id
=
-
1
;
ret
=
0
;
cleanup:
cleanup:
if
(
id
>=
0
)
virConnectDomainEventDeregisterAny
(
test
->
conn
,
id
);
if
(
dom
)
{
...
...
@@ -267,7 +267,7 @@ testDomainCreateXMLMixed(const void *data)
id2
=
-
1
;
ret
=
0
;
cleanup:
cleanup:
if
(
id1
>=
0
)
virConnectDomainEventDeregisterAny
(
test
->
conn
,
id1
);
if
(
id2
>=
0
)
...
...
@@ -327,7 +327,7 @@ testDomainDefine(const void *data)
}
cleanup:
cleanup:
virConnectDomainEventDeregisterAny
(
test
->
conn
,
id
);
if
(
dom
!=
NULL
)
virDomainFree
(
dom
);
...
...
@@ -388,7 +388,7 @@ testDomainStartStopEvent(const void *data)
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
virConnectDomainEventDeregisterAny
(
test
->
conn
,
id
);
virDomainFree
(
dom
);
if
(
dom2
)
...
...
@@ -426,7 +426,7 @@ testNetworkCreateXML(const void *data)
goto
cleanup
;
}
cleanup:
cleanup:
virConnectNetworkEventDeregisterAny
(
test
->
conn
,
id
);
virNetworkDestroy
(
net
);
...
...
@@ -478,7 +478,7 @@ testNetworkDefine(const void *data)
}
cleanup:
cleanup:
virConnectNetworkEventDeregisterAny
(
test
->
conn
,
id
);
virNetworkFree
(
net
);
...
...
@@ -512,7 +512,7 @@ testNetworkStartStopEvent(const void *data)
ret
=
-
1
;
goto
cleanup
;
}
cleanup:
cleanup:
virConnectNetworkEventDeregisterAny
(
test
->
conn
,
id
);
return
ret
;
...
...
tests/openvzutilstest.c
浏览文件 @
2dcdb7f6
...
...
@@ -64,7 +64,7 @@ testReadConfigParam(const void *data ATTRIBUTE_UNUSED)
result
=
0
;
cleanup:
cleanup:
VIR_FREE
(
conf
);
VIR_FREE
(
value
);
...
...
@@ -132,7 +132,7 @@ testReadNetworkConf(const void *data ATTRIBUTE_UNUSED)
result
=
0
;
cleanup:
cleanup:
VIR_FREE
(
actual
);
virDomainDefFree
(
def
);
...
...
tests/qemuagenttest.c
浏览文件 @
2dcdb7f6
...
...
@@ -75,7 +75,7 @@ testQemuAgentFSFreeze(const void *data)
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -125,7 +125,7 @@ testQemuAgentFSThaw(const void *data)
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -155,7 +155,7 @@ testQemuAgentFSTrim(const void *data)
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -201,7 +201,7 @@ testQemuAgentSuspend(const void *data)
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -264,7 +264,7 @@ qemuAgentShutdownTestMonitorHandler(qemuMonitorTestPtr test,
ret
=
0
;
cleanup:
cleanup:
virJSONValueFree
(
val
);
return
ret
;
...
...
@@ -349,7 +349,7 @@ testQemuAgentShutdown(const void *data)
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -467,7 +467,7 @@ testQemuAgentCPU(const void *data)
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
cpuinfo
);
qemuMonitorTestFree
(
test
);
return
ret
;
...
...
@@ -511,7 +511,7 @@ testQemuAgentArbitraryCommand(const void *data)
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
reply
);
qemuMonitorTestFree
(
test
);
return
ret
;
...
...
@@ -572,7 +572,7 @@ testQemuAgentTimeout(const void *data)
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
reply
);
qemuMonitorTestFree
(
test
);
return
ret
;
...
...
tests/qemuargv2xmltest.c
浏览文件 @
2dcdb7f6
...
...
@@ -114,7 +114,7 @@ testCompareXMLToArgvHelper(const void *data)
result
=
testCompareXMLToArgvFiles
(
xml
,
args
,
!!
info
->
extraFlags
);
cleanup:
cleanup:
VIR_FREE
(
xml
);
VIR_FREE
(
args
);
return
result
;
...
...
tests/qemucapabilitiestest.c
浏览文件 @
2dcdb7f6
...
...
@@ -80,7 +80,7 @@ testQemuFeedMonitor(char *replies,
return
test
;
error:
error:
qemuMonitorTestFree
(
test
);
return
NULL
;
}
...
...
@@ -126,7 +126,7 @@ testQemuGetCaps(char *caps)
xmlXPathFreeContext
(
ctxt
);
return
qemuCaps
;
error:
error:
VIR_FREE
(
nodes
);
virObjectUnref
(
qemuCaps
);
xmlFreeDoc
(
xml
);
...
...
@@ -203,7 +203,7 @@ testQemuCaps(const void *opaque)
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
repliesFile
);
VIR_FREE
(
capsFile
);
VIR_FREE
(
replies
);
...
...
tests/qemuhelptest.c
浏览文件 @
2dcdb7f6
...
...
@@ -118,7 +118,7 @@ static int testHelpStrParsing(const void *data)
}
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
path
);
VIR_FREE
(
help
);
virObjectUnref
(
flags
);
...
...
tests/qemuhotplugtest.c
浏览文件 @
2dcdb7f6
...
...
@@ -91,7 +91,7 @@ qemuHotplugCreateObjects(virDomainXMLOptionPtr xmlopt,
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
return
ret
;
}
...
...
@@ -296,7 +296,7 @@ testQemuHotplug(const void *data)
ret
=
testQemuHotplugUpdate
(
vm
,
dev
);
}
cleanup:
cleanup:
VIR_FREE
(
domain_filename
);
VIR_FREE
(
device_filename
);
VIR_FREE
(
result_filename
);
...
...
tests/qemumonitorjsontest.c
浏览文件 @
2dcdb7f6
...
...
@@ -201,7 +201,7 @@ testQemuMonitorJSONGetStatus(const void *data)
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -303,7 +303,7 @@ testQemuMonitorJSONGetVersion(const void *data)
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
VIR_FREE
(
package
);
return
ret
;
...
...
@@ -381,7 +381,7 @@ testQemuMonitorJSONGetMachines(const void *data)
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
for
(
i
=
0
;
i
<
ninfo
;
i
++
)
qemuMonitorMachineInfoFree
(
info
[
i
]);
...
...
@@ -448,7 +448,7 @@ testQemuMonitorJSONGetCPUDefinitions(const void *data)
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
for
(
i
=
0
;
i
<
ncpus
;
i
++
)
VIR_FREE
(
cpus
[
i
]);
...
...
@@ -513,7 +513,7 @@ testQemuMonitorJSONGetCommands(const void *data)
#undef CHECK
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
for
(
i
=
0
;
i
<
ncommands
;
i
++
)
VIR_FREE
(
commands
[
i
]);
...
...
@@ -568,7 +568,7 @@ testQemuMonitorJSONGetTPMModels(const void *data)
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
virStringFreeList
(
tpmmodels
);
return
ret
;
...
...
@@ -670,7 +670,7 @@ testQemuMonitorJSONGetCommandLineOptionParameters(const void *data)
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
virStringFreeList
(
params
);
return
ret
;
...
...
@@ -752,7 +752,7 @@ testQemuMonitorJSONAttachChardev(const void *data)
#undef CHECK_FAIL
#undef DO_CHECK
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -776,7 +776,7 @@ testQemuMonitorJSONDetachChardev(const void *data)
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -849,7 +849,7 @@ testQemuMonitorJSONGetListPaths(const void *data)
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
for
(
i
=
0
;
i
<
npaths
;
i
++
)
qemuMonitorJSONListPathFree
(
paths
[
i
]);
...
...
@@ -899,7 +899,7 @@ testQemuMonitorJSONGetObjectProperty(const void *data)
}
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -957,7 +957,7 @@ testQemuMonitorJSONSetObjectProperty(const void *data)
}
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -1017,7 +1017,7 @@ testQemuMonitorJSONGetDeviceAliases(const void *data)
}
}
cleanup:
cleanup:
virStringFreeList
(
aliases
);
qemuMonitorTestFree
(
test
);
return
ret
;
...
...
@@ -1077,7 +1077,7 @@ testQemuMonitorJSONCPU(const void *data)
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -1105,7 +1105,7 @@ testQemuMonitorJSONSimpleFunc(const void *opaque)
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -1242,7 +1242,7 @@ testQemuMonitorJSONqemuMonitorJSONGetCPUInfo(const void *data)
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
cpupids
);
qemuMonitorTestFree
(
test
);
return
ret
;
...
...
@@ -1279,7 +1279,7 @@ testQemuMonitorJSONqemuMonitorJSONGetBalloonInfo(const void *data)
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -1331,7 +1331,7 @@ testQemuMonitorJSONqemuMonitorJSONGetVirtType(const void *data)
}
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -1402,7 +1402,7 @@ testQemuMonitorJSONqemuMonitorJSONGetBlockInfo(const void *data)
}
ret
=
0
;
cleanup:
cleanup:
virHashFree
(
blockDevices
);
virHashFree
(
expectedBlockDevices
);
qemuMonitorTestFree
(
test
);
...
...
@@ -1615,7 +1615,7 @@ testQemuMonitorJSONqemuMonitorJSONGetBlockStatsInfo(const void *data)
#undef CHECK
#undef CHECK0
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -1651,7 +1651,7 @@ testQemuMonitorJSONqemuMonitorJSONGetMigrationCacheSize(const void *data)
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -1700,7 +1700,7 @@ testQemuMonitorJSONqemuMonitorJSONGetMigrationStatus(const void *data)
}
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -1739,7 +1739,7 @@ testQemuMonitorJSONqemuMonitorJSONGetSpiceMigrationStatus(const void *data)
}
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -1803,7 +1803,7 @@ testQemuMonitorJSONqemuMonitorJSONGetPtyPaths(const void *data)
}
ret
=
0
;
cleanup:
cleanup:
virHashFree
(
paths
);
virHashFree
(
expectedPaths
);
qemuMonitorTestFree
(
test
);
...
...
@@ -1847,7 +1847,7 @@ testQemuMonitorJSONqemuMonitorJSONSetBlockIoThrottle(const void *data)
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -1883,7 +1883,7 @@ testQemuMonitorJSONqemuMonitorJSONGetTargetArch(const void *data)
}
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
arch
);
qemuMonitorTestFree
(
test
);
return
ret
;
...
...
@@ -1929,7 +1929,7 @@ testQemuMonitorJSONqemuMonitorJSONGetMigrationCapability(const void *data)
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -1954,7 +1954,7 @@ testQemuMonitorJSONqemuMonitorJSONSendKey(const void *data)
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -1997,7 +1997,7 @@ testQemuMonitorJSONqemuMonitorJSONGetDumpGuestMemoryCapability(const void *data)
}
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
return
ret
;
}
...
...
@@ -2069,7 +2069,7 @@ testQemuMonitorJSONGetCPUData(const void *opaque)
}
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
jsonFile
);
VIR_FREE
(
dataFile
);
VIR_FREE
(
jsonStr
);
...
...
@@ -2118,7 +2118,7 @@ testQemuMonitorJSONGetNonExistingCPUData(const void *opaque)
}
ret
=
0
;
cleanup:
cleanup:
qemuMonitorTestFree
(
test
);
cpuDataFree
(
cpuData
);
return
ret
;
...
...
tests/qemumonitortestutils.c
浏览文件 @
2dcdb7f6
...
...
@@ -157,7 +157,7 @@ qemuMonitorReportError(qemuMonitorTestPtr test, const char *errmsg, ...)
ret
=
qemuMonitorTestAddReponse
(
test
,
jsonmsg
);
cleanup:
cleanup:
va_end
(
msgargs
);
VIR_FREE
(
msg
);
VIR_FREE
(
jsonmsg
);
...
...
@@ -269,7 +269,7 @@ qemuMonitorTestIO(virNetSocketPtr sock,
VIR_EVENT_HANDLE_ERROR
))
err
=
true
;
cleanup:
cleanup:
if
(
err
)
{
virNetSocketRemoveIOCallback
(
sock
);
virNetSocketClose
(
sock
);
...
...
@@ -404,7 +404,7 @@ qemuMonitorTestAddHandler(qemuMonitorTestPtr test,
return
0
;
error:
error:
if
(
freecb
)
(
freecb
)(
opaque
);
VIR_FREE
(
item
);
...
...
@@ -493,7 +493,7 @@ qemuMonitorTestProcessCommandDefault(qemuMonitorTestPtr test,
else
ret
=
qemuMonitorTestAddReponse
(
test
,
data
->
response
);
cleanup:
cleanup:
VIR_FREE
(
cmdcopy
);
virJSONValueFree
(
val
);
return
ret
;
...
...
@@ -563,7 +563,7 @@ qemuMonitorTestProcessGuestAgentSync(qemuMonitorTestPtr test,
ret
=
qemuMonitorTestAddReponse
(
test
,
retmsg
);
cleanup:
cleanup:
virJSONValueFree
(
val
);
VIR_FREE
(
retmsg
);
return
ret
;
...
...
@@ -653,7 +653,7 @@ qemuMonitorTestProcessCommandWithArgs(qemuMonitorTestPtr test,
/* arguments checked out, return the response */
ret
=
qemuMonitorTestAddReponse
(
test
,
data
->
response
);
cleanup:
cleanup:
VIR_FREE
(
argstr
);
virJSONValueFree
(
val
);
return
ret
;
...
...
@@ -706,7 +706,7 @@ qemuMonitorTestAddItemParams(qemuMonitorTestPtr test,
qemuMonitorTestProcessCommandWithArgs
,
data
,
qemuMonitorTestHandlerDataFree
);
error:
error:
va_end
(
args
);
qemuMonitorTestHandlerDataFree
(
data
);
return
-
1
;
...
...
@@ -804,10 +804,10 @@ qemuMonitorCommonTestNew(virDomainXMLOptionPtr xmlopt,
if
(
virNetSocketListen
(
test
->
server
,
1
)
<
0
)
goto
error
;
cleanup:
cleanup:
return
test
;
error:
error:
VIR_FREE
(
path
);
VIR_FREE
(
tmpdir_template
);
qemuMonitorTestFree
(
test
);
...
...
@@ -854,7 +854,7 @@ qemuMonitorCommonTestInit(qemuMonitorTestPtr test)
return
0
;
error:
error:
return
-
1
;
}
...
...
@@ -913,7 +913,7 @@ qemuMonitorTestNew(bool json,
return
test
;
error:
error:
virDomainChrSourceDefClear
(
&
src
);
qemuMonitorTestFree
(
test
);
return
NULL
;
...
...
@@ -944,7 +944,7 @@ qemuMonitorTestNewAgent(virDomainXMLOptionPtr xmlopt)
return
test
;
error:
error:
virDomainChrSourceDefClear
(
&
src
);
qemuMonitorTestFree
(
test
);
return
NULL
;
...
...
tests/qemuxml2argvtest.c
浏览文件 @
2dcdb7f6
...
...
@@ -103,7 +103,7 @@ fakeStoragePoolLookupByName(virConnectPtr conn,
ret
=
virGetStoragePool
(
conn
,
name
,
fakeUUID
,
NULL
,
NULL
);
cleanup:
cleanup:
VIR_FREE
(
xmlpath
);
return
ret
;
}
...
...
@@ -140,11 +140,11 @@ fakeStorageVolLookupByName(virStoragePoolPtr pool,
ret
=
virGetStorageVol
(
pool
->
conn
,
pool
->
name
,
volinfo
[
1
],
volinfo
[
0
],
NULL
,
NULL
);
cleanup:
cleanup:
virStringFreeList
(
volinfo
);
return
ret
;
fallback:
fallback:
ret
=
virGetStorageVol
(
pool
->
conn
,
pool
->
name
,
name
,
"block"
,
NULL
,
NULL
);
goto
cleanup
;
}
...
...
@@ -203,7 +203,7 @@ fakeStoragePoolGetXMLDesc(virStoragePoolPtr pool,
goto
cleanup
;
}
cleanup:
cleanup:
VIR_FREE
(
xmlpath
);
return
xmlbuf
;
...
...
@@ -403,7 +403,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
ret
=
0
;
out:
out:
VIR_FREE
(
log
);
VIR_FREE
(
expectargv
);
VIR_FREE
(
actualargv
);
...
...
@@ -444,7 +444,7 @@ testCompareXMLToArgvHelper(const void *data)
info
->
migrateFrom
,
info
->
migrateFd
,
flags
);
cleanup:
cleanup:
VIR_FREE
(
xml
);
VIR_FREE
(
args
);
return
result
;
...
...
tests/qemuxml2xmltest.c
浏览文件 @
2dcdb7f6
...
...
@@ -103,7 +103,7 @@ testCompareXMLToXMLHelper(const void *data)
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
xml_in
);
VIR_FREE
(
xml_out
);
return
ret
;
...
...
tests/qemuxmlnstest.c
浏览文件 @
2dcdb7f6
...
...
@@ -193,7 +193,7 @@ testCompareXMLToArgvHelper(const void *data)
info
->
migrateFrom
,
info
->
migrateFd
,
info
->
json
,
info
->
expectError
);
cleanup:
cleanup:
VIR_FREE
(
xml
);
VIR_FREE
(
args
);
return
result
;
...
...
tests/secretxml2xmltest.c
浏览文件 @
2dcdb7f6
...
...
@@ -35,7 +35,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml)
ret
=
0
;
fail:
fail:
VIR_FREE
(
inXmlData
);
VIR_FREE
(
outXmlData
);
VIR_FREE
(
actual
);
...
...
@@ -67,7 +67,7 @@ testCompareXMLToXMLHelper(const void *data)
result
=
testCompareXMLToXMLFiles
(
inxml
,
outxml
);
cleanup:
cleanup:
VIR_FREE
(
inxml
);
VIR_FREE
(
outxml
);
...
...
tests/securityselinuxlabeltest.c
浏览文件 @
2dcdb7f6
...
...
@@ -139,7 +139,7 @@ testSELinuxLoadFileList(const char *testname,
ret
=
0
;
cleanup:
cleanup:
VIR_FORCE_FCLOSE
(
fp
);
VIR_FREE
(
path
);
VIR_FREE
(
line
);
...
...
@@ -200,7 +200,7 @@ testSELinuxLoadDef(const char *testname)
testSELinuxMungePath
(
&
def
->
os
.
initrd
)
<
0
)
goto
cleanup
;
cleanup:
cleanup:
VIR_FREE
(
xmlfile
);
VIR_FREE
(
xmlstr
);
return
def
;
...
...
@@ -298,7 +298,7 @@ testSELinuxLabeling(const void *opaque)
ret
=
0
;
cleanup:
cleanup:
if
(
testSELinuxDeleteDisks
(
files
,
nfiles
)
<
0
)
VIR_WARN
(
"unable to fully clean up"
);
...
...
tests/securityselinuxtest.c
浏览文件 @
2dcdb7f6
...
...
@@ -93,7 +93,7 @@ testBuildDomainDef(bool dynamic,
return
def
;
error:
error:
virDomainDefFree
(
def
);
return
NULL
;
}
...
...
@@ -257,7 +257,7 @@ testSELinuxGenLabel(const void *opaque)
ret
=
0
;
cleanup:
cleanup:
context_free
(
con
);
context_free
(
imgcon
);
virDomainDefFree
(
def
);
...
...
tests/sexpr2xmltest.c
浏览文件 @
2dcdb7f6
...
...
@@ -108,7 +108,7 @@ testCompareHelper(const void *data)
result
=
testCompareFiles
(
xml
,
args
,
info
->
version
);
cleanup:
cleanup:
VIR_FREE
(
xml
);
VIR_FREE
(
args
);
...
...
tests/storagebackendsheepdogtest.c
浏览文件 @
2dcdb7f6
...
...
@@ -74,7 +74,7 @@ test_node_info_parser(collie_test test, char *poolxml)
pool
->
allocation
==
test
.
expected_allocation
)
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
output
);
VIR_FREE
(
poolXmlData
);
virStoragePoolDefFree
(
pool
);
...
...
@@ -118,7 +118,7 @@ test_vdi_list_parser(collie_test test, char *poolxml, char *volxml)
vol
->
allocation
==
test
.
expected_allocation
)
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
output
);
VIR_FREE
(
poolXmlData
);
VIR_FREE
(
volXmlData
);
...
...
@@ -203,7 +203,7 @@ mymain(void)
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
poolxml
);
VIR_FREE
(
volxml
);
return
ret
==
0
?
EXIT_SUCCESS
:
EXIT_FAILURE
;
...
...
tests/storagepoolxml2xmltest.c
浏览文件 @
2dcdb7f6
...
...
@@ -67,7 +67,7 @@ testCompareXMLToXMLHelper(const void *data)
result
=
testCompareXMLToXMLFiles
(
inxml
,
outxml
);
cleanup:
cleanup:
VIR_FREE
(
inxml
);
VIR_FREE
(
outxml
);
...
...
tests/storagevolxml2argvtest.c
浏览文件 @
2dcdb7f6
...
...
@@ -120,7 +120,7 @@ testCompareXMLToArgvFiles(bool shouldFail,
ret
=
0
;
cleanup:
cleanup:
virStoragePoolDefFree
(
pool
);
virStoragePoolDefFree
(
inputpool
);
virStorageVolDefFree
(
vol
);
...
...
@@ -181,7 +181,7 @@ testCompareXMLToArgvHelper(const void *data)
cmdline
,
info
->
flags
,
info
->
imgformat
);
cleanup:
cleanup:
VIR_FREE
(
poolxml
);
VIR_FREE
(
volxml
);
VIR_FREE
(
inputvolxml
);
...
...
tests/storagevolxml2xmltest.c
浏览文件 @
2dcdb7f6
...
...
@@ -86,7 +86,7 @@ testCompareXMLToXMLHelper(const void *data)
result
=
testCompareXMLToXMLFiles
(
poolxml
,
inxml
,
outxml
);
cleanup:
cleanup:
VIR_FREE
(
poolxml
);
VIR_FREE
(
inxml
);
VIR_FREE
(
outxml
);
...
...
tests/sysinfotest.c
浏览文件 @
2dcdb7f6
...
...
@@ -89,7 +89,7 @@ testSysinfo(const void *data)
result
=
0
;
cleanup:
cleanup:
VIR_FREE
(
sysfsExpectData
);
virSysinfoDefFree
(
ret
);
virBufferFreeAndReset
(
&
buf
);
...
...
@@ -123,7 +123,7 @@ sysinfotest_run(const char *test,
ret
=
EXIT_SUCCESS
;
error:
error:
VIR_FREE
(
testdata
.
decoder
);
VIR_FREE
(
testdata
.
sysinfo
);
VIR_FREE
(
testdata
.
cpuinfo
);
...
...
tests/test_conf.c
浏览文件 @
2dcdb7f6
...
...
@@ -42,7 +42,7 @@ int main(int argc, char **argv)
exit_code
=
EXIT_SUCCESS
;
cleanup:
cleanup:
VIR_FREE
(
buffer
);
return
exit_code
;
}
tests/testutils.c
浏览文件 @
2dcdb7f6
...
...
@@ -884,7 +884,7 @@ virCapsPtr virTestGenericCapsInit(void)
return
caps
;
error:
error:
virObjectUnref
(
caps
);
return
NULL
;
}
...
...
tests/testutilslxc.c
浏览文件 @
2dcdb7f6
...
...
@@ -49,7 +49,7 @@ virCapsPtr testLXCCapsInit(void)
return
caps
;
error:
error:
virObjectUnref
(
caps
);
return
NULL
;
}
...
...
tests/testutilsqemu.c
浏览文件 @
2dcdb7f6
...
...
@@ -80,7 +80,7 @@ static int testQemuAddPPC64Guest(virCapsPtr caps)
return
0
;
error:
error:
/* No way to free a guest? */
virCapabilitiesFreeMachines
(
machines
,
1
);
return
-
1
;
...
...
@@ -110,7 +110,7 @@ static int testQemuAddPPCGuest(virCapsPtr caps)
return
0
;
error:
error:
/* No way to free a guest? */
virCapabilitiesFreeMachines
(
machines
,
1
);
return
-
1
;
...
...
@@ -140,7 +140,7 @@ static int testQemuAddS390Guest(virCapsPtr caps)
return
0
;
error:
error:
virCapabilitiesFreeMachines
(
machines
,
ARRAY_CARDINALITY
(
s390_machines
));
return
-
1
;
}
...
...
@@ -170,7 +170,7 @@ static int testQemuAddArmGuest(virCapsPtr caps)
return
0
;
error:
error:
virCapabilitiesFreeMachines
(
capsmachines
,
ARRAY_CARDINALITY
(
machines
));
return
-
1
;
}
...
...
@@ -198,7 +198,7 @@ static int testQemuAddAARCH64Guest(virCapsPtr caps)
return
0
;
error:
error:
virCapabilitiesFreeMachines
(
capsmachines
,
ARRAY_CARDINALITY
(
machines
));
return
-
1
;
}
...
...
@@ -348,7 +348,7 @@ virCapsPtr testQemuCapsInit(void)
return
caps
;
cleanup:
cleanup:
virCapabilitiesFreeMachines
(
machines
,
nmachines
);
virObjectUnref
(
caps
);
return
NULL
;
...
...
tests/testutilsxen.c
浏览文件 @
2dcdb7f6
...
...
@@ -64,7 +64,7 @@ virCapsPtr testXenCapsInit(void)
return
caps
;
cleanup:
cleanup:
virCapabilitiesFreeMachines
(
machines
,
nmachines
);
virObjectUnref
(
caps
);
return
NULL
;
...
...
tests/virauthconfigtest.c
浏览文件 @
2dcdb7f6
...
...
@@ -78,7 +78,7 @@ static int testAuthLookup(const void *args)
}
ret
=
0
;
cleanup:
cleanup:
return
ret
;
}
...
...
tests/virbitmaptest.c
浏览文件 @
2dcdb7f6
...
...
@@ -57,7 +57,7 @@ test1(const void *data ATTRIBUTE_UNUSED)
ret
=
0
;
error:
error:
virBitmapFree
(
bitmap
);
return
ret
;
}
...
...
@@ -138,7 +138,7 @@ test2(const void *data ATTRIBUTE_UNUSED)
ret
=
0
;
error:
error:
virBitmapFree
(
bitmap
);
VIR_FREE
(
bitsString2
);
return
ret
;
...
...
@@ -166,7 +166,7 @@ test3(const void *data ATTRIBUTE_UNUSED)
goto
error
;
ret
=
0
;
error:
error:
virBitmapFree
(
bitmap
);
return
ret
;
}
...
...
@@ -261,7 +261,7 @@ test4(const void *data ATTRIBUTE_UNUSED)
virBitmapFree
(
bitmap
);
return
0
;
error:
error:
virBitmapFree
(
bitmap
);
return
-
1
;
}
...
...
@@ -308,7 +308,7 @@ test5(const void *v ATTRIBUTE_UNUSED)
goto
error
;
ret
=
0
;
error:
error:
virBitmapFree
(
bitmap
);
VIR_FREE
(
data2
);
return
ret
;
...
...
@@ -392,7 +392,7 @@ test6(const void *v ATTRIBUTE_UNUSED)
ret
=
0
;
error:
error:
virBitmapFree
(
bitmap
);
VIR_FREE
(
str
);
return
ret
;
...
...
@@ -433,7 +433,7 @@ test7(const void *v ATTRIBUTE_UNUSED)
return
0
;
error:
error:
virBitmapFree
(
bitmap
);
return
-
1
;
}
...
...
@@ -459,7 +459,7 @@ test8(const void *v ATTRIBUTE_UNUSED)
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
virBitmapFree
(
bitmap
);
return
ret
;
}
...
...
@@ -491,7 +491,7 @@ test9(const void *opaque ATTRIBUTE_UNUSED)
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
virBitmapFree
(
bitmap
);
return
ret
;
...
...
tests/virbuftest.c
浏览文件 @
2dcdb7f6
...
...
@@ -48,7 +48,7 @@ static int testBufInfiniteLoop(const void *data)
virBufferAsprintf
(
buf
,
"%s"
,
addstr
);
ret
=
0
;
out:
out:
bufret
=
virBufferContentAndReset
(
buf
);
if
(
!
bufret
)
{
TEST_ERROR
(
"Buffer had error set"
);
...
...
@@ -194,7 +194,7 @@ static int testBufTrim(const void *data ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virBufferFreeAndReset
(
buf
);
VIR_FREE
(
result
);
return
ret
;
...
...
tests/vircapstest.c
浏览文件 @
2dcdb7f6
...
...
@@ -74,7 +74,7 @@ buildNUMATopology(int seq)
return
caps
;
error:
error:
virCapabilitiesClearHostNUMACellCPUTopology
(
cell_cpus
,
MAX_CPUS_IN_CELL
);
VIR_FREE
(
cell_cpus
);
virObjectUnref
(
caps
);
...
...
@@ -108,7 +108,7 @@ test_virCapabilitiesGetCpusForNodemask(const void *data ATTRIBUTE_UNUSED)
ret
=
0
;
error:
error:
virObjectUnref
(
caps
);
virBitmapFree
(
nodemask
);
virBitmapFree
(
cpumap
);
...
...
tests/vircgroupmock.c
浏览文件 @
2dcdb7f6
...
...
@@ -168,7 +168,7 @@ static int make_file(const char *path,
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
if
(
fd
!=
-
1
&&
close
(
fd
)
<
0
)
ret
=
-
1
;
free
(
filepath
);
...
...
@@ -368,7 +368,7 @@ static int make_controller(const char *path, mode_t mode)
}
ret
=
0
;
cleanup:
cleanup:
return
ret
;
}
...
...
tests/vircgrouptest.c
浏览文件 @
2dcdb7f6
...
...
@@ -180,7 +180,7 @@ static int testCgroupNewForSelf(const void *args ATTRIBUTE_UNUSED)
ret
=
validateCgroup
(
cgroup
,
""
,
mountsFull
,
links
,
placement
);
cleanup:
cleanup:
virCgroupFree
(
&
cgroup
);
return
ret
;
}
...
...
@@ -266,7 +266,7 @@ static int testCgroupNewForPartition(const void *args ATTRIBUTE_UNUSED)
}
ret
=
validateCgroup
(
cgroup
,
"/virtualmachines.partition"
,
mountsFull
,
links
,
placementFull
);
cleanup:
cleanup:
virCgroupFree
(
&
cgroup
);
return
ret
;
}
...
...
@@ -315,7 +315,7 @@ static int testCgroupNewForPartitionNested(const void *args ATTRIBUTE_UNUSED)
ret
=
validateCgroup
(
cgroup
,
"/deployment.partition/production.partition"
,
mountsFull
,
links
,
placementFull
);
cleanup:
cleanup:
virCgroupFree
(
&
cgroup
);
return
ret
;
}
...
...
@@ -369,7 +369,7 @@ static int testCgroupNewForPartitionNestedDeep(const void *args ATTRIBUTE_UNUSED
ret
=
validateCgroup
(
cgroup
,
"/user/berrange.user/production.partition"
,
mountsFull
,
links
,
placementFull
);
cleanup:
cleanup:
virCgroupFree
(
&
cgroup
);
return
ret
;
}
...
...
@@ -405,7 +405,7 @@ static int testCgroupNewForPartitionDomain(const void *args ATTRIBUTE_UNUSED)
ret
=
validateCgroup
(
domaincgroup
,
"/production.partition/foo.libvirt-lxc"
,
mountsFull
,
links
,
placement
);
cleanup:
cleanup:
virCgroupFree
(
&
partitioncgroup
);
virCgroupFree
(
&
domaincgroup
);
return
ret
;
...
...
@@ -456,7 +456,7 @@ static int testCgroupNewForPartitionDomainEscaped(const void *args ATTRIBUTE_UNU
*/
ret
=
validateCgroup
(
domaincgroup
,
"/_cgroup.evil/net_cls.evil/__evil.evil/_cpu.foo.libvirt-lxc"
,
mountsFull
,
links
,
placement
);
cleanup:
cleanup:
virCgroupFree
(
&
partitioncgroup3
);
virCgroupFree
(
&
partitioncgroup2
);
virCgroupFree
(
&
partitioncgroup1
);
...
...
@@ -485,7 +485,7 @@ static int testCgroupNewForSelfAllInOne(const void *args ATTRIBUTE_UNUSED)
ret
=
validateCgroup
(
cgroup
,
""
,
mountsAllInOne
,
linksAllInOne
,
placement
);
cleanup:
cleanup:
virCgroupFree
(
&
cgroup
);
return
ret
;
}
...
...
@@ -513,7 +513,7 @@ static int testCgroupNewForSelfLogind(const void *args ATTRIBUTE_UNUSED)
ret
=
validateCgroup
(
cgroup
,
""
,
mountsLogind
,
linksLogind
,
placement
);
cleanup:
cleanup:
virCgroupFree
(
&
cgroup
);
return
ret
;
}
...
...
@@ -590,7 +590,7 @@ static int testCgroupGetPercpuStats(const void *args ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virCgroupFree
(
&
cgroup
);
return
ret
;
}
...
...
@@ -622,7 +622,7 @@ static int testCgroupGetMemoryUsage(const void *args ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virCgroupFree
(
&
cgroup
);
return
ret
;
}
...
...
@@ -672,7 +672,7 @@ static int testCgroupGetBlkioIoServiced(const void *args ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virCgroupFree
(
&
cgroup
);
return
ret
;
}
...
...
@@ -745,7 +745,7 @@ static int testCgroupGetBlkioIoDeviceServiced(const void *args ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virCgroupFree
(
&
cgroup
);
return
ret
;
}
...
...
tests/virdbustest.c
浏览文件 @
2dcdb7f6
...
...
@@ -117,7 +117,7 @@ static int testMessageSimple(const void *args ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
out_string
);
VIR_FREE
(
out_signature
);
VIR_FREE
(
out_objectpath
);
...
...
@@ -168,7 +168,7 @@ static int testMessageVariant(const void *args ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
out_str1
);
VIR_FREE
(
out_str2
);
dbus_message_unref
(
msg
);
...
...
@@ -221,7 +221,7 @@ static int testMessageArray(const void *args ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
out_str1
);
VIR_FREE
(
out_str2
);
dbus_message_unref
(
msg
);
...
...
@@ -311,7 +311,7 @@ static int testMessageArrayRef(const void *args ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
out_int32
);
VIR_FREE
(
out_str1
);
VIR_FREE
(
out_str2
);
...
...
@@ -386,7 +386,7 @@ static int testMessageStruct(const void *args ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
out_string
);
VIR_FREE
(
out_signature
);
VIR_FREE
(
out_objectpath
);
...
...
@@ -454,7 +454,7 @@ static int testMessageDict(const void *args ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
out_str1
);
VIR_FREE
(
out_str2
);
VIR_FREE
(
out_key1
);
...
...
tests/virendiantest.c
浏览文件 @
2dcdb7f6
...
...
@@ -51,7 +51,7 @@ test1(const void *data ATTRIBUTE_UNUSED)
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
return
ret
;
}
...
...
@@ -82,7 +82,7 @@ test2(const void *data ATTRIBUTE_UNUSED)
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
return
ret
;
}
...
...
tests/virhashtest.c
浏览文件 @
2dcdb7f6
...
...
@@ -121,7 +121,7 @@ testHashGrow(const void *data)
ret
=
0
;
cleanup:
cleanup:
virHashFree
(
hash
);
return
ret
;
}
...
...
@@ -163,7 +163,7 @@ testHashUpdate(const void *data ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virHashFree
(
hash
);
return
ret
;
}
...
...
@@ -195,7 +195,7 @@ testHashRemove(const void *data ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virHashFree
(
hash
);
return
ret
;
}
...
...
@@ -290,7 +290,7 @@ testHashRemoveForEach(const void *data)
ret
=
0
;
cleanup:
cleanup:
virHashFree
(
hash
);
return
ret
;
}
...
...
@@ -322,7 +322,7 @@ testHashSteal(const void *data ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virHashFree
(
hash
);
return
ret
;
}
...
...
@@ -393,7 +393,7 @@ testHashForEach(const void *data ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virHashFree
(
hash
);
return
ret
;
}
...
...
@@ -453,7 +453,7 @@ testHashRemoveSet(const void *data ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virHashFree
(
hash
);
return
ret
;
}
...
...
@@ -494,7 +494,7 @@ testHashSearch(const void *data ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virHashFree
(
hash
);
return
ret
;
}
...
...
@@ -577,7 +577,7 @@ testHashGetItems(const void *data ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
array
);
virHashFree
(
hash
);
return
ret
;
...
...
@@ -655,7 +655,7 @@ testHashEqual(const void *data ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virHashFree
(
hash1
);
virHashFree
(
hash2
);
return
ret
;
...
...
tests/virhostdevtest.c
浏览文件 @
2dcdb7f6
...
...
@@ -116,7 +116,7 @@ myInit(void)
return
0
;
cleanup:
cleanup:
myCleanup
();
return
-
1
;
}
...
...
@@ -139,7 +139,7 @@ virHostdevHostSupportsPassthroughKVM(void)
ret
=
true
;
# endif
cleanup:
cleanup:
VIR_FORCE_CLOSE
(
kvmfd
);
return
ret
;
...
...
@@ -206,7 +206,7 @@ testVirHostdevPreparePCIHostdevs_unmanaged(const void *oaque ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
return
ret
;
}
...
...
@@ -240,7 +240,7 @@ testVirHostdevReAttachPCIHostdevs_unmanaged(const void *oaque ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
return
ret
;
}
...
...
@@ -286,7 +286,7 @@ testVirHostdevPreparePCIHostdevs_managed(const void *oaque ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
return
ret
;
}
...
...
@@ -318,7 +318,7 @@ testVirHostdevReAttachPCIHostdevs_managed(const void *oaque ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
return
ret
;
}
...
...
@@ -339,7 +339,7 @@ testVirHostdevDetachPCINodeDevice(const void *oaque ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
return
ret
;
}
static
int
...
...
@@ -355,7 +355,7 @@ testVirHostdevResetPCINodeDevice(const void *oaque ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
return
ret
;
}
...
...
@@ -376,7 +376,7 @@ testVirHostdevReAttachPCINodeDevice(const void *oaque ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
return
ret
;
}
...
...
@@ -403,7 +403,7 @@ testVirHostdevUpdateActivePCIHostdevs(const void *oaque ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
return
ret
;
}
...
...
tests/viridentitytest.c
浏览文件 @
2dcdb7f6
...
...
@@ -91,7 +91,7 @@ static int testIdentityAttrs(const void *data ATTRIBUTE_UNUSED)
}
ret
=
0
;
cleanup:
cleanup:
virObjectUnref
(
ident
);
return
ret
;
}
...
...
@@ -158,7 +158,7 @@ static int testIdentityEqual(const void *data ATTRIBUTE_UNUSED)
}
ret
=
0
;
cleanup:
cleanup:
virObjectUnref
(
identa
);
virObjectUnref
(
identb
);
return
ret
;
...
...
@@ -195,7 +195,7 @@ static int testIdentityGetSystem(const void *data)
}
ret
=
0
;
cleanup:
cleanup:
virObjectUnref
(
ident
);
return
ret
;
}
...
...
tests/viriscsitest.c
浏览文件 @
2dcdb7f6
...
...
@@ -119,7 +119,7 @@ testISCSIGetSession(const void *data)
ret
=
0
;
cleanup:
cleanup:
virCommandSetDryRun
(
NULL
,
NULL
,
NULL
);
VIR_FREE
(
actual_session
);
return
ret
;
...
...
@@ -165,7 +165,7 @@ testISCSIScanTargets(const void *data)
ret
=
0
;
cleanup:
cleanup:
virCommandSetDryRun
(
NULL
,
NULL
,
NULL
);
for
(
i
=
0
;
i
<
ntargets
;
i
++
)
VIR_FREE
(
targets
[
i
]);
...
...
tests/virkeycodetest.c
浏览文件 @
2dcdb7f6
...
...
@@ -61,7 +61,7 @@ static int testKeycodeMapping(const void *data ATTRIBUTE_UNUSED)
#undef TRANSLATE
ret
=
0
;
cleanup:
cleanup:
return
ret
;
}
...
...
@@ -88,7 +88,7 @@ static int testKeycodeStrings(const void *data ATTRIBUTE_UNUSED)
#undef TRANSLATE
ret
=
0
;
cleanup:
cleanup:
return
ret
;
}
...
...
tests/virkeyfiletest.c
浏览文件 @
2dcdb7f6
...
...
@@ -101,7 +101,7 @@ static int testParse(const void *args ATTRIBUTE_UNUSED)
}
ret
=
0
;
cleanup:
cleanup:
virKeyFileFree
(
kf
);
return
ret
;
}
...
...
tests/virkmodtest.c
浏览文件 @
2dcdb7f6
...
...
@@ -52,7 +52,7 @@ testKModConfig(const void *args ATTRIBUTE_UNUSED)
}
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
outbuf
);
return
ret
;
}
...
...
@@ -80,7 +80,7 @@ checkOutput(virBufferPtr buf, const char *exp_cmd)
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
actual_cmd
);
return
ret
;
}
...
...
@@ -109,7 +109,7 @@ testKModLoad(const void *args)
ret
=
0
;
cleanup:
cleanup:
virCommandSetDryRun
(
NULL
,
NULL
,
NULL
);
VIR_FREE
(
errbuf
);
return
ret
;
...
...
@@ -138,7 +138,7 @@ testKModUnload(const void *args)
ret
=
0
;
cleanup:
cleanup:
virCommandSetDryRun
(
NULL
,
NULL
,
NULL
);
VIR_FREE
(
errbuf
);
return
ret
;
...
...
tests/virlockspacetest.c
浏览文件 @
2dcdb7f6
...
...
@@ -54,7 +54,7 @@ static int testLockSpaceCreate(const void *args ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virLockSpaceFree
(
lockspace
);
rmdir
(
LOCKSPACE_DIR
);
return
ret
;
...
...
@@ -88,7 +88,7 @@ static int testLockSpaceResourceLifecycle(const void *args ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virLockSpaceFree
(
lockspace
);
rmdir
(
LOCKSPACE_DIR
);
return
ret
;
...
...
@@ -134,7 +134,7 @@ static int testLockSpaceResourceLockExcl(const void *args ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virLockSpaceFree
(
lockspace
);
rmdir
(
LOCKSPACE_DIR
);
return
ret
;
...
...
@@ -172,7 +172,7 @@ static int testLockSpaceResourceLockExclAuto(const void *args ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virLockSpaceFree
(
lockspace
);
rmdir
(
LOCKSPACE_DIR
);
return
ret
;
...
...
@@ -226,7 +226,7 @@ static int testLockSpaceResourceLockShr(const void *args ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virLockSpaceFree
(
lockspace
);
rmdir
(
LOCKSPACE_DIR
);
return
ret
;
...
...
@@ -286,7 +286,7 @@ static int testLockSpaceResourceLockShrAuto(const void *args ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virLockSpaceFree
(
lockspace
);
rmdir
(
LOCKSPACE_DIR
);
return
ret
;
...
...
@@ -332,7 +332,7 @@ static int testLockSpaceResourceLockPath(const void *args ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virLockSpaceFree
(
lockspace
);
rmdir
(
LOCKSPACE_DIR
);
return
ret
;
...
...
tests/virnetdevbandwidthtest.c
浏览文件 @
2dcdb7f6
...
...
@@ -100,7 +100,7 @@ testVirNetDevBandwidthSet(const void *data)
}
ret
=
0
;
cleanup:
cleanup:
virCommandSetDryRun
(
NULL
,
NULL
,
NULL
);
virNetDevBandwidthFree
(
band
);
virBufferFreeAndReset
(
&
buf
);
...
...
tests/virnetmessagetest.c
浏览文件 @
2dcdb7f6
...
...
@@ -82,7 +82,7 @@ static int testMessageHeaderEncode(const void *args ATTRIBUTE_UNUSED)
}
ret
=
0
;
cleanup:
cleanup:
virNetMessageFree
(
msg
);
return
ret
;
}
...
...
@@ -178,7 +178,7 @@ static int testMessageHeaderDecode(const void *args ATTRIBUTE_UNUSED)
}
ret
=
0
;
cleanup:
cleanup:
virNetMessageFree
(
msg
);
return
ret
;
}
...
...
@@ -274,7 +274,7 @@ static int testMessagePayloadEncode(const void *args ATTRIBUTE_UNUSED)
}
ret
=
0
;
cleanup:
cleanup:
if
(
err
.
message
)
VIR_FREE
(
*
err
.
message
);
if
(
err
.
str1
)
...
...
@@ -449,7 +449,7 @@ static int testMessagePayloadDecode(const void *args ATTRIBUTE_UNUSED)
}
ret
=
0
;
cleanup:
cleanup:
xdr_free
((
xdrproc_t
)
xdr_virNetMessageError
,
(
void
*
)
&
err
);
virNetMessageFree
(
msg
);
return
ret
;
...
...
@@ -516,7 +516,7 @@ static int testMessagePayloadStreamEncode(const void *args ATTRIBUTE_UNUSED)
}
ret
=
0
;
cleanup:
cleanup:
virNetMessageFree
(
msg
);
return
ret
;
}
...
...
tests/virnetsockettest.c
浏览文件 @
2dcdb7f6
...
...
@@ -141,7 +141,7 @@ checkProtocols(bool *hasIPv4, bool *hasIPv6,
ret
=
0
;
cleanup:
cleanup:
VIR_FORCE_CLOSE
(
s4
);
VIR_FORCE_CLOSE
(
s6
);
return
ret
;
...
...
@@ -194,7 +194,7 @@ static int testSocketTCPAccept(const void *opaque)
ret
=
0
;
cleanup:
cleanup:
virObjectUnref
(
ssock
);
for
(
i
=
0
;
i
<
nlsock
;
i
++
)
virObjectUnref
(
lsock
[
i
]);
...
...
@@ -245,7 +245,7 @@ static int testSocketUNIXAccept(const void *data ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
path
);
virObjectUnref
(
lsock
);
virObjectUnref
(
ssock
);
...
...
@@ -323,7 +323,7 @@ static int testSocketUNIXAddrs(const void *data ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
path
);
virObjectUnref
(
lsock
);
virObjectUnref
(
ssock
);
...
...
@@ -356,7 +356,7 @@ static int testSocketCommandNormal(const void *data ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virObjectUnref
(
csock
);
return
ret
;
}
...
...
@@ -379,7 +379,7 @@ static int testSocketCommandFail(const void *data ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virObjectUnref
(
csock
);
return
ret
;
}
...
...
@@ -448,7 +448,7 @@ static int testSocketSSH(const void *opaque)
ret
=
0
;
cleanup:
cleanup:
virObjectUnref
(
csock
);
return
ret
;
}
...
...
tests/virnettlscontexttest.c
浏览文件 @
2dcdb7f6
...
...
@@ -101,7 +101,7 @@ static int testTLSContextInit(const void *opaque)
ret
=
0
;
cleanup:
cleanup:
virObjectUnref
(
ctxt
);
return
ret
;
}
...
...
tests/virnettlssessiontest.c
浏览文件 @
2dcdb7f6
...
...
@@ -223,7 +223,7 @@ static int testTLSSessionInit(const void *opaque)
ret
=
0
;
cleanup:
cleanup:
virObjectUnref
(
serverCtxt
);
virObjectUnref
(
clientCtxt
);
virObjectUnref
(
serverSess
);
...
...
tests/virpcimock.c
浏览文件 @
2dcdb7f6
...
...
@@ -219,7 +219,7 @@ pci_read_file(const char *path,
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
newpath
);
realclose
(
fd
);
return
ret
;
...
...
@@ -283,7 +283,7 @@ add_fd(int fd, const char *path)
callbacks
[
nCallbacks
++
].
fd
=
fd
;
ret
=
0
;
cleanup:
cleanup:
return
ret
;
}
...
...
@@ -307,7 +307,7 @@ remove_fd(int fd)
}
ret
=
0
;
cleanup:
cleanup:
return
ret
;
}
...
...
@@ -558,7 +558,7 @@ pci_driver_bind(struct pciDriver *driver,
dev
->
driver
=
driver
;
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
devpath
);
VIR_FREE
(
driverpath
);
return
ret
;
...
...
@@ -592,7 +592,7 @@ pci_driver_unbind(struct pciDriver *driver,
dev
->
driver
=
NULL
;
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
devpath
);
VIR_FREE
(
driverpath
);
return
ret
;
...
...
@@ -649,7 +649,7 @@ pci_driver_handle_bind(const char *path)
}
ret
=
pci_driver_bind
(
driver
,
dev
);
cleanup:
cleanup:
return
ret
;
}
...
...
@@ -666,7 +666,7 @@ pci_driver_handle_unbind(const char *path)
}
ret
=
pci_driver_unbind
(
dev
->
driver
,
dev
);
cleanup:
cleanup:
return
ret
;
}
static
int
...
...
@@ -720,7 +720,7 @@ pci_driver_handle_new_id(const char *path)
}
ret
=
0
;
cleanup:
cleanup:
return
ret
;
}
...
...
@@ -761,7 +761,7 @@ pci_driver_handle_remove_id(const char *path)
}
ret
=
0
;
cleanup:
cleanup:
return
ret
;
}
...
...
tests/virpcitest.c
浏览文件 @
2dcdb7f6
...
...
@@ -52,7 +52,7 @@ testVirPCIDeviceCheckDriver(virPCIDevicePtr dev, const char *expected)
}
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
path
);
VIR_FREE
(
driver
);
return
ret
;
...
...
@@ -77,7 +77,7 @@ testVirPCIDeviceNew(const void *opaque ATTRIBUTE_UNUSED)
}
ret
=
0
;
cleanup:
cleanup:
virPCIDeviceFree
(
dev
);
return
ret
;
}
...
...
@@ -122,7 +122,7 @@ testVirPCIDeviceDetach(const void *oaque ATTRIBUTE_UNUSED)
}
ret
=
0
;
cleanup:
cleanup:
for
(
i
=
0
;
i
<
nDev
;
i
++
)
virPCIDeviceFree
(
dev
[
i
]);
virObjectUnref
(
activeDevs
);
...
...
@@ -156,7 +156,7 @@ testVirPCIDeviceReset(const void *opaque ATTRIBUTE_UNUSED)
}
ret
=
0
;
cleanup:
cleanup:
for
(
i
=
0
;
i
<
nDev
;
i
++
)
virPCIDeviceFree
(
dev
[
i
]);
virObjectUnref
(
activeDevs
);
...
...
@@ -205,7 +205,7 @@ testVirPCIDeviceReattach(const void *opaque ATTRIBUTE_UNUSED)
}
ret
=
0
;
cleanup:
cleanup:
virObjectUnref
(
activeDevs
);
virObjectUnref
(
inactiveDevs
);
return
ret
;
...
...
@@ -233,7 +233,7 @@ testVirPCIDeviceIsAssignable(const void *opaque)
ret
=
0
;
virPCIDeviceFree
(
dev
);
cleanup:
cleanup:
return
ret
;
}
...
...
@@ -253,7 +253,7 @@ testVirPCIDeviceDetachSingle(const void *opaque)
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
virPCIDeviceFree
(
dev
);
return
ret
;
}
...
...
@@ -284,7 +284,7 @@ testVirPCIDeviceDetachFail(const void *opaque)
virPCIDeviceGetStubDriver
(
dev
));
}
cleanup:
cleanup:
virPCIDeviceFree
(
dev
);
return
ret
;
}
...
...
@@ -305,7 +305,7 @@ testVirPCIDeviceReattachSingle(const void *opaque)
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
virPCIDeviceFree
(
dev
);
return
ret
;
}
...
...
@@ -325,7 +325,7 @@ testVirPCIDeviceCheckDriverTest(const void *opaque)
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
virPCIDeviceFree
(
dev
);
return
ret
;
}
...
...
@@ -345,7 +345,7 @@ testVirPCIDeviceUnbind(const void *opaque)
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
virPCIDeviceFree
(
dev
);
return
ret
;
}
...
...
tests/virportallocatortest.c
浏览文件 @
2dcdb7f6
...
...
@@ -184,7 +184,7 @@ static int testAllocAll(const void *args ATTRIBUTE_UNUSED)
}
ret
=
0
;
cleanup:
cleanup:
virObjectUnref
(
alloc
);
return
ret
;
}
...
...
@@ -237,7 +237,7 @@ static int testAllocReuse(const void *args ATTRIBUTE_UNUSED)
}
ret
=
0
;
cleanup:
cleanup:
virObjectUnref
(
alloc
);
return
ret
;
}
...
...
tests/virscsitest.c
浏览文件 @
2dcdb7f6
...
...
@@ -47,7 +47,7 @@ test1(const void *data ATTRIBUTE_UNUSED)
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
name
);
return
ret
;
}
...
...
@@ -151,7 +151,7 @@ test2(const void *data ATTRIBUTE_UNUSED)
goto
cleanup
;
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
sgname
);
if
(
free_dev
)
virSCSIDeviceFree
(
dev
);
...
...
@@ -180,7 +180,7 @@ mymain(void)
if
(
virtTestRun
(
"test2"
,
test2
,
NULL
)
<
0
)
ret
=
-
1
;
cleanup:
cleanup:
VIR_FREE
(
virscsi_prefix
);
return
ret
;
}
...
...
tests/virshtest.c
浏览文件 @
2dcdb7f6
...
...
@@ -78,7 +78,7 @@ testCompareOutputLit(const char *expectData,
result
=
0
;
cleanup:
cleanup:
VIR_FREE
(
actualData
);
return
result
;
...
...
tests/virstoragetest.c
浏览文件 @
2dcdb7f6
...
...
@@ -186,14 +186,14 @@ testPrepImages(void)
#endif
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
buf
);
virCommandFree
(
cmd
);
if
(
ret
)
testCleanupImages
();
return
ret
;
skip:
skip:
fputs
(
"qemu-img is too old; skipping this test
\n
"
,
stderr
);
ret
=
EXIT_AM_SKIP
;
goto
cleanup
;
...
...
@@ -306,7 +306,7 @@ testStorageChain(const void *args)
}
ret
=
0
;
cleanup:
cleanup:
virStorageFileFreeMetadata
(
meta
);
return
ret
;
}
...
...
tests/virstringtest.c
浏览文件 @
2dcdb7f6
...
...
@@ -80,7 +80,7 @@ static int testSplit(const void *args)
}
ret
=
0
;
cleanup:
cleanup:
virStringFreeList
(
got
);
return
ret
;
...
...
@@ -103,7 +103,7 @@ static int testJoin(const void *args)
}
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
got
);
return
ret
;
...
...
@@ -192,7 +192,7 @@ testStrdup(const void *data ATTRIBUTE_UNUSED)
}
ret
=
0
;
cleanup:
cleanup:
for
(
i
=
0
;
i
<
ARRAY_CARDINALITY
(
array
);
i
++
)
VIR_FREE
(
array
[
i
]);
return
ret
;
...
...
@@ -228,7 +228,7 @@ testStrndupNegative(const void *opaque ATTRIBUTE_UNUSED)
}
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
dst
);
return
ret
;
}
...
...
tests/viruritest.c
浏览文件 @
2dcdb7f6
...
...
@@ -130,7 +130,7 @@ static int testURIParse(const void *args)
}
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
uristr
);
virURIFree
(
uri
);
return
ret
;
...
...
tests/virusbmock.c
浏览文件 @
2dcdb7f6
...
...
@@ -64,7 +64,7 @@ static char *get_fake_path(const char *real_path)
return
path
;
error:
error:
errno
=
ENOMEM
;
return
NULL
;
}
...
...
tests/virusbtest.c
浏览文件 @
2dcdb7f6
...
...
@@ -127,7 +127,7 @@ static int testDeviceFind(const void *opaque)
ret
=
0
;
cleanup:
cleanup:
virObjectUnref
(
devs
);
virUSBDeviceFree
(
dev
);
return
ret
;
...
...
@@ -226,7 +226,7 @@ testUSBList(const void *opaque ATTRIBUTE_UNUSED)
ret
=
0
;
cleanup:
cleanup:
virObjectUnref
(
list
);
virObjectUnref
(
devlist
);
virUSBDeviceFree
(
dev
);
...
...
tests/vmwarevertest.c
浏览文件 @
2dcdb7f6
...
...
@@ -66,7 +66,7 @@ testVerStrParse(const void *data)
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
path
);
VIR_FREE
(
databuf
);
return
ret
;
...
...
tests/vmx2xmltest.c
浏览文件 @
2dcdb7f6
...
...
@@ -65,7 +65,7 @@ testCapsInit(void)
return
;
failure:
failure:
virObjectUnref
(
caps
);
caps
=
NULL
;
}
...
...
@@ -103,7 +103,7 @@ testCompareFiles(const char *vmx, const char *xml)
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
vmxData
);
VIR_FREE
(
xmlData
);
VIR_FREE
(
formatted
);
...
...
@@ -134,7 +134,7 @@ testCompareHelper(const void *data)
ret
=
testCompareFiles
(
vmx
,
xml
);
cleanup:
cleanup:
VIR_FREE
(
vmx
);
VIR_FREE
(
xml
);
...
...
@@ -178,7 +178,7 @@ testParseVMXFileName(const char *fileName, void *opaque ATTRIBUTE_UNUSED)
goto
cleanup
;
}
cleanup:
cleanup:
VIR_FREE
(
copyOfFileName
);
return
src
;
...
...
tests/xmconfigtest.c
浏览文件 @
2dcdb7f6
...
...
@@ -188,7 +188,7 @@ testCompareHelper(const void *data)
else
result
=
testCompareFormatXML
(
cfg
,
xml
,
info
->
version
);
cleanup:
cleanup:
VIR_FREE
(
xml
);
VIR_FREE
(
cfg
);
...
...
tests/xml2sexprtest.c
浏览文件 @
2dcdb7f6
...
...
@@ -88,7 +88,7 @@ testCompareHelper(const void *data)
result
=
testCompareFiles
(
xml
,
args
,
info
->
version
);
cleanup:
cleanup:
VIR_FREE
(
xml
);
VIR_FREE
(
args
);
...
...
tests/xml2vmxtest.c
浏览文件 @
2dcdb7f6
...
...
@@ -66,7 +66,7 @@ testCapsInit(void)
return
;
failure:
failure:
virObjectUnref
(
caps
);
virObjectUnref
(
xmlopt
);
caps
=
NULL
;
...
...
@@ -115,7 +115,7 @@ testCompareFiles(const char *xml, const char *vmx, int virtualHW_version)
result
=
0
;
failure:
failure:
VIR_FREE
(
xmlData
);
VIR_FREE
(
vmxData
);
VIR_FREE
(
formatted
);
...
...
@@ -147,7 +147,7 @@ testCompareHelper(const void *data)
result
=
testCompareFiles
(
xml
,
vmx
,
info
->
virtualHW_version
);
cleanup:
cleanup:
VIR_FREE
(
xml
);
VIR_FREE
(
vmx
);
...
...
@@ -206,7 +206,7 @@ testFormatVMXFileName(const char *src, void *opaque ATTRIBUTE_UNUSED)
success
=
true
;
cleanup:
cleanup:
if
(
!
success
)
{
VIR_FREE
(
absolutePath
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录