Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
dd23c382
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,发现更多精彩内容 >>
提交
dd23c382
编写于
6月 24, 2016
作者:
F
Fabian Freyer
提交者:
Roman Bogorodskiy
7月 10, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bhyve: add tests for bhyveParseCommandLineString
上级
9f22b347
变更
61
隐藏空白更改
内联
并排
Showing
61 changed file
with
1148 addition
and
3 deletion
+1148
-3
tests/Makefile.am
tests/Makefile.am
+20
-3
tests/bhyveargv2xmldata/bhyveargv2xml-acpiapic.args
tests/bhyveargv2xmldata/bhyveargv2xml-acpiapic.args
+8
-0
tests/bhyveargv2xmldata/bhyveargv2xml-acpiapic.xml
tests/bhyveargv2xmldata/bhyveargv2xml-acpiapic.xml
+20
-0
tests/bhyveargv2xmldata/bhyveargv2xml-ahci-hd.args
tests/bhyveargv2xmldata/bhyveargv2xml-ahci-hd.args
+7
-0
tests/bhyveargv2xmldata/bhyveargv2xml-ahci-hd.xml
tests/bhyveargv2xmldata/bhyveargv2xml-ahci-hd.xml
+21
-0
tests/bhyveargv2xmldata/bhyveargv2xml-base.args
tests/bhyveargv2xmldata/bhyveargv2xml-base.args
+6
-0
tests/bhyveargv2xmldata/bhyveargv2xml-base.xml
tests/bhyveargv2xmldata/bhyveargv2xml-base.xml
+16
-0
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-bootorder.args
.../bhyveargv2xmldata/bhyveargv2xml-bhyveload-bootorder.args
+11
-0
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-bootorder.xml
...s/bhyveargv2xmldata/bhyveargv2xml-bhyveload-bootorder.xml
+27
-0
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-custom.args
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-custom.args
+9
-0
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-custom.xml
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-custom.xml
+18
-0
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-mem-mismatch.args
...yveargv2xmldata/bhyveargv2xml-bhyveload-mem-mismatch.args
+10
-0
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-memsize-fail.args
...yveargv2xmldata/bhyveargv2xml-bhyveload-memsize-fail.args
+10
-0
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-name-mismatch.args
...veargv2xmldata/bhyveargv2xml-bhyveload-name-mismatch.args
+10
-0
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-vda.args
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-vda.args
+10
-0
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-vda.xml
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-vda.xml
+21
-0
tests/bhyveargv2xmldata/bhyveargv2xml-bhyverun-mem-mismatch.args
...hyveargv2xmldata/bhyveargv2xml-bhyverun-mem-mismatch.args
+10
-0
tests/bhyveargv2xmldata/bhyveargv2xml-bhyverun-name-mismatch.args
...yveargv2xmldata/bhyveargv2xml-bhyverun-name-mismatch.args
+10
-0
tests/bhyveargv2xmldata/bhyveargv2xml-cdrom.args
tests/bhyveargv2xmldata/bhyveargv2xml-cdrom.args
+7
-0
tests/bhyveargv2xmldata/bhyveargv2xml-cdrom.xml
tests/bhyveargv2xmldata/bhyveargv2xml-cdrom.xml
+21
-0
tests/bhyveargv2xmldata/bhyveargv2xml-console.args
tests/bhyveargv2xmldata/bhyveargv2xml-console.args
+9
-0
tests/bhyveargv2xmldata/bhyveargv2xml-console.xml
tests/bhyveargv2xmldata/bhyveargv2xml-console.xml
+24
-0
tests/bhyveargv2xmldata/bhyveargv2xml-console2.args
tests/bhyveargv2xmldata/bhyveargv2xml-console2.args
+9
-0
tests/bhyveargv2xmldata/bhyveargv2xml-console2.xml
tests/bhyveargv2xmldata/bhyveargv2xml-console2.xml
+15
-0
tests/bhyveargv2xmldata/bhyveargv2xml-console3.args
tests/bhyveargv2xmldata/bhyveargv2xml-console3.args
+10
-0
tests/bhyveargv2xmldata/bhyveargv2xml-console3.xml
tests/bhyveargv2xmldata/bhyveargv2xml-console3.xml
+27
-0
tests/bhyveargv2xmldata/bhyveargv2xml-console4.args
tests/bhyveargv2xmldata/bhyveargv2xml-console4.args
+9
-0
tests/bhyveargv2xmldata/bhyveargv2xml-console4.xml
tests/bhyveargv2xmldata/bhyveargv2xml-console4.xml
+15
-0
tests/bhyveargv2xmldata/bhyveargv2xml-custom-loader.args
tests/bhyveargv2xmldata/bhyveargv2xml-custom-loader.args
+9
-0
tests/bhyveargv2xmldata/bhyveargv2xml-custom-loader.xml
tests/bhyveargv2xmldata/bhyveargv2xml-custom-loader.xml
+18
-0
tests/bhyveargv2xmldata/bhyveargv2xml-disk-toomany.args
tests/bhyveargv2xmldata/bhyveargv2xml-disk-toomany.args
+33
-0
tests/bhyveargv2xmldata/bhyveargv2xml-disk-toomany.xml
tests/bhyveargv2xmldata/bhyveargv2xml-disk-toomany.xml
+146
-0
tests/bhyveargv2xmldata/bhyveargv2xml-extraargs.args
tests/bhyveargv2xmldata/bhyveargv2xml-extraargs.args
+6
-0
tests/bhyveargv2xmldata/bhyveargv2xml-memsize-fail.args
tests/bhyveargv2xmldata/bhyveargv2xml-memsize-fail.args
+6
-0
tests/bhyveargv2xmldata/bhyveargv2xml-memsize-human.args
tests/bhyveargv2xmldata/bhyveargv2xml-memsize-human.args
+6
-0
tests/bhyveargv2xmldata/bhyveargv2xml-memsize-human.xml
tests/bhyveargv2xmldata/bhyveargv2xml-memsize-human.xml
+16
-0
tests/bhyveargv2xmldata/bhyveargv2xml-memsize-large.args
tests/bhyveargv2xmldata/bhyveargv2xml-memsize-large.args
+6
-0
tests/bhyveargv2xmldata/bhyveargv2xml-memsize-large.xml
tests/bhyveargv2xmldata/bhyveargv2xml-memsize-large.xml
+16
-0
tests/bhyveargv2xmldata/bhyveargv2xml-name.args
tests/bhyveargv2xmldata/bhyveargv2xml-name.args
+6
-0
tests/bhyveargv2xmldata/bhyveargv2xml-name.xml
tests/bhyveargv2xmldata/bhyveargv2xml-name.xml
+16
-0
tests/bhyveargv2xmldata/bhyveargv2xml-oneline.args
tests/bhyveargv2xmldata/bhyveargv2xml-oneline.args
+6
-0
tests/bhyveargv2xmldata/bhyveargv2xml-oneline.xml
tests/bhyveargv2xmldata/bhyveargv2xml-oneline.xml
+16
-0
tests/bhyveargv2xmldata/bhyveargv2xml-utc.args
tests/bhyveargv2xmldata/bhyveargv2xml-utc.args
+7
-0
tests/bhyveargv2xmldata/bhyveargv2xml-utc.xml
tests/bhyveargv2xmldata/bhyveargv2xml-utc.xml
+16
-0
tests/bhyveargv2xmldata/bhyveargv2xml-uuid.args
tests/bhyveargv2xmldata/bhyveargv2xml-uuid.args
+7
-0
tests/bhyveargv2xmldata/bhyveargv2xml-uuid.xml
tests/bhyveargv2xmldata/bhyveargv2xml-uuid.xml
+16
-0
tests/bhyveargv2xmldata/bhyveargv2xml-uuid2.args
tests/bhyveargv2xmldata/bhyveargv2xml-uuid2.args
+7
-0
tests/bhyveargv2xmldata/bhyveargv2xml-vcpus.args
tests/bhyveargv2xmldata/bhyveargv2xml-vcpus.args
+6
-0
tests/bhyveargv2xmldata/bhyveargv2xml-vcpus.xml
tests/bhyveargv2xmldata/bhyveargv2xml-vcpus.xml
+16
-0
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-blk.args
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-blk.args
+7
-0
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-blk.xml
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-blk.xml
+21
-0
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net.args
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net.args
+8
-0
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net.xml
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net.xml
+26
-0
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net2.args
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net2.args
+7
-0
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net2.xml
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net2.xml
+16
-0
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net3.args
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net3.args
+7
-0
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net3.xml
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net3.xml
+16
-0
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net4.args
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net4.args
+7
-0
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net4.xml
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net4.xml
+21
-0
tests/bhyveargv2xmlmock.c
tests/bhyveargv2xmlmock.c
+27
-0
tests/bhyveargv2xmltest.c
tests/bhyveargv2xmltest.c
+214
-0
未找到文件。
tests/Makefile.am
浏览文件 @
dd23c382
...
@@ -86,6 +86,7 @@ MOCKLIBS_LIBS = \
...
@@ -86,6 +86,7 @@ MOCKLIBS_LIBS = \
EXTRA_DIST
=
\
EXTRA_DIST
=
\
.valgrind.supp
\
.valgrind.supp
\
bhyvexml2argvdata
\
bhyvexml2argvdata
\
bhyveargv2xmldata
\
bhyvexml2xmloutdata
\
bhyvexml2xmloutdata
\
capabilityschemadata
\
capabilityschemadata
\
commanddata
\
commanddata
\
...
@@ -284,7 +285,7 @@ test_programs += vmwarevertest
...
@@ -284,7 +285,7 @@ test_programs += vmwarevertest
endif
WITH_VMWARE
endif
WITH_VMWARE
if
WITH_BHYVE
if
WITH_BHYVE
test_programs
+=
bhyvexml2argvtest bhyvexml2xmltest
test_programs
+=
bhyvexml2argvtest bhyvexml2xmltest
bhyveargv2xmltest
endif
WITH_BHYVE
endif
WITH_BHYVE
if
WITH_CIL
if
WITH_CIL
...
@@ -416,7 +417,7 @@ test_libraries += libqemumonitortestutils.la \
...
@@ -416,7 +417,7 @@ test_libraries += libqemumonitortestutils.la \
endif
WITH_QEMU
endif
WITH_QEMU
if
WITH_BHYVE
if
WITH_BHYVE
test_libraries
+=
bhyvexml2argvmock.la
test_libraries
+=
bhyvexml2argvmock.la
bhyveargv2xmlmock.la
endif
WITH_BHYVE
endif
WITH_BHYVE
if
WITH_DBUS
if
WITH_DBUS
...
@@ -742,6 +743,12 @@ bhyvexml2argvmock_la_CFLAGS = $(AM_CFLAGS)
...
@@ -742,6 +743,12 @@ bhyvexml2argvmock_la_CFLAGS = $(AM_CFLAGS)
bhyvexml2argvmock_la_LDFLAGS
=
$(MOCKLIBS_LDFLAGS)
bhyvexml2argvmock_la_LDFLAGS
=
$(MOCKLIBS_LDFLAGS)
bhyvexml2argvmock_la_LIBADD
=
$(MOCKLIBS_LIBS)
bhyvexml2argvmock_la_LIBADD
=
$(MOCKLIBS_LIBS)
bhyveargv2xmlmock_la_SOURCES
=
\
bhyveargv2xmlmock.c
bhyveargv2xmlmock_la_CFLAGS
=
$(AM_CFLAGS)
bhyveargv2xmlmock_la_LDFLAGS
=
$(MOCKLIBS_LDFLAGS)
bhyveargv2xmlmock_la_LIBADD
=
$(MOCKLIBS_LIBS)
bhyve_LDADDS
=
../src/libvirt_driver_bhyve_impl.la
bhyve_LDADDS
=
../src/libvirt_driver_bhyve_impl.la
if
WITH_STORAGE
if
WITH_STORAGE
bhyve_LDADDS
+=
../src/libvirt_driver_storage_impl.la
bhyve_LDADDS
+=
../src/libvirt_driver_storage_impl.la
...
@@ -756,8 +763,18 @@ bhyvexml2xmltest_SOURCES = \
...
@@ -756,8 +763,18 @@ bhyvexml2xmltest_SOURCES = \
bhyvexml2xmltest.c
\
bhyvexml2xmltest.c
\
testutils.c testutils.h
testutils.c testutils.h
bhyvexml2xmltest_LDADD
=
$(bhyve_LDADDS)
bhyvexml2xmltest_LDADD
=
$(bhyve_LDADDS)
bhyveargv2xmltest_SOURCES
=
\
bhyveargv2xmltest.c
\
testutils.c testutils.h
bhyveargv2xmltest_LDADD
=
$(bhyve_LDADDS)
else
!
WITH_BHYVE
else
!
WITH_BHYVE
EXTRA_DIST
+=
bhyvexml2argvtest.c bhyvexml2xmltest.c bhyvexml2argvmock.c
EXTRA_DIST
+=
\
bhyvexml2argvtest.c
\
bhyveargv2xmltest.c
\
bhyvexml2xmltest.c
\
bhyvexml2argvmock.c
\
bhyveargv2xmlmock.c
endif
!
WITH_BHYVE
endif
!
WITH_BHYVE
networkxml2xmltest_SOURCES
=
\
networkxml2xmltest_SOURCES
=
\
...
...
tests/bhyveargv2xmldata/bhyveargv2xml-acpiapic.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-A \
-I \
-H \
-P \
-s 0:0,hostbridge bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-acpiapic.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<features>
<acpi/>
<apic/>
</features>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-ahci-hd.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge \
-s 2:0,ahci-hd,/tmp/freebsd.img bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-ahci-hd.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'sda'
bus=
'sata'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x02'
function=
'0x0'
/>
</disk>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-base.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-base.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-bootorder.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyveload \
-m 214 \
-d /tmp/disk2.img bhyve
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge \
-s 2:0,virtio-blk,/tmp/disk1.img \
-s 3:0,virtio-blk,/tmp/disk2.img bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-bootorder.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/disk1.img'
/>
<target
dev=
'vda'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x02'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/disk2.img'
/>
<target
dev=
'vdb'
bus=
'virtio'
/>
<boot
order=
'1'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x03'
function=
'0x0'
/>
</disk>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-custom.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyveload \
-m 214 \
-S bhyve
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-custom.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<bootloader>
/usr/sbin/bhyveload
</bootloader>
<bootloader_args>
-m 214 -S bhyve
</bootloader_args>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-mem-mismatch.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyveload \
-m 412 \
-d /tmp/freebsd.img bhyve
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge \
-s 2:0,virtio-blk,/tmp/freebsd.img bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-memsize-fail.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyveload \
-m bogus \
-d /tmp/freebsd.img bhyve
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge \
-s 2:0,virtio-blk,/tmp/freebsd.img bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-name-mismatch.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyveload \
-m 214 \
-d /tmp/freebsd.img bhyve
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge \
-s 2:0,virtio-blk,/tmp/freebsd.img othervm
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-vda.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyveload \
-m 214 \
-d /tmp/freebsd.img bhyve
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge \
-s 2:0,virtio-blk,/tmp/freebsd.img bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-vda.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vda'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x02'
function=
'0x0'
/>
</disk>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-bhyverun-mem-mismatch.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 412 \
-H \
-P \
-s 0:0,hostbridge \
-s 2:0,virtio-blk,/tmp/freebsd.img bhyve
/usr/sbin/bhyveload \
-m 214 \
-d /tmp/freebsd.img bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-bhyverun-name-mismatch.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge \
-s 2:0,virtio-blk,/tmp/freebsd.img bhyve
/usr/sbin/bhyveload \
-m 214 \
-d /tmp/freebsd.img othervm
tests/bhyveargv2xmldata/bhyveargv2xml-cdrom.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge \
-s 2:0,ahci-cd,/tmp/freebsd.iso bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-cdrom.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<disk
type=
'file'
device=
'cdrom'
>
<source
file=
'/tmp/freebsd.iso'
/>
<target
dev=
'sda'
bus=
'sata'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x02'
function=
'0x0'
/>
</disk>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-console.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge \
-s 1,lpc \
-l com1,/dev/nmdm0A \
-l com2,/dev/nmdm1B bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-console.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<serial
type=
'nmdm'
>
<source
master=
'/dev/nmdm0A'
slave=
'/dev/nmdm0B'
/>
<target
port=
'0'
/>
</serial>
<serial
type=
'nmdm'
>
<source
master=
'/dev/nmdm1B'
slave=
'/dev/nmdm1A'
/>
<target
port=
'1'
/>
</serial>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-console2.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge \
-s 1,lpc \
-l com1,/dev/nmdm0C \
-l com2,/dev/nmdm1D bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-console2.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-console3.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge \
-s 1,lpc \
-l com1,/dev/nmdm0A \
-l com2,/dev/nmdm1B \
-l com3,/dev/nmdm2B bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-console3.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<serial
type=
'nmdm'
>
<source
master=
'/dev/nmdm0A'
slave=
'/dev/nmdm0B'
/>
<target
port=
'0'
/>
</serial>
<serial
type=
'nmdm'
>
<source
master=
'/dev/nmdm1B'
slave=
'/dev/nmdm1A'
/>
<target
port=
'1'
/>
</serial>
<console
type=
'nmdm'
>
<source
master=
'/dev/nmdm0A'
slave=
'/dev/nmdm0B'
/>
<target
type=
'serial'
port=
'0'
/>
</console>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-console4.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge \
-s 1,lpc \
-l com1,/dev/whatever0A \
-l com2,/dev/whatever1B bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-console4.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-custom-loader.args
0 → 100644
浏览文件 @
dd23c382
/usr/bin/custom-loader \
-s ome \
--args
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-custom-loader.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<bootloader>
/usr/bin/custom-loader
</bootloader>
<bootloader_args>
with several arguments
</bootloader_args>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-disk-toomany.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge \
-s 1:0,virtio-blk,/tmp/freebsd.img \
-s 2:0,virtio-blk,/tmp/freebsd.img \
-s 3:0,virtio-blk,/tmp/freebsd.img \
-s 4:0,virtio-blk,/tmp/freebsd.img \
-s 5:0,virtio-blk,/tmp/freebsd.img \
-s 6:0,virtio-blk,/tmp/freebsd.img \
-s 7:0,virtio-blk,/tmp/freebsd.img \
-s 8:0,virtio-blk,/tmp/freebsd.img \
-s 9:0,virtio-blk,/tmp/freebsd.img \
-s 10:0,virtio-blk,/tmp/freebsd.img \
-s 11:0,virtio-blk,/tmp/freebsd.img \
-s 12:0,virtio-blk,/tmp/freebsd.img \
-s 13:0,virtio-blk,/tmp/freebsd.img \
-s 14:0,virtio-blk,/tmp/freebsd.img \
-s 15:0,virtio-blk,/tmp/freebsd.img \
-s 16:0,virtio-blk,/tmp/freebsd.img \
-s 17:0,virtio-blk,/tmp/freebsd.img \
-s 18:0,virtio-blk,/tmp/freebsd.img \
-s 19:0,virtio-blk,/tmp/freebsd.img \
-s 20:0,virtio-blk,/tmp/freebsd.img \
-s 21:0,virtio-blk,/tmp/freebsd.img \
-s 22:0,virtio-blk,/tmp/freebsd.img \
-s 23:0,virtio-blk,/tmp/freebsd.img \
-s 24:0,virtio-blk,/tmp/freebsd.img \
-s 25:0,virtio-blk,/tmp/freebsd.img \
-s 26:0,virtio-blk,/tmp/freebsd.img \
-s 27:0,virtio-blk,/tmp/freebsd.img bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-disk-toomany.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vda'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x01'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdb'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x02'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdc'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x03'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdd'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x04'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vde'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x05'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdf'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x06'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdg'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x07'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdh'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x08'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdi'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x09'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdj'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x0a'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdk'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x0b'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdl'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x0c'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdm'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x0d'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdn'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x0e'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdo'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x0f'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdp'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x10'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdq'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x11'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdr'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x12'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vds'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x13'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdt'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x14'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdu'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x15'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdv'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x16'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdw'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x17'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdx'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x18'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdy'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x19'
function=
'0x0'
/>
</disk>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vdz'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x1a'
function=
'0x0'
/>
</disk>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-extraargs.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge bhyve bogus
tests/bhyveargv2xmldata/bhyveargv2xml-memsize-fail.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m bogus \
-H \
-P \
-s 0:0,hostbridge bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-memsize-human.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214M \
-H \
-P \
-s 0:0,hostbridge bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-memsize-human.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-memsize-large.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 224395264 \
-H \
-P \
-s 0:0,hostbridge bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-memsize-large.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-name.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge name
tests/bhyveargv2xmldata/bhyveargv2xml-name.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
name
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-oneline.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-oneline.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-utc.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-u \
-H \
-P \
-s 0:0,hostbridge bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-utc.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-uuid.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-U 2a793ea6-8e52-440a-8458-355e98492e17 \
-s 0:0,hostbridge bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-uuid.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
2a793ea6-8e52-440a-8458-355e98492e17
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-uuid2.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-U garbage \
-s 0:0,hostbridge bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-vcpus.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 4 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-vcpus.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
4
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-blk.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge \
-s 2:0,virtio-blk,/tmp/freebsd.img bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-blk.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/tmp/freebsd.img'
/>
<target
dev=
'vda'
bus=
'virtio'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x02'
function=
'0x0'
/>
</disk>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge \
-s 1:0,virtio-net,tap0 \
-s 1:1,virtio-net,tap1,mac=FE:ED:AD:EA:DF:15 bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<interface
type=
'ethernet'
>
<mac
address=
'52:54:00:00:00:00'
/>
<target
dev=
'tap0'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x01'
function=
'0x0'
/>
</interface>
<interface
type=
'ethernet'
>
<mac
address=
'fe:ed:ad:ea:df:15'
/>
<target
dev=
'tap1'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x01'
function=
'0x1'
/>
</interface>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net2.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge \
-s 1:0,virtio-net,notatap bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net2.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net3.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge \
-s 1:1,virtio-net,tap1,notamac bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net3.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
</devices>
</domain>
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net4.args
0 → 100644
浏览文件 @
dd23c382
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-s 0:0,hostbridge \
-s 1:1,virtio-net,tap1,mac=garbage bhyve
tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net4.xml
0 → 100644
浏览文件 @
dd23c382
<domain
type=
'bhyve'
>
<name>
bhyve
</name>
<uuid>
c7a5fdbd-edaf-9455-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219136
</memory>
<currentMemory
unit=
'KiB'
>
219136
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type>
hvm
</type>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<interface
type=
'ethernet'
>
<mac
address=
'00:00:00:00:00:00'
/>
<target
dev=
'tap1'
/>
<address
type=
'pci'
domain=
'0x0000'
bus=
'0x00'
slot=
'0x01'
function=
'0x1'
/>
</interface>
</devices>
</domain>
tests/bhyveargv2xmlmock.c
0 → 100644
浏览文件 @
dd23c382
#include <config.h>
#include "virnetdev.h"
#include "internal.h"
#include "util/viruuid.h"
#define VIR_FROM_THIS VIR_FROM_BHYVE
void
virMacAddrGenerate
(
const
unsigned
char
prefix
[
VIR_MAC_PREFIX_BUFLEN
],
virMacAddrPtr
addr
)
{
addr
->
addr
[
0
]
=
prefix
[
0
];
addr
->
addr
[
1
]
=
prefix
[
1
];
addr
->
addr
[
2
]
=
prefix
[
2
];
addr
->
addr
[
3
]
=
0
;
addr
->
addr
[
4
]
=
0
;
addr
->
addr
[
5
]
=
0
;
}
int
virUUIDGenerate
(
unsigned
char
*
uuid
)
{
if
(
virUUIDParse
(
"c7a5fdbd-edaf-9455-926a-d65c16db1809"
,
uuid
)
<
0
)
return
-
1
;
return
0
;
}
tests/bhyveargv2xmltest.c
0 → 100644
浏览文件 @
dd23c382
#include <config.h>
#include "testutils.h"
#ifdef WITH_BHYVE
# include "datatypes.h"
# include "util/viruuid.h"
# include "bhyve/bhyve_driver.h"
# include "bhyve/bhyve_capabilities.h"
# include "bhyve/bhyve_utils.h"
# include "bhyve/bhyve_parse_command.h"
# define VIR_FROM_THIS VIR_FROM_BHYVE
static
bhyveConn
driver
;
typedef
enum
{
FLAG_EXPECT_FAILURE
=
1
,
FLAG_EXPECT_PARSE_ERROR
=
2
,
FLAG_EXPECT_WARNING
=
4
,
}
virBhyveArgv2XMLTestFlags
;
static
int
testCompareXMLToArgvFiles
(
const
char
*
xmlfile
,
const
char
*
cmdfile
,
unsigned
int
flags
)
{
char
*
actualxml
=
NULL
;
char
*
cmd
=
NULL
;
char
*
log
=
NULL
;
int
ret
=
-
1
;
virDomainDefPtr
vmdef
=
NULL
;
if
(
virTestLoadFile
(
cmdfile
,
&
cmd
)
<
0
)
goto
fail
;
if
(
!
(
vmdef
=
bhyveParseCommandLineString
(
cmd
,
driver
.
bhyvecaps
,
driver
.
xmlopt
)))
{
if
((
flags
&
FLAG_EXPECT_FAILURE
)
&&
!
virTestOOMActive
())
{
VIR_TEST_DEBUG
(
"Got expected failure from "
"bhyveParseCommandLineString.
\n
"
);
}
else
{
goto
fail
;
}
}
else
if
((
flags
&
FLAG_EXPECT_FAILURE
)
&&
!
virTestOOMActive
())
{
VIR_TEST_DEBUG
(
"Did not get expected failure from "
"bhyveParseCommandLineString.
\n
"
);
goto
fail
;
}
if
(
!
virTestOOMActive
())
{
if
((
log
=
virTestLogContentAndReset
())
==
NULL
)
goto
fail
;
if
(
flags
&
FLAG_EXPECT_WARNING
)
{
if
(
*
log
)
{
VIR_TEST_DEBUG
(
"Got expected warning from "
"bhyveParseCommandLineString:
\n
%s"
,
log
);
}
else
{
VIR_TEST_DEBUG
(
"bhyveParseCommandLineString "
"should have logged a warning
\n
"
);
goto
fail
;
}
}
else
{
/* didn't expect a warning */
if
(
*
log
)
{
VIR_TEST_DEBUG
(
"Got unexpected warning from "
"bhyveParseCommandLineString:
\n
%s"
,
log
);
goto
fail
;
}
}
}
if
(
vmdef
&&
!
virDomainDefCheckABIStability
(
vmdef
,
vmdef
))
{
VIR_TEST_DEBUG
(
"ABI stability check failed on %s"
,
xmlfile
);
goto
fail
;
}
if
(
vmdef
&&
!
(
actualxml
=
virDomainDefFormat
(
vmdef
,
driver
.
caps
,
0
)))
goto
fail
;
if
(
vmdef
&&
virTestCompareToFile
(
actualxml
,
xmlfile
)
<
0
)
goto
fail
;
ret
=
0
;
fail:
VIR_FREE
(
actualxml
);
VIR_FREE
(
cmd
);
VIR_FREE
(
log
);
virDomainDefFree
(
vmdef
);
return
ret
;
}
struct
testInfo
{
const
char
*
name
;
unsigned
int
flags
;
};
static
int
testCompareXMLToArgvHelper
(
const
void
*
data
)
{
int
result
=
-
1
;
const
struct
testInfo
*
info
=
data
;
char
*
xml
=
NULL
;
char
*
args
=
NULL
;
if
(
virAsprintf
(
&
xml
,
"%s/bhyveargv2xmldata/bhyveargv2xml-%s.xml"
,
abs_srcdir
,
info
->
name
)
<
0
||
virAsprintf
(
&
args
,
"%s/bhyveargv2xmldata/bhyveargv2xml-%s.args"
,
abs_srcdir
,
info
->
name
)
<
0
)
goto
cleanup
;
result
=
testCompareXMLToArgvFiles
(
xml
,
args
,
info
->
flags
);
cleanup:
VIR_FREE
(
xml
);
VIR_FREE
(
args
);
return
result
;
}
static
int
mymain
(
void
)
{
int
ret
=
0
;
if
((
driver
.
caps
=
virBhyveCapsBuild
())
==
NULL
)
return
EXIT_FAILURE
;
if
((
driver
.
xmlopt
=
virDomainXMLOptionNew
(
NULL
,
NULL
,
NULL
))
==
NULL
)
return
EXIT_FAILURE
;
# define DO_TEST_FULL(name, flags) \
do { \
static struct testInfo info = { \
name, (flags) \
}; \
if (virTestRun("BHYVE ARGV-2-XML " name, \
testCompareXMLToArgvHelper, &info) < 0) \
ret = -1; \
} while (0)
# define DO_TEST(name) \
DO_TEST_FULL(name, 0)
# define DO_TEST_FAIL(name) \
DO_TEST_FULL(name, 5)
# define DO_TEST_WARN(name) \
DO_TEST_FULL(name, 4)
# define DO_TEST_FAIL_SILENT(name) \
DO_TEST_FULL(name, 1)
# define DO_TEST_PARSE_ERROR(name) \
DO_TEST_FULL(name, 2)
driver
.
grubcaps
=
BHYVE_GRUB_CAP_CONSDEV
;
driver
.
bhyvecaps
=
BHYVE_CAP_RTC_UTC
;
DO_TEST
(
"base"
);
DO_TEST
(
"oneline"
);
DO_TEST
(
"name"
);
DO_TEST
(
"console"
);
DO_TEST_FAIL
(
"console2"
);
DO_TEST_FAIL
(
"console3"
);
DO_TEST_FAIL
(
"console4"
);
DO_TEST
(
"acpiapic"
);
DO_TEST
(
"utc"
);
DO_TEST
(
"vcpus"
);
DO_TEST
(
"cdrom"
);
DO_TEST
(
"ahci-hd"
);
DO_TEST
(
"virtio-blk"
);
DO_TEST
(
"virtio-net"
);
DO_TEST_WARN
(
"virtio-net2"
);
DO_TEST_WARN
(
"virtio-net3"
);
DO_TEST_WARN
(
"virtio-net4"
);
DO_TEST_WARN
(
"disk-toomany"
);
DO_TEST
(
"uuid"
);
DO_TEST_FAIL
(
"uuid2"
);
DO_TEST
(
"memsize-large"
);
DO_TEST
(
"memsize-human"
);
DO_TEST_FAIL
(
"memsize-fail"
);
DO_TEST
(
"custom-loader"
);
DO_TEST
(
"bhyveload-custom"
);
DO_TEST
(
"bhyveload-vda"
);
DO_TEST_FAIL
(
"bhyveload-name-mismatch"
);
DO_TEST_FAIL
(
"bhyverun-name-mismatch"
);
DO_TEST_FAIL
(
"bhyveload-mem-mismatch"
);
DO_TEST_FAIL
(
"bhyverun-mem-mismatch"
);
DO_TEST_FAIL
(
"bhyveload-mem-mismatch"
);
DO_TEST_FAIL
(
"bhyveload-memsize-fail"
);
DO_TEST
(
"bhyveload-bootorder"
);
DO_TEST_FAIL
(
"extraargs"
);
virObjectUnref
(
driver
.
caps
);
virObjectUnref
(
driver
.
xmlopt
);
return
ret
==
0
?
EXIT_SUCCESS
:
EXIT_FAILURE
;
}
VIRT_TEST_MAIN_PRELOAD
(
mymain
,
abs_builddir
"/.libs/bhyveargv2xmlmock.so"
)
#else
int
main
(
void
)
{
return
EXIT_AM_SKIP
;
}
#endif
/* WITH_BHYVE */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录