Sponsored by: EMC / Isilon storage division
Signed-off-by: Conrad Meyer <conrad.meyer(a)isilon.com>
---
.../bhyvexml2argv-serial-grub.args | 4 ++++
.../bhyvexml2argv-serial-grub.ldargs | 2 ++
.../bhyvexml2argv-serial-grub.xml | 26 ++++++++++++++++++++++
tests/bhyvexml2argvtest.c | 1 +
4 files changed, 33 insertions(+)
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.xml
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.args
b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.args
new file mode 100644
index 0000000..df50290
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.args
@@ -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
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs
b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs
new file mode 100644
index 0000000..5645097
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs
@@ -0,0 +1,2 @@
+/usr/local/sbin/grub-bhyve --root hd0,msdos1 --device-map '<device.map>' \
+--memory 214 --cons-dev /dev/nmdm0A bhyve
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.xml
b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.xml
new file mode 100644
index 0000000..8c451f7
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.xml
@@ -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>
diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c
index 0f8582e..d4d2133 100644
--- a/tests/bhyvexml2argvtest.c
+++ b/tests/bhyvexml2argvtest.c
@@ -140,6 +140,7 @@ mymain(void)
DO_TEST("bhyveload-explicitargs");
DO_TEST("custom-loader");
DO_TEST("disk-cdrom-grub");
+ DO_TEST("serial-grub");
virObjectUnref(driver.caps);
virObjectUnref(driver.xmlopt);
--
1.9.3