Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
ae01530c
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ae01530c
编写于
1月 05, 2017
作者:
R
Roman Bogorodskiy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bhyve: add tests for SATA address allocation
上级
803966c7
变更
24
隐藏空白更改
内联
并排
Showing
24 changed file
with
1030 addition
and
7 deletion
+1030
-7
tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.args
...2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.args
+21
-0
tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.ldargs
...rgvdata/bhyvexml2argv-addr-more-than-32-sata-disks.ldargs
+3
-0
tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.xml
...l2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.xml
+196
-0
tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.args
...exml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.args
+9
-0
tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.ldargs
...ml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.ldargs
+3
-0
tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.xml
...vexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.xml
+31
-0
tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-more-than-32-sata-disks.xml
...a/bhyvexml2argv-addr-no32devs-more-than-32-sata-disks.xml
+196
-0
tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.args
...data/bhyvexml2argv-addr-no32devs-multiple-sata-disks.args
+11
-0
tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.ldargs
...ta/bhyvexml2argv-addr-no32devs-multiple-sata-disks.ldargs
+3
-0
tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.xml
...vdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.xml
+31
-0
tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.args
...rgvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.args
+9
-0
tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.ldargs
...vdata/bhyvexml2argv-addr-no32devs-single-sata-disk.ldargs
+3
-0
tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.xml
...argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.xml
+21
-0
tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.args
...hyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.args
+9
-0
tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.ldargs
...vexml2argvdata/bhyvexml2argv-addr-single-sata-disk.ldargs
+3
-0
tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.xml
...bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.xml
+21
-0
tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.args
...s/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.args
+1
-1
tests/bhyvexml2argvtest.c
tests/bhyvexml2argvtest.c
+19
-1
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-addr-more-than-32-sata-disks.xml
...loutdata/bhyvexml2xmlout-addr-more-than-32-sata-disks.xml
+246
-0
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-addr-multiple-sata-disks.xml
...l2xmloutdata/bhyvexml2xmlout-addr-multiple-sata-disks.xml
+45
-0
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-addr-no32devs-multiple-sata-disks.xml
...ata/bhyvexml2xmlout-addr-no32devs-multiple-sata-disks.xml
+51
-0
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-addr-no32devs-single-sata-disk.xml
...utdata/bhyvexml2xmlout-addr-no32devs-single-sata-disk.xml
+33
-0
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-addr-single-sata-disk.xml
...exml2xmloutdata/bhyvexml2xmlout-addr-single-sata-disk.xml
+33
-0
tests/bhyvexml2xmltest.c
tests/bhyvexml2xmltest.c
+32
-5
未找到文件。
tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.args
0 → 100644
浏览文件 @
ae01530c
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-u \
-H \
-P \
-s 0:0,hostbridge \
-s 2:0,ahci,hd:/tmp/freebsd1.img,hd:/tmp/freebsd2.img,hd:/tmp/freebsd3.img,\
hd:/tmp/freebsd4.img,hd:/tmp/freebsd5.img,hd:/tmp/freebsd6.img,\
hd:/tmp/freebsd7.img,hd:/tmp/freebsd8.img,hd:/tmp/freebsd9.img,\
hd:/tmp/freebsd10.img,hd:/tmp/freebsd11.img,hd:/tmp/freebsd12.img,\
hd:/tmp/freebsd12.img,hd:/tmp/freebsd13.img,hd:/tmp/freebsd14.img,\
hd:/tmp/freebsd15.img,hd:/tmp/freebsd16.img,hd:/tmp/freebsd17.img,\
hd:/tmp/freebsd18.img,hd:/tmp/freebsd19.img,hd:/tmp/freebsd20.img,\
hd:/tmp/freebsd21.img,hd:/tmp/freebsd22.img,hd:/tmp/freebsd23.img,\
hd:/tmp/freebsd24.img,hd:/tmp/freebsd25.img,hd:/tmp/freebsd26.img,\
hd:/tmp/freebsd27.img,hd:/tmp/freebsd28.img,hd:/tmp/freebsd29.img,\
hd:/tmp/freebsd30.img \
-s 3:0,ahci,hd:/tmp/freebsd31.img,hd:/tmp/freebsd32.img,hd:/tmp/freebsd33.img,\
hd:/tmp/freebsd34.img,hd:/tmp/freebsd35.img \
-s 4:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve
tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.ldargs
0 → 100644
浏览文件 @
ae01530c
/usr/sbin/bhyveload \
-m 214 \
-d /tmp/freebsd1.img bhyve
tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.xml
0 → 100644
浏览文件 @
ae01530c
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
df3be7e7-a104-11e3-aeb0-50e5492bd3dc
</uuid>
<memory>
219136
</memory>
<vcpu>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<devices>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd1.img'
/>
<target
dev=
'hda'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd2.img'
/>
<target
dev=
'hdb'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd3.img'
/>
<target
dev=
'hdc'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd4.img'
/>
<target
dev=
'hdd'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd5.img'
/>
<target
dev=
'hde'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd6.img'
/>
<target
dev=
'hdf'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd7.img'
/>
<target
dev=
'hdg'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd8.img'
/>
<target
dev=
'hdh'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd9.img'
/>
<target
dev=
'hdi'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd10.img'
/>
<target
dev=
'hdj'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd11.img'
/>
<target
dev=
'hdk'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd12.img'
/>
<target
dev=
'hdl'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd12.img'
/>
<target
dev=
'hdm'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd13.img'
/>
<target
dev=
'hdn'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd14.img'
/>
<target
dev=
'hdo'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd15.img'
/>
<target
dev=
'hdp'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd16.img'
/>
<target
dev=
'hdq'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd17.img'
/>
<target
dev=
'hdr'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd18.img'
/>
<target
dev=
'hds'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd19.img'
/>
<target
dev=
'hdt'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd20.img'
/>
<target
dev=
'hdu'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd21.img'
/>
<target
dev=
'hdv'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd22.img'
/>
<target
dev=
'hdw'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd23.img'
/>
<target
dev=
'hdx'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd24.img'
/>
<target
dev=
'hdy'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd25.img'
/>
<target
dev=
'hdz'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd26.img'
/>
<target
dev=
'hdaa'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd27.img'
/>
<target
dev=
'hdab'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd28.img'
/>
<target
dev=
'hdac'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd29.img'
/>
<target
dev=
'hdae'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd30.img'
/>
<target
dev=
'hdaf'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd31.img'
/>
<target
dev=
'hdag'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd32.img'
/>
<target
dev=
'hdah'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd33.img'
/>
<target
dev=
'hdai'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd34.img'
/>
<target
dev=
'hdaj'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd35.img'
/>
<target
dev=
'hdak'
bus=
'sata'
/>
</disk>
<interface
type=
'bridge'
>
<mac
address=
'52:54:00:b9:94:02'
/>
<model
type=
'virtio'
/>
<source
bridge=
"virbr0"
/>
</interface>
</devices>
</domain>
tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.args
0 → 100644
浏览文件 @
ae01530c
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-u \
-H \
-P \
-s 0:0,hostbridge \
-s 2:0,ahci,hd:/tmp/freebsd1.img,hd:/tmp/freebsd2.img,hd:/tmp/freebsd2.img \
-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve
tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.ldargs
0 → 100644
浏览文件 @
ae01530c
/usr/sbin/bhyveload \
-m 214 \
-d /tmp/freebsd1.img bhyve
tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.xml
0 → 100644
浏览文件 @
ae01530c
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
df3be7e7-a104-11e3-aeb0-50e5492bd3dc
</uuid>
<memory>
219136
</memory>
<vcpu>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<devices>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd1.img'
/>
<target
dev=
'hda'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd2.img'
/>
<target
dev=
'hdb'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd2.img'
/>
<target
dev=
'hdc'
bus=
'sata'
/>
</disk>
<interface
type=
'bridge'
>
<mac
address=
'52:54:00:b9:94:02'
/>
<model
type=
'virtio'
/>
<source
bridge=
"virbr0"
/>
</interface>
</devices>
</domain>
tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-more-than-32-sata-disks.xml
0 → 100644
浏览文件 @
ae01530c
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
df3be7e7-a104-11e3-aeb0-50e5492bd3dc
</uuid>
<memory>
219136
</memory>
<vcpu>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<devices>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd1.img'
/>
<target
dev=
'hda'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd2.img'
/>
<target
dev=
'hdb'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd3.img'
/>
<target
dev=
'hdc'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd4.img'
/>
<target
dev=
'hdd'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd5.img'
/>
<target
dev=
'hde'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd6.img'
/>
<target
dev=
'hdf'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd7.img'
/>
<target
dev=
'hdg'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd8.img'
/>
<target
dev=
'hdh'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd9.img'
/>
<target
dev=
'hdi'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd10.img'
/>
<target
dev=
'hdj'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd11.img'
/>
<target
dev=
'hdk'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd12.img'
/>
<target
dev=
'hdl'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd12.img'
/>
<target
dev=
'hdm'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd13.img'
/>
<target
dev=
'hdn'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd14.img'
/>
<target
dev=
'hdo'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd15.img'
/>
<target
dev=
'hdp'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd16.img'
/>
<target
dev=
'hdq'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd17.img'
/>
<target
dev=
'hdr'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd18.img'
/>
<target
dev=
'hds'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd19.img'
/>
<target
dev=
'hdt'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd20.img'
/>
<target
dev=
'hdu'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd21.img'
/>
<target
dev=
'hdv'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd22.img'
/>
<target
dev=
'hdw'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd23.img'
/>
<target
dev=
'hdx'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd24.img'
/>
<target
dev=
'hdy'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd25.img'
/>
<target
dev=
'hdz'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd26.img'
/>
<target
dev=
'hdaa'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd27.img'
/>
<target
dev=
'hdab'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd28.img'
/>
<target
dev=
'hdac'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd29.img'
/>
<target
dev=
'hdae'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd30.img'
/>
<target
dev=
'hdaf'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd31.img'
/>
<target
dev=
'hdag'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd32.img'
/>
<target
dev=
'hdah'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd33.img'
/>
<target
dev=
'hdai'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd34.img'
/>
<target
dev=
'hdaj'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd35.img'
/>
<target
dev=
'hdak'
bus=
'sata'
/>
</disk>
<interface
type=
'bridge'
>
<mac
address=
'52:54:00:b9:94:02'
/>
<model
type=
'virtio'
/>
<source
bridge=
"virbr0"
/>
</interface>
</devices>
</domain>
tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.args
0 → 100644
浏览文件 @
ae01530c
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-u \
-H \
-P \
-s 0:0,hostbridge \
-s 2:0,ahci-hd,/tmp/freebsd1.img \
-s 3:0,ahci-hd,/tmp/freebsd2.img \
-s 4:0,ahci-hd,/tmp/freebsd2.img \
-s 5:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve
tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.ldargs
0 → 100644
浏览文件 @
ae01530c
/usr/sbin/bhyveload \
-m 214 \
-d /tmp/freebsd1.img bhyve
tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.xml
0 → 100644
浏览文件 @
ae01530c
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
df3be7e7-a104-11e3-aeb0-50e5492bd3dc
</uuid>
<memory>
219136
</memory>
<vcpu>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<devices>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd1.img'
/>
<target
dev=
'hda'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd2.img'
/>
<target
dev=
'hdb'
bus=
'sata'
/>
</disk>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd2.img'
/>
<target
dev=
'hdc'
bus=
'sata'
/>
</disk>
<interface
type=
'bridge'
>
<mac
address=
'52:54:00:b9:94:02'
/>
<model
type=
'virtio'
/>
<source
bridge=
"virbr0"
/>
</interface>
</devices>
</domain>
tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.args
0 → 100644
浏览文件 @
ae01530c
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-u \
-H \
-P \
-s 0:0,hostbridge \
-s 2:0,ahci-hd,/tmp/freebsd.img \
-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve
tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.ldargs
0 → 100644
浏览文件 @
ae01530c
/usr/sbin/bhyveload \
-m 214 \
-d /tmp/freebsd.img bhyve
tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.xml
0 → 100644
浏览文件 @
ae01530c
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
df3be7e7-a104-11e3-aeb0-50e5492bd3dc
</uuid>
<memory>
219136
</memory>
<vcpu>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<devices>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'hda'
bus=
'sata'
/>
</disk>
<interface
type=
'bridge'
>
<mac
address=
'52:54:00:b9:94:02'
/>
<model
type=
'virtio'
/>
<source
bridge=
"virbr0"
/>
</interface>
</devices>
</domain>
tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.args
0 → 100644
浏览文件 @
ae01530c
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-u \
-H \
-P \
-s 0:0,hostbridge \
-s 2:0,ahci,hd:/tmp/freebsd.img \
-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve
tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.ldargs
0 → 100644
浏览文件 @
ae01530c
/usr/sbin/bhyveload \
-m 214 \
-d /tmp/freebsd.img bhyve
tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.xml
0 → 100644
浏览文件 @
ae01530c
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
df3be7e7-a104-11e3-aeb0-50e5492bd3dc
</uuid>
<memory>
219136
</memory>
<vcpu>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<devices>
<disk
type=
'file'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'hda'
bus=
'sata'
/>
</disk>
<interface
type=
'bridge'
>
<mac
address=
'52:54:00:b9:94:02'
/>
<model
type=
'virtio'
/>
<source
bridge=
"virbr0"
/>
</interface>
</devices>
</domain>
tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.args
浏览文件 @
ae01530c
...
...
@@ -5,7 +5,7 @@
-H \
-P \
-s 0:0,hostbridge \
-s 2:0,ahci
,hd:
/tmp/freebsd.img \
-s 2:0,ahci
-hd,
/tmp/freebsd.img \
-s 3:0,virtio-net,faketapdev,mac=52:54:00:a7:cd:5b \
-s 1,lpc \
-l com1,/dev/nmdm0A bhyve
tests/bhyvexml2argvtest.c
浏览文件 @
ae01530c
...
...
@@ -37,8 +37,15 @@ static int testCompareXMLToArgvFiles(const char *xml,
if
(
!
(
vmdef
=
virDomainDefParseFile
(
xml
,
driver
.
caps
,
driver
.
xmlopt
,
NULL
,
VIR_DOMAIN_DEF_PARSE_INACTIVE
)))
{
if
(
flags
&
FLAG_EXPECT_PARSE_ERROR
)
if
(
flags
&
FLAG_EXPECT_PARSE_ERROR
)
{
ret
=
0
;
}
else
if
(
flags
&
FLAG_EXPECT_FAILURE
)
{
ret
=
0
;
VIR_TEST_DEBUG
(
"Got expected error: %s
\n
"
,
virGetLastErrorMessage
());
virResetLastError
();
}
goto
out
;
}
...
...
@@ -179,6 +186,17 @@ mymain(void)
DO_TEST
(
"serial-grub"
);
DO_TEST
(
"localtime"
);
/* Address allocation tests */
DO_TEST
(
"addr-single-sata-disk"
);
DO_TEST
(
"addr-multiple-sata-disks"
);
DO_TEST
(
"addr-more-than-32-sata-disks"
);
/* The same without 32 devs per controller support */
driver
.
bhyvecaps
^=
BHYVE_CAP_AHCI32SLOT
;
DO_TEST
(
"addr-no32devs-single-sata-disk"
);
DO_TEST
(
"addr-no32devs-multiple-sata-disks"
);
DO_TEST_FAILURE
(
"addr-no32devs-more-than-32-sata-disks"
);
driver
.
grubcaps
=
0
;
DO_TEST
(
"serial-grub-nocons"
);
...
...
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-addr-more-than-32-sata-disks.xml
0 → 100644
浏览文件 @
ae01530c
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
df3be7e7-a104-11e3-aeb0-50e5492bd3dc
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type
arch=
'x86_64'
>
hvm
</type>
<boot
dev=
'hd'
/>
</os>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd1.img'
/>
<target
dev=
'hda'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd2.img'
/>
<target
dev=
'hdb'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'1'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd3.img'
/>
<target
dev=
'hdc'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'2'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd4.img'
/>
<target
dev=
'hdd'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'3'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd5.img'
/>
<target
dev=
'hde'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'4'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd6.img'
/>
<target
dev=
'hdf'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'5'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd7.img'
/>
<target
dev=
'hdg'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'6'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd8.img'
/>
<target
dev=
'hdh'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'7'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd9.img'
/>
<target
dev=
'hdi'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'8'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd10.img'
/>
<target
dev=
'hdj'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'9'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd11.img'
/>
<target
dev=
'hdk'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'10'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd12.img'
/>
<target
dev=
'hdl'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'11'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd12.img'
/>
<target
dev=
'hdm'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'12'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd13.img'
/>
<target
dev=
'hdn'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'13'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd14.img'
/>
<target
dev=
'hdo'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'14'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd15.img'
/>
<target
dev=
'hdp'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'15'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd16.img'
/>
<target
dev=
'hdq'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'16'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd17.img'
/>
<target
dev=
'hdr'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'17'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd18.img'
/>
<target
dev=
'hds'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'18'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd19.img'
/>
<target
dev=
'hdt'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'19'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd20.img'
/>
<target
dev=
'hdu'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'20'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd21.img'
/>
<target
dev=
'hdv'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'21'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd22.img'
/>
<target
dev=
'hdw'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'22'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd23.img'
/>
<target
dev=
'hdx'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'23'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd24.img'
/>
<target
dev=
'hdy'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'24'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd25.img'
/>
<target
dev=
'hdz'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'25'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd26.img'
/>
<target
dev=
'hdaa'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'26'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd27.img'
/>
<target
dev=
'hdab'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'27'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd28.img'
/>
<target
dev=
'hdac'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'28'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd29.img'
/>
<target
dev=
'hdae'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'30'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd30.img'
/>
<target
dev=
'hdaf'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'31'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd31.img'
/>
<target
dev=
'hdag'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'1'
bus=
'0'
target=
'0'
unit=
'0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd32.img'
/>
<target
dev=
'hdah'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'1'
bus=
'0'
target=
'0'
unit=
'1'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd33.img'
/>
<target
dev=
'hdai'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'1'
bus=
'0'
target=
'0'
unit=
'2'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd34.img'
/>
<target
dev=
'hdaj'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'1'
bus=
'0'
target=
'0'
unit=
'3'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd35.img'
/>
<target
dev=
'hdak'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'1'
bus=
'0'
target=
'0'
unit=
'4'
/>
</disk>
<controller
type=
'pci'
index=
'0'
model=
'pci-root'
/>
<controller
type=
'sata'
index=
'0'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x02'
function=
'0x0'
/>
</controller>
<controller
type=
'sata'
index=
'1'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x03'
function=
'0x0'
/>
</controller>
<interface
type=
'bridge'
>
<mac
address=
'52:54:00:b9:94:02'
/>
<source
bridge=
'virbr0'
/>
<model
type=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x04'
function=
'0x0'
/>
</interface>
</devices>
</domain>
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-addr-multiple-sata-disks.xml
0 → 100644
浏览文件 @
ae01530c
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
df3be7e7-a104-11e3-aeb0-50e5492bd3dc
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type
arch=
'x86_64'
>
hvm
</type>
<boot
dev=
'hd'
/>
</os>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd1.img'
/>
<target
dev=
'hda'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd2.img'
/>
<target
dev=
'hdb'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'1'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd2.img'
/>
<target
dev=
'hdc'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'2'
/>
</disk>
<controller
type=
'pci'
index=
'0'
model=
'pci-root'
/>
<controller
type=
'sata'
index=
'0'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x02'
function=
'0x0'
/>
</controller>
<interface
type=
'bridge'
>
<mac
address=
'52:54:00:b9:94:02'
/>
<source
bridge=
'virbr0'
/>
<model
type=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x03'
function=
'0x0'
/>
</interface>
</devices>
</domain>
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-addr-no32devs-multiple-sata-disks.xml
0 → 100644
浏览文件 @
ae01530c
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
df3be7e7-a104-11e3-aeb0-50e5492bd3dc
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type
arch=
'x86_64'
>
hvm
</type>
<boot
dev=
'hd'
/>
</os>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd1.img'
/>
<target
dev=
'hda'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd2.img'
/>
<target
dev=
'hdb'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'1'
bus=
'0'
target=
'0'
unit=
'0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd2.img'
/>
<target
dev=
'hdc'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'2'
bus=
'0'
target=
'0'
unit=
'0'
/>
</disk>
<controller
type=
'pci'
index=
'0'
model=
'pci-root'
/>
<controller
type=
'sata'
index=
'0'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x02'
function=
'0x0'
/>
</controller>
<controller
type=
'sata'
index=
'1'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x03'
function=
'0x0'
/>
</controller>
<controller
type=
'sata'
index=
'2'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x04'
function=
'0x0'
/>
</controller>
<interface
type=
'bridge'
>
<mac
address=
'52:54:00:b9:94:02'
/>
<source
bridge=
'virbr0'
/>
<model
type=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x05'
function=
'0x0'
/>
</interface>
</devices>
</domain>
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-addr-no32devs-single-sata-disk.xml
0 → 100644
浏览文件 @
ae01530c
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
df3be7e7-a104-11e3-aeb0-50e5492bd3dc
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type
arch=
'x86_64'
>
hvm
</type>
<boot
dev=
'hd'
/>
</os>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'hda'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'0'
/>
</disk>
<controller
type=
'pci'
index=
'0'
model=
'pci-root'
/>
<controller
type=
'sata'
index=
'0'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x02'
function=
'0x0'
/>
</controller>
<interface
type=
'bridge'
>
<mac
address=
'52:54:00:b9:94:02'
/>
<source
bridge=
'virbr0'
/>
<model
type=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x03'
function=
'0x0'
/>
</interface>
</devices>
</domain>
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-addr-single-sata-disk.xml
0 → 100644
浏览文件 @
ae01530c
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
df3be7e7-a104-11e3-aeb0-50e5492bd3dc
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type
arch=
'x86_64'
>
hvm
</type>
<boot
dev=
'hd'
/>
</os>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
type=
'raw'
/>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'hda'
bus=
'sata'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'0'
/>
</disk>
<controller
type=
'pci'
index=
'0'
model=
'pci-root'
/>
<controller
type=
'sata'
index=
'0'
>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x02'
function=
'0x0'
/>
</controller>
<interface
type=
'bridge'
>
<mac
address=
'52:54:00:b9:94:02'
/>
<source
bridge=
'virbr0'
/>
<model
type=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x03'
function=
'0x0'
/>
</interface>
</devices>
</domain>
tests/bhyvexml2xmltest.c
浏览文件 @
ae01530c
...
...
@@ -14,15 +14,21 @@ static bhyveConn driver;
struct
testInfo
{
const
char
*
name
;
bool
different
;
unsigned
int
flags
;
};
typedef
enum
{
FLAG_IS_DIFFERENT
=
1
<<
0
,
FLAG_EXPECT_FAILURE
=
1
<<
1
,
}
virBhyveXMLToXMLTestFlags
;
static
int
testCompareXMLToXMLHelper
(
const
void
*
data
)
{
const
struct
testInfo
*
info
=
data
;
char
*
xml_in
=
NULL
;
char
*
xml_out
=
NULL
;
bool
is_different
=
info
->
flags
&
FLAG_IS_DIFFERENT
;
int
ret
=
-
1
;
if
(
virAsprintf
(
&
xml_in
,
"%s/bhyvexml2argvdata/bhyvexml2argv-%s.xml"
,
...
...
@@ -32,10 +38,17 @@ testCompareXMLToXMLHelper(const void *data)
goto
cleanup
;
ret
=
testCompareDomXML2XMLFiles
(
driver
.
caps
,
driver
.
xmlopt
,
xml_in
,
i
nfo
->
different
?
xml_out
:
xml_in
,
i
s_
different
?
xml_out
:
xml_in
,
false
,
NULL
,
NULL
,
0
,
TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS
);
if
((
ret
!=
0
)
&&
(
info
->
flags
&
FLAG_EXPECT_FAILURE
))
{
ret
=
0
;
VIR_TEST_DEBUG
(
"Got expected error: %s
\n
"
,
virGetLastErrorMessage
());
virResetLastError
();
}
cleanup:
VIR_FREE
(
xml_in
);
VIR_FREE
(
xml_out
);
...
...
@@ -53,16 +66,19 @@ mymain(void)
if
((
driver
.
xmlopt
=
virBhyveDriverCreateXMLConf
(
&
driver
))
==
NULL
)
return
EXIT_FAILURE
;
# define DO_TEST_FULL(name,
is_different)
\
# define DO_TEST_FULL(name,
flags)
\
do { \
const struct testInfo info = {name,
is_different};
\
const struct testInfo info = {name,
(flags)};
\
if (virTestRun("BHYVE XML-2-XML " name, \
testCompareXMLToXMLHelper, &info) < 0) \
ret = -1; \
} while (0)
# define DO_TEST_DIFFERENT(name) \
DO_TEST_FULL(name, true)
DO_TEST_FULL(name, FLAG_IS_DIFFERENT)
# define DO_TEST_FAILURE(name) \
DO_TEST_FULL(name, FLAG_EXPECT_FAILURE)
driver
.
bhyvecaps
=
BHYVE_CAP_AHCI32SLOT
;
...
...
@@ -89,6 +105,17 @@ mymain(void)
DO_TEST_DIFFERENT
(
"serial-grub"
);
DO_TEST_DIFFERENT
(
"serial-grub-nocons"
);
/* Address allocation tests */
DO_TEST_DIFFERENT
(
"addr-single-sata-disk"
);
DO_TEST_DIFFERENT
(
"addr-multiple-sata-disks"
);
DO_TEST_DIFFERENT
(
"addr-more-than-32-sata-disks"
);
/* The same without 32 devs per controller support */
driver
.
bhyvecaps
^=
BHYVE_CAP_AHCI32SLOT
;
DO_TEST_DIFFERENT
(
"addr-no32devs-single-sata-disk"
);
DO_TEST_DIFFERENT
(
"addr-no32devs-multiple-sata-disks"
);
DO_TEST_FAILURE
(
"addr-no32devs-more-than-32-sata-disks"
);
virObjectUnref
(
driver
.
caps
);
virObjectUnref
(
driver
.
xmlopt
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录