diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.args b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.args new file mode 100644 index 0000000000..df50290214 --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.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-nocons.devmap b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.devmap new file mode 100644 index 0000000000..68c35da4f9 --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.devmap @@ -0,0 +1 @@ +(hd0) /tmp/freebsd.img diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.ldargs new file mode 100644 index 0000000000..91c15ce736 --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.ldargs @@ -0,0 +1,2 @@ +/usr/local/sbin/grub-bhyve --root hd0,msdos1 --device-map '' \ +--memory 214 bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.xml b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.xml new file mode 100644 index 0000000000..8c451f7fbd --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.xml @@ -0,0 +1,26 @@ + + bhyve + df3be7e7-a104-11e3-aeb0-50e5492bd3dc + 219136 + 1 + /usr/local/sbin/grub-bhyve + + hvm + + + + + + +
+ + + + +
+ + + + + + diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.args b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.args new file mode 100644 index 0000000000..df50290214 --- /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.devmap b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.devmap new file mode 100644 index 0000000000..68c35da4f9 --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.devmap @@ -0,0 +1 @@ +(hd0) /tmp/freebsd.img diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs new file mode 100644 index 0000000000..5645097d40 --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs @@ -0,0 +1,2 @@ +/usr/local/sbin/grub-bhyve --root hd0,msdos1 --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 0000000000..8c451f7fbd --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.xml @@ -0,0 +1,26 @@ + + bhyve + df3be7e7-a104-11e3-aeb0-50e5492bd3dc + 219136 + 1 + /usr/local/sbin/grub-bhyve + + hvm + + + + + + +
+ + + + +
+ + + + + + diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c index 64e6c0d52c..ec57160a8c 100644 --- a/tests/bhyvexml2argvtest.c +++ b/tests/bhyvexml2argvtest.c @@ -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);