mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
bhyvexml2argv: Add test for grub console support
This commit is contained in:
parent
7c7c8b0b6c
commit
a52b56b3fd
@ -0,0 +1,4 @@
|
||||
/usr/sbin/bhyve -c 1 -m 214 -H -P -s 0:0,hostbridge \
|
||||
-s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \
|
||||
-s 2:0,ahci-hd,/tmp/freebsd.img \
|
||||
-s 1,lpc -l com1,/dev/nmdm0A bhyve
|
@ -0,0 +1 @@
|
||||
(hd0) /tmp/freebsd.img
|
@ -0,0 +1,2 @@
|
||||
/usr/local/sbin/grub-bhyve --root hd0,msdos1 --device-map '<device.map>' \
|
||||
--memory 214 bhyve
|
26
tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.xml
Normal file
26
tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.xml
Normal file
@ -0,0 +1,26 @@
|
||||
<domain type='bhyve'>
|
||||
<name>bhyve</name>
|
||||
<uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
|
||||
<memory>219136</memory>
|
||||
<vcpu>1</vcpu>
|
||||
<bootloader>/usr/local/sbin/grub-bhyve</bootloader>
|
||||
<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='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
|
||||
</disk>
|
||||
<interface type='bridge'>
|
||||
<model type='virtio'/>
|
||||
<source bridge="virbr0"/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||
</interface>
|
||||
<serial type='nmdm'>
|
||||
<source master='/dev/nmdm0A' slave='/dev/nmdm0B'/>
|
||||
</serial>
|
||||
</devices>
|
||||
</domain>
|
4
tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.args
Normal file
4
tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.args
Normal file
@ -0,0 +1,4 @@
|
||||
/usr/sbin/bhyve -c 1 -m 214 -H -P -s 0:0,hostbridge \
|
||||
-s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \
|
||||
-s 2:0,ahci-hd,/tmp/freebsd.img \
|
||||
-s 1,lpc -l com1,/dev/nmdm0A bhyve
|
1
tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.devmap
Normal file
1
tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.devmap
Normal file
@ -0,0 +1 @@
|
||||
(hd0) /tmp/freebsd.img
|
2
tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs
Normal file
2
tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs
Normal file
@ -0,0 +1,2 @@
|
||||
/usr/local/sbin/grub-bhyve --root hd0,msdos1 --device-map '<device.map>' \
|
||||
--memory 214 --cons-dev /dev/nmdm0A bhyve
|
26
tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.xml
Normal file
26
tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.xml
Normal file
@ -0,0 +1,26 @@
|
||||
<domain type='bhyve'>
|
||||
<name>bhyve</name>
|
||||
<uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
|
||||
<memory>219136</memory>
|
||||
<vcpu>1</vcpu>
|
||||
<bootloader>/usr/local/sbin/grub-bhyve</bootloader>
|
||||
<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='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
|
||||
</disk>
|
||||
<interface type='bridge'>
|
||||
<model type='virtio'/>
|
||||
<source bridge="virbr0"/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||
</interface>
|
||||
<serial type='nmdm'>
|
||||
<source master='/dev/nmdm0A' slave='/dev/nmdm0B'/>
|
||||
</serial>
|
||||
</devices>
|
||||
</domain>
|
@ -37,6 +37,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
|
||||
goto out;
|
||||
|
||||
vm.def = vmdef;
|
||||
conn->privateData = &driver;
|
||||
|
||||
if (!(cmd = virBhyveProcessBuildBhyveCmd(conn, vmdef, false)))
|
||||
goto out;
|
||||
@ -152,6 +153,7 @@ mymain(void)
|
||||
ret = -1; \
|
||||
} while (0)
|
||||
|
||||
driver.grubcaps = BHYVE_GRUB_CAP_CONSDEV;
|
||||
|
||||
DO_TEST("base");
|
||||
DO_TEST("acpiapic");
|
||||
@ -164,6 +166,11 @@ mymain(void)
|
||||
DO_TEST("bhyveload-explicitargs");
|
||||
DO_TEST("custom-loader");
|
||||
DO_TEST("disk-cdrom-grub");
|
||||
DO_TEST("serial-grub");
|
||||
|
||||
driver.grubcaps = 0;
|
||||
|
||||
DO_TEST("serial-grub-nocons");
|
||||
|
||||
virObjectUnref(driver.caps);
|
||||
virObjectUnref(driver.xmlopt);
|
||||
|
Loading…
Reference in New Issue
Block a user