Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
0bd91c25
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看板
提交
0bd91c25
编写于
7月 18, 2007
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed compiler warnings
上级
f029721d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
39 addition
and
34 deletion
+39
-34
ChangeLog
ChangeLog
+5
-0
tests/xml2sexprtest.c
tests/xml2sexprtest.c
+23
-23
tests/xmlrpctest.c
tests/xmlrpctest.c
+11
-11
未找到文件。
ChangeLog
浏览文件 @
0bd91c25
Wed Jul 18 17:11:08 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* src/xmlrpctest.c, src/xml2sexprtest.c: More void * to
const void * conversions
Wed Jul 18 16:42:08 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* src/qemu_conf.c, src/qemu_conf.h, src/xm_internal.c,
...
...
tests/xml2sexprtest.c
浏览文件 @
0bd91c25
...
...
@@ -53,42 +53,42 @@ static int testCompareFiles(const char *xml, const char *sexpr, const char *name
return
ret
;
}
static
int
testComparePVversion1
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testComparePVversion1
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-pv.xml"
,
"xml2sexprdata/xml2sexpr-pv.sexpr"
,
"pvtest"
,
1
);
}
static
int
testCompareFVversion1
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testCompareFVversion1
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-fv.xml"
,
"xml2sexprdata/xml2sexpr-fv.sexpr"
,
"fvtest"
,
1
);
}
static
int
testComparePVversion2
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testComparePVversion2
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-pv.xml"
,
"xml2sexprdata/xml2sexpr-pv.sexpr"
,
"pvtest"
,
2
);
}
static
int
testCompareFVversion2
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testCompareFVversion2
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-fv.xml"
,
"xml2sexprdata/xml2sexpr-fv-v2.sexpr"
,
"fvtest"
,
2
);
}
static
int
testCompareFVversion2VNC
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testCompareFVversion2VNC
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-fv-vncunused.xml"
,
"xml2sexprdata/xml2sexpr-fv-vncunused.sexpr"
,
"fvtest"
,
2
);
}
static
int
testComparePVOrigVFB
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testComparePVOrigVFB
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-pv-vfb-orig.xml"
,
"xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr"
,
"pvtest"
,
...
...
@@ -96,105 +96,105 @@ static int testComparePVOrigVFB(void *data ATTRIBUTE_UNUSED) {
}
static
int
testComparePVNewVFB
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testComparePVNewVFB
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-pv-vfb-new.xml"
,
"xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr"
,
"pvtest"
,
3
);
}
static
int
testComparePVBootloader
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testComparePVBootloader
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-pv-bootloader.xml"
,
"xml2sexprdata/xml2sexpr-pv-bootloader.sexpr"
,
"pvtest"
,
1
);
}
static
int
testCompareDiskFile
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testCompareDiskFile
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-disk-file.xml"
,
"xml2sexprdata/xml2sexpr-disk-file.sexpr"
,
"pvtest"
,
2
);
}
static
int
testCompareDiskBlock
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testCompareDiskBlock
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-disk-block.xml"
,
"xml2sexprdata/xml2sexpr-disk-block.sexpr"
,
"pvtest"
,
2
);
}
static
int
testCompareDiskDrvLoop
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testCompareDiskDrvLoop
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-disk-drv-loop.xml"
,
"xml2sexprdata/xml2sexpr-disk-drv-loop.sexpr"
,
"pvtest"
,
2
);
}
static
int
testCompareDiskDrvBlkback
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testCompareDiskDrvBlkback
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-disk-drv-blkback.xml"
,
"xml2sexprdata/xml2sexpr-disk-drv-blkback.sexpr"
,
"pvtest"
,
2
);
}
static
int
testCompareDiskDrvBlktap
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testCompareDiskDrvBlktap
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-disk-drv-blktap.xml"
,
"xml2sexprdata/xml2sexpr-disk-drv-blktap.sexpr"
,
"pvtest"
,
2
);
}
static
int
testCompareDiskDrvBlktapQcow
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testCompareDiskDrvBlktapQcow
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-disk-drv-blktap-qcow.xml"
,
"xml2sexprdata/xml2sexpr-disk-drv-blktap-qcow.sexpr"
,
"pvtest"
,
2
);
}
static
int
testCompareDiskDrvBlktapRaw
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testCompareDiskDrvBlktapRaw
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-disk-drv-blktap-raw.xml"
,
"xml2sexprdata/xml2sexpr-disk-drv-blktap-raw.sexpr"
,
"pvtest"
,
2
);
}
static
int
testCompareMemoryResize
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testCompareMemoryResize
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-curmem.xml"
,
"xml2sexprdata/xml2sexpr-curmem.sexpr"
,
"rhel5"
,
2
);
}
static
int
testCompareNetRouted
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testCompareNetRouted
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-net-routed.xml"
,
"xml2sexprdata/xml2sexpr-net-routed.sexpr"
,
"pvtest"
,
2
);
}
static
int
testCompareNetBridged
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testCompareNetBridged
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-net-bridged.xml"
,
"xml2sexprdata/xml2sexpr-net-bridged.sexpr"
,
"pvtest"
,
2
);
}
static
int
testCompareNoSourceCDRom
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testCompareNoSourceCDRom
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-no-source-cdrom.xml"
,
"xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr"
,
"test"
,
2
);
}
static
int
testCompareFVclockUTC
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testCompareFVclockUTC
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-fv-utc.xml"
,
"xml2sexprdata/xml2sexpr-fv-utc.sexpr"
,
"fvtest"
,
1
);
}
static
int
testCompareFVclockLocaltime
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testCompareFVclockLocaltime
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-fv-localtime.xml"
,
"xml2sexprdata/xml2sexpr-fv-localtime.sexpr"
,
"fvtest"
,
...
...
@@ -202,14 +202,14 @@ static int testCompareFVclockLocaltime(void *data ATTRIBUTE_UNUSED) {
}
static
int
testCompareFVInputUSBMouse
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testCompareFVInputUSBMouse
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-fv-usbmouse.xml"
,
"xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr"
,
"fvtest"
,
1
);
}
static
int
testCompareFVInputUSBTablet
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testCompareFVInputUSBTablet
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"xml2sexprdata/xml2sexpr-fv-usbtablet.xml"
,
"xml2sexprdata/xml2sexpr-fv-usbtablet.sexpr"
,
"fvtest"
,
...
...
tests/xmlrpctest.c
浏览文件 @
0bd91c25
...
...
@@ -32,7 +32,7 @@ static char *progname;
static
int
testMethodPlusINT
(
void
*
data
)
testMethodPlusINT
(
const
void
*
data
)
{
int
retval
=
0
;
xmlRpcContextPtr
cxt
=
(
xmlRpcContextPtr
)
data
;
...
...
@@ -45,7 +45,7 @@ testMethodPlusINT(void *data)
}
static
int
testMethodPlusDOUBLE
(
void
*
data
)
testMethodPlusDOUBLE
(
const
void
*
data
)
{
double
retval
=
0
;
xmlRpcContextPtr
cxt
=
(
xmlRpcContextPtr
)
data
;
...
...
@@ -127,7 +127,7 @@ error:
}
static
int
testMarshalRequestINT
(
void
*
data
)
testMarshalRequestINT
(
const
void
*
data
)
{
int
num
=
INT_MAX
;
int
ret
=
0
;
...
...
@@ -144,7 +144,7 @@ testMarshalRequestINT(void *data)
}
static
int
testMarshalRequestSTRING
(
void
*
data
ATTRIBUTE_UNUSED
)
testMarshalRequestSTRING
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
const
char
*
str
=
"This library will be really sexy."
;
int
ret
=
0
;
...
...
@@ -160,7 +160,7 @@ testMarshalRequestSTRING(void *data ATTRIBUTE_UNUSED)
}
static
int
testMarshalRequestDOUBLE
(
void
*
data
)
testMarshalRequestDOUBLE
(
const
void
*
data
)
{
double
num
=
123456789
.
123
;
int
ret
=
0
;
...
...
@@ -177,7 +177,7 @@ testMarshalRequestDOUBLE(void *data)
}
static
int
testBufferStrcat
(
void
*
data
ATTRIBUTE_UNUSED
)
testBufferStrcat
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
virBufferPtr
buf
=
virBufferNew
(
1000
*
32
);
/* don't waste time with realloc */
int
i
;
...
...
@@ -190,7 +190,7 @@ testBufferStrcat(void *data ATTRIBUTE_UNUSED)
}
static
int
testBufferVSprintf
(
void
*
data
ATTRIBUTE_UNUSED
)
testBufferVSprintf
(
const
void
*
data
ATTRIBUTE_UNUSED
)
{
virBufferPtr
buf
=
virBufferNew
(
1000
*
32
);
/* don't waste time with realloc */
int
i
;
...
...
@@ -230,11 +230,11 @@ main(int argc, char **argv)
}
if
(
virtTestRun
(
"XML-RPC methodCall INT+INT"
,
NLOOPS
,
testMethodPlusINT
,
(
void
*
)
cxt
)
!=
0
)
NLOOPS
,
testMethodPlusINT
,
(
const
void
*
)
cxt
)
!=
0
)
ret
=
-
1
;
if
(
virtTestRun
(
"XML-RPC methodCall DOUBLE+DOUBLE"
,
NLOOPS
,
testMethodPlusDOUBLE
,
(
void
*
)
cxt
)
!=
0
)
NLOOPS
,
testMethodPlusDOUBLE
,
(
const
void
*
)
cxt
)
!=
0
)
ret
=
-
1
;
xmlRpcContextFree
(
cxt
);
...
...
@@ -243,14 +243,14 @@ main(int argc, char **argv)
* regression / performance tests
*/
if
(
virtTestRun
(
"XML-RPC request marshalling: INT (check)"
,
1
,
testMarshalRequestINT
,
(
void
*
)
&
check
)
!=
0
)
1
,
testMarshalRequestINT
,
(
const
void
*
)
&
check
)
!=
0
)
ret
=
-
1
;
if
(
virtTestRun
(
"XML-RPC request marshalling: INT"
,
NLOOPS
,
testMarshalRequestINT
,
NULL
)
!=
0
)
ret
=
-
1
;
if
(
virtTestRun
(
"XML-RPC request marshalling: DOUBLE (check)"
,
1
,
testMarshalRequestDOUBLE
,
(
void
*
)
&
check
)
!=
0
)
1
,
testMarshalRequestDOUBLE
,
(
const
void
*
)
&
check
)
!=
0
)
ret
=
-
1
;
if
(
virtTestRun
(
"XML-RPC request marshalling: DOUBLE"
,
NLOOPS
,
testMarshalRequestDOUBLE
,
NULL
)
!=
0
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录