diff --git a/tests/Makefile.am b/tests/Makefile.am
index 16395403da..fb2380dd33 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -86,6 +86,7 @@ MOCKLIBS_LIBS = \
EXTRA_DIST = \
.valgrind.supp \
bhyvexml2argvdata \
+ bhyveargv2xmldata \
bhyvexml2xmloutdata \
capabilityschemadata \
commanddata \
@@ -284,7 +285,7 @@ test_programs += vmwarevertest
endif WITH_VMWARE
if WITH_BHYVE
-test_programs += bhyvexml2argvtest bhyvexml2xmltest
+test_programs += bhyvexml2argvtest bhyvexml2xmltest bhyveargv2xmltest
endif WITH_BHYVE
if WITH_CIL
@@ -416,7 +417,7 @@ test_libraries += libqemumonitortestutils.la \
endif WITH_QEMU
if WITH_BHYVE
-test_libraries += bhyvexml2argvmock.la
+test_libraries += bhyvexml2argvmock.la bhyveargv2xmlmock.la
endif WITH_BHYVE
if WITH_DBUS
@@ -742,6 +743,12 @@ bhyvexml2argvmock_la_CFLAGS = $(AM_CFLAGS)
bhyvexml2argvmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
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
if WITH_STORAGE
bhyve_LDADDS += ../src/libvirt_driver_storage_impl.la
@@ -756,8 +763,18 @@ bhyvexml2xmltest_SOURCES = \
bhyvexml2xmltest.c \
testutils.c testutils.h
bhyvexml2xmltest_LDADD = $(bhyve_LDADDS)
+
+bhyveargv2xmltest_SOURCES = \
+ bhyveargv2xmltest.c \
+ testutils.c testutils.h
+bhyveargv2xmltest_LDADD = $(bhyve_LDADDS)
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
networkxml2xmltest_SOURCES = \
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-acpiapic.args b/tests/bhyveargv2xmldata/bhyveargv2xml-acpiapic.args
new file mode 100644
index 0000000000..1ed5beebbb
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-acpiapic.args
@@ -0,0 +1,8 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-A \
+-I \
+-H \
+-P \
+-s 0:0,hostbridge bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-acpiapic.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-acpiapic.xml
new file mode 100644
index 0000000000..d6c940ff67
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-acpiapic.xml
@@ -0,0 +1,20 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+
+
+
+
+ destroy
+ destroy
+ destroy
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-ahci-hd.args b/tests/bhyveargv2xmldata/bhyveargv2xml-ahci-hd.args
new file mode 100644
index 0000000000..b1058db7b9
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-ahci-hd.args
@@ -0,0 +1,7 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-H \
+-P \
+-s 0:0,hostbridge \
+-s 2:0,ahci-hd,/tmp/freebsd.img bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-ahci-hd.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-ahci-hd.xml
new file mode 100644
index 0000000000..fcf0fee06c
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-ahci-hd.xml
@@ -0,0 +1,21 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
+
+
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-base.args b/tests/bhyveargv2xmldata/bhyveargv2xml-base.args
new file mode 100644
index 0000000000..7bb309ef8d
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-base.args
@@ -0,0 +1,6 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-H \
+-P \
+-s 0:0,hostbridge bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-base.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-base.xml
new file mode 100644
index 0000000000..68d9f10a56
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-base.xml
@@ -0,0 +1,16 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-bootorder.args b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-bootorder.args
new file mode 100644
index 0000000000..49c8a96774
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-bootorder.args
@@ -0,0 +1,11 @@
+/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
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-bootorder.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-bootorder.xml
new file mode 100644
index 0000000000..3d7a67e278
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-bootorder.xml
@@ -0,0 +1,27 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-custom.args b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-custom.args
new file mode 100644
index 0000000000..d8820a7e17
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-custom.args
@@ -0,0 +1,9 @@
+/usr/sbin/bhyveload \
+-m 214 \
+-S bhyve
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-H \
+-P \
+-s 0:0,hostbridge bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-custom.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-custom.xml
new file mode 100644
index 0000000000..077c089b86
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-custom.xml
@@ -0,0 +1,18 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+ /usr/sbin/bhyveload
+ -m 214 -S bhyve
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-mem-mismatch.args b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-mem-mismatch.args
new file mode 100644
index 0000000000..0c9061b412
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-mem-mismatch.args
@@ -0,0 +1,10 @@
+/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
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-memsize-fail.args b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-memsize-fail.args
new file mode 100644
index 0000000000..4dc7f8496d
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-memsize-fail.args
@@ -0,0 +1,10 @@
+/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
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-name-mismatch.args b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-name-mismatch.args
new file mode 100644
index 0000000000..360083bfc0
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-name-mismatch.args
@@ -0,0 +1,10 @@
+/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
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-vda.args b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-vda.args
new file mode 100644
index 0000000000..d6bd1f63a4
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-vda.args
@@ -0,0 +1,10 @@
+/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
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-vda.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-vda.xml
new file mode 100644
index 0000000000..adbf7f1886
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-vda.xml
@@ -0,0 +1,21 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
+
+
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-bhyverun-mem-mismatch.args b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyverun-mem-mismatch.args
new file mode 100644
index 0000000000..ff18735354
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyverun-mem-mismatch.args
@@ -0,0 +1,10 @@
+/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
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-bhyverun-name-mismatch.args b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyverun-name-mismatch.args
new file mode 100644
index 0000000000..c43cb240b9
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-bhyverun-name-mismatch.args
@@ -0,0 +1,10 @@
+/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
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-cdrom.args b/tests/bhyveargv2xmldata/bhyveargv2xml-cdrom.args
new file mode 100644
index 0000000000..f5cd2acd4c
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-cdrom.args
@@ -0,0 +1,7 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-H \
+-P \
+-s 0:0,hostbridge \
+-s 2:0,ahci-cd,/tmp/freebsd.iso bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-cdrom.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-cdrom.xml
new file mode 100644
index 0000000000..b42b79b8b2
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-cdrom.xml
@@ -0,0 +1,21 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
+
+
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-console.args b/tests/bhyveargv2xmldata/bhyveargv2xml-console.args
new file mode 100644
index 0000000000..44e9754562
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-console.args
@@ -0,0 +1,9 @@
+/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
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-console.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-console.xml
new file mode 100644
index 0000000000..3aa4abb74f
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-console.xml
@@ -0,0 +1,24 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-console2.args b/tests/bhyveargv2xmldata/bhyveargv2xml-console2.args
new file mode 100644
index 0000000000..025110dfb2
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-console2.args
@@ -0,0 +1,9 @@
+/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
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-console2.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-console2.xml
new file mode 100644
index 0000000000..12467e968b
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-console2.xml
@@ -0,0 +1,15 @@
+
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-console3.args b/tests/bhyveargv2xmldata/bhyveargv2xml-console3.args
new file mode 100644
index 0000000000..11ce7b3b07
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-console3.args
@@ -0,0 +1,10 @@
+/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
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-console3.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-console3.xml
new file mode 100644
index 0000000000..2aea6c46d0
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-console3.xml
@@ -0,0 +1,27 @@
+
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-console4.args b/tests/bhyveargv2xmldata/bhyveargv2xml-console4.args
new file mode 100644
index 0000000000..c068dd5fd3
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-console4.args
@@ -0,0 +1,9 @@
+/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
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-console4.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-console4.xml
new file mode 100644
index 0000000000..12467e968b
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-console4.xml
@@ -0,0 +1,15 @@
+
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-custom-loader.args b/tests/bhyveargv2xmldata/bhyveargv2xml-custom-loader.args
new file mode 100644
index 0000000000..8350ff3870
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-custom-loader.args
@@ -0,0 +1,9 @@
+/usr/bin/custom-loader \
+-s ome \
+--args
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-H \
+-P \
+-s 0:0,hostbridge bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-custom-loader.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-custom-loader.xml
new file mode 100644
index 0000000000..3e9bd29699
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-custom-loader.xml
@@ -0,0 +1,18 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+ /usr/bin/custom-loader
+ with several arguments
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-disk-toomany.args b/tests/bhyveargv2xmldata/bhyveargv2xml-disk-toomany.args
new file mode 100644
index 0000000000..002c9ac055
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-disk-toomany.args
@@ -0,0 +1,33 @@
+/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
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-disk-toomany.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-disk-toomany.xml
new file mode 100644
index 0000000000..6e0c06ce30
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-disk-toomany.xml
@@ -0,0 +1,146 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-extraargs.args b/tests/bhyveargv2xmldata/bhyveargv2xml-extraargs.args
new file mode 100644
index 0000000000..3b4f194c81
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-extraargs.args
@@ -0,0 +1,6 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-H \
+-P \
+-s 0:0,hostbridge bhyve bogus
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-memsize-fail.args b/tests/bhyveargv2xmldata/bhyveargv2xml-memsize-fail.args
new file mode 100644
index 0000000000..517439f407
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-memsize-fail.args
@@ -0,0 +1,6 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m bogus \
+-H \
+-P \
+-s 0:0,hostbridge bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-memsize-human.args b/tests/bhyveargv2xmldata/bhyveargv2xml-memsize-human.args
new file mode 100644
index 0000000000..453fe4aeed
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-memsize-human.args
@@ -0,0 +1,6 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214M \
+-H \
+-P \
+-s 0:0,hostbridge bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-memsize-human.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-memsize-human.xml
new file mode 100644
index 0000000000..68d9f10a56
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-memsize-human.xml
@@ -0,0 +1,16 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-memsize-large.args b/tests/bhyveargv2xmldata/bhyveargv2xml-memsize-large.args
new file mode 100644
index 0000000000..a361f97a9e
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-memsize-large.args
@@ -0,0 +1,6 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 224395264 \
+-H \
+-P \
+-s 0:0,hostbridge bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-memsize-large.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-memsize-large.xml
new file mode 100644
index 0000000000..68d9f10a56
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-memsize-large.xml
@@ -0,0 +1,16 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-name.args b/tests/bhyveargv2xmldata/bhyveargv2xml-name.args
new file mode 100644
index 0000000000..244dc31cff
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-name.args
@@ -0,0 +1,6 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-H \
+-P \
+-s 0:0,hostbridge name
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-name.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-name.xml
new file mode 100644
index 0000000000..e241f2b357
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-name.xml
@@ -0,0 +1,16 @@
+
+ name
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-oneline.args b/tests/bhyveargv2xmldata/bhyveargv2xml-oneline.args
new file mode 100644
index 0000000000..a9b7112385
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-oneline.args
@@ -0,0 +1,6 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-H \
+-P \
+-s 0:0,hostbridge bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-oneline.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-oneline.xml
new file mode 100644
index 0000000000..68d9f10a56
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-oneline.xml
@@ -0,0 +1,16 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-utc.args b/tests/bhyveargv2xmldata/bhyveargv2xml-utc.args
new file mode 100644
index 0000000000..57a7c9d5a2
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-utc.args
@@ -0,0 +1,7 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-u \
+-H \
+-P \
+-s 0:0,hostbridge bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-utc.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-utc.xml
new file mode 100644
index 0000000000..8e4e1a3024
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-utc.xml
@@ -0,0 +1,16 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-uuid.args b/tests/bhyveargv2xmldata/bhyveargv2xml-uuid.args
new file mode 100644
index 0000000000..90497f5636
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-uuid.args
@@ -0,0 +1,7 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-H \
+-P \
+-U 2a793ea6-8e52-440a-8458-355e98492e17 \
+-s 0:0,hostbridge bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-uuid.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-uuid.xml
new file mode 100644
index 0000000000..2a1dd9f906
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-uuid.xml
@@ -0,0 +1,16 @@
+
+ bhyve
+ 2a793ea6-8e52-440a-8458-355e98492e17
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-uuid2.args b/tests/bhyveargv2xmldata/bhyveargv2xml-uuid2.args
new file mode 100644
index 0000000000..e0d8f65dde
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-uuid2.args
@@ -0,0 +1,7 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-H \
+-P \
+-U garbage \
+-s 0:0,hostbridge bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vcpus.args b/tests/bhyveargv2xmldata/bhyveargv2xml-vcpus.args
new file mode 100644
index 0000000000..ab854b42b2
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vcpus.args
@@ -0,0 +1,6 @@
+/usr/sbin/bhyve \
+-c 4 \
+-m 214 \
+-H \
+-P \
+-s 0:0,hostbridge bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vcpus.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-vcpus.xml
new file mode 100644
index 0000000000..1b83940c49
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vcpus.xml
@@ -0,0 +1,16 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 4
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-blk.args b/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-blk.args
new file mode 100644
index 0000000000..7d6a94495a
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-blk.args
@@ -0,0 +1,7 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-H \
+-P \
+-s 0:0,hostbridge \
+-s 2:0,virtio-blk,/tmp/freebsd.img bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-blk.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-blk.xml
new file mode 100644
index 0000000000..adbf7f1886
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-blk.xml
@@ -0,0 +1,21 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
+
+
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net.args b/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net.args
new file mode 100644
index 0000000000..acac476802
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net.args
@@ -0,0 +1,8 @@
+/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
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net.xml
new file mode 100644
index 0000000000..09cc79b923
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net.xml
@@ -0,0 +1,26 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net2.args b/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net2.args
new file mode 100644
index 0000000000..3557011c82
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net2.args
@@ -0,0 +1,7 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-H \
+-P \
+-s 0:0,hostbridge \
+-s 1:0,virtio-net,notatap bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net2.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net2.xml
new file mode 100644
index 0000000000..68d9f10a56
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net2.xml
@@ -0,0 +1,16 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net3.args b/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net3.args
new file mode 100644
index 0000000000..cec6fa0636
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net3.args
@@ -0,0 +1,7 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-H \
+-P \
+-s 0:0,hostbridge \
+-s 1:1,virtio-net,tap1,notamac bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net3.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net3.xml
new file mode 100644
index 0000000000..68d9f10a56
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net3.xml
@@ -0,0 +1,16 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net4.args b/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net4.args
new file mode 100644
index 0000000000..50b087b233
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net4.args
@@ -0,0 +1,7 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-H \
+-P \
+-s 0:0,hostbridge \
+-s 1:1,virtio-net,tap1,mac=garbage bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net4.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net4.xml
new file mode 100644
index 0000000000..e1bda46a16
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net4.xml
@@ -0,0 +1,21 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
+
+
+
+
+
diff --git a/tests/bhyveargv2xmlmock.c b/tests/bhyveargv2xmlmock.c
new file mode 100644
index 0000000000..1f08bebb7b
--- /dev/null
+++ b/tests/bhyveargv2xmlmock.c
@@ -0,0 +1,27 @@
+#include
+
+#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;
+}
diff --git a/tests/bhyveargv2xmltest.c b/tests/bhyveargv2xmltest.c
new file mode 100644
index 0000000000..0995f69282
--- /dev/null
+++ b/tests/bhyveargv2xmltest.c
@@ -0,0 +1,214 @@
+#include
+
+#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 */