bhyve: add tests for wiring memory

Signed-off-by: Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
This commit is contained in:
Fabian Freyer 2018-05-09 03:01:36 +02:00 committed by Roman Bogorodskiy
parent b181e44d9f
commit cb434b442a
9 changed files with 104 additions and 0 deletions

View File

@ -0,0 +1,7 @@
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-H \
-P \
-S \
-s 0:0,hostbridge bhyve

View File

@ -0,0 +1,19 @@
<domain type='bhyve'>
<name>bhyve</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
<memory unit='KiB'>219136</memory>
<currentMemory unit='KiB'>219136</currentMemory>
<memoryBacking>
<locked/>
</memoryBacking>
<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>

View File

@ -163,6 +163,7 @@ mymain(void)
driver.bhyvecaps = BHYVE_CAP_RTC_UTC;
DO_TEST("base");
DO_TEST("wired");
DO_TEST("oneline");
DO_TEST("name");
DO_TEST("console");

View File

@ -0,0 +1,10 @@
/usr/sbin/bhyve \
-c 1 \
-m 214 \
-S \
-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

View File

@ -0,0 +1,3 @@
/usr/sbin/bhyveload \
-m 214 \
-d /tmp/freebsd.img bhyve

View File

@ -0,0 +1,26 @@
<domain type='bhyve'>
<name>bhyve</name>
<uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
<memory>219136</memory>
<memoryBacking>
<locked/>
</memoryBacking>
<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'/>
<address type='drive' controller='0' bus='0' target='2' unit='0'/>
</disk>
<interface type='bridge'>
<mac address='52:54:00:b9:94:02'/>
<model type='virtio'/>
<source bridge="virbr0"/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
</devices>
</domain>

View File

@ -179,6 +179,7 @@ mymain(void)
BHYVE_CAP_FBUF | BHYVE_CAP_XHCI;
DO_TEST("base");
DO_TEST("wired");
DO_TEST("acpiapic");
DO_TEST("disk-cdrom");
DO_TEST("disk-virtio");

View File

@ -0,0 +1,36 @@
<domain type='bhyve'>
<name>bhyve</name>
<uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
<memory unit='KiB'>219136</memory>
<currentMemory unit='KiB'>219136</currentMemory>
<memoryBacking>
<locked/>
</memoryBacking>
<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='2' 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>

View File

@ -84,6 +84,7 @@ mymain(void)
DO_TEST_DIFFERENT("acpiapic");
DO_TEST_DIFFERENT("base");
DO_TEST_DIFFERENT("wired");
DO_TEST_DIFFERENT("bhyveload-bootorder");
DO_TEST_DIFFERENT("bhyveload-bootorder1");
DO_TEST_DIFFERENT("bhyveload-bootorder2");