]> xenbits.xensource.com Git - libvirt.git/commitdiff
bhyvexml2xmltest: Test more XMLs
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 26 Dec 2016 11:23:27 +0000 (12:23 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 2 Jan 2017 12:30:40 +0000 (13:30 +0100)
Currently, bhyvexml2xmltest does only one test. We can do better.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
22 files changed:
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-acpiapic.xml [new file with mode: 0644]
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-base.xml [new file with mode: 0644]
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder.xml [new file with mode: 0644]
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder1.xml [new file with mode: 0644]
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder2.xml [new file with mode: 0644]
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder3.xml [new file with mode: 0644]
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder4.xml [new file with mode: 0644]
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-explicitargs.xml [new file with mode: 0644]
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-console.xml [new file with mode: 0644]
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-custom-loader.xml [new file with mode: 0644]
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-cdrom-grub.xml [new file with mode: 0644]
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-cdrom.xml [new file with mode: 0644]
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-virtio.xml [new file with mode: 0644]
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-bootorder.xml [new file with mode: 0644]
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-bootorder2.xml [new file with mode: 0644]
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-defaults.xml [new file with mode: 0644]
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-localtime.xml [new file with mode: 0644]
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-macaddr.xml [new file with mode: 0644]
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial-grub-nocons.xml [new file with mode: 0644]
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial-grub.xml [new file with mode: 0644]
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial.xml [new file with mode: 0644]
tests/bhyvexml2xmltest.c

diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-acpiapic.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-acpiapic.xml
new file mode 100644 (file)
index 0000000..b4720ec
--- /dev/null
@@ -0,0 +1,34 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='x86_64'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <features>
+    <acpi/>
+    <apic/>
+  </features>
+  <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='sata' index='0'/>
+    <interface type='bridge'>
+      <mac address='52:54:00:81:c4:b1'/>
+      <source bridge='virbr0'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-base.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-base.xml
new file mode 100644 (file)
index 0000000..cd4e4f8
--- /dev/null
@@ -0,0 +1,30 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <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='sata' index='0'/>
+    <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>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder.xml
new file mode 100644 (file)
index 0000000..ab01cb5
--- /dev/null
@@ -0,0 +1,37 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='x86_64'>hvm</type>
+    <boot dev='cdrom'/>
+  </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>
+    <disk type='file' device='cdrom'>
+      <driver name='file' type='raw'/>
+      <source file='/tmp/cdrom.iso'/>
+      <target dev='hdb' bus='sata'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='0' target='4' unit='0'/>
+    </disk>
+    <controller type='sata' index='0'/>
+    <interface type='bridge'>
+      <mac address='52:54:00:8d:10:e1'/>
+      <source bridge='virbr0'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder1.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder1.xml
new file mode 100644 (file)
index 0000000..df69c4e
--- /dev/null
@@ -0,0 +1,37 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <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>
+    <disk type='file' device='cdrom'>
+      <driver name='file' type='raw'/>
+      <source file='/tmp/cdrom.iso'/>
+      <target dev='hdb' bus='sata'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='0' target='4' unit='0'/>
+    </disk>
+    <controller type='sata' index='0'/>
+    <interface type='bridge'>
+      <mac address='52:54:00:92:68:0e'/>
+      <source bridge='virbr0'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder2.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder2.xml
new file mode 100644 (file)
index 0000000..89131dc
--- /dev/null
@@ -0,0 +1,30 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='x86_64'>hvm</type>
+    <boot dev='cdrom'/>
+  </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='sata' index='0'/>
+    <interface type='bridge'>
+      <mac address='52:54:00:1e:63:25'/>
+      <source bridge='virbr0'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder3.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder3.xml
new file mode 100644 (file)
index 0000000..96f9dc4
--- /dev/null
@@ -0,0 +1,37 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='x86_64'>hvm</type>
+  </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>
+    <disk type='file' device='cdrom'>
+      <driver name='file' type='raw'/>
+      <source file='/tmp/cdrom.iso'/>
+      <target dev='hdc' bus='sata'/>
+      <readonly/>
+      <boot order='1'/>
+      <address type='drive' controller='0' bus='0' target='4' unit='0'/>
+    </disk>
+    <controller type='sata' index='0'/>
+    <interface type='bridge'>
+      <mac address='52:54:00:7a:f5:a4'/>
+      <source bridge='virbr0'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder4.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder4.xml
new file mode 100644 (file)
index 0000000..1dd180b
--- /dev/null
@@ -0,0 +1,38 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='x86_64'>hvm</type>
+  </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'/>
+      <boot order='2'/>
+      <address type='drive' controller='0' bus='0' target='2' unit='0'/>
+    </disk>
+    <disk type='file' device='cdrom'>
+      <driver name='file' type='raw'/>
+      <source file='/tmp/cdrom.iso'/>
+      <target dev='hdb' bus='sata'/>
+      <readonly/>
+      <boot order='1'/>
+      <address type='drive' controller='0' bus='0' target='4' unit='0'/>
+    </disk>
+    <controller type='sata' index='0'/>
+    <interface type='bridge'>
+      <mac address='52:54:00:fe:97:82'/>
+      <source bridge='virbr0'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-explicitargs.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-explicitargs.xml
new file mode 100644 (file)
index 0000000..d7743a6
--- /dev/null
@@ -0,0 +1,30 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <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='sata' index='0'/>
+    <interface type='bridge'>
+      <mac address='52:54:00:11:bd:26'/>
+      <source bridge='virbr0'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-console.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-console.xml
new file mode 100644 (file)
index 0000000..bf926f9
--- /dev/null
@@ -0,0 +1,38 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <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='sata' index='0'/>
+    <interface type='bridge'>
+      <mac address='52:54:00:b1:42:eb'/>
+      <source bridge='virbr0'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+    <serial type='nmdm'>
+      <source master='/dev/nmdm0A' slave='/dev/nmdm0B'/>
+      <target port='0'/>
+    </serial>
+    <console type='nmdm'>
+      <source master='/dev/nmdm0A' slave='/dev/nmdm0B'/>
+      <target type='serial' port='0'/>
+    </console>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-custom-loader.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-custom-loader.xml
new file mode 100644 (file)
index 0000000..3e7f145
--- /dev/null
@@ -0,0 +1,31 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <bootloader>/fizz_buzz_bazz</bootloader>
+  <bootloader_args>-X -Y -Z</bootloader_args>
+  <os>
+    <type arch='x86_64'>hvm</type>
+  </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='sata' index='0'/>
+    <interface type='bridge'>
+      <mac address='52:54:00:35:99:c2'/>
+      <source bridge='virbr0'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-cdrom-grub.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-cdrom-grub.xml
new file mode 100644 (file)
index 0000000..285842c
--- /dev/null
@@ -0,0 +1,31 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <bootloader>/usr/local/sbin/grub-bhyve</bootloader>
+  <os>
+    <type arch='x86_64'>hvm</type>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <disk type='file' device='cdrom'>
+      <driver name='file' type='raw'/>
+      <source file='/tmp/cdrom.iso'/>
+      <target dev='hdc' bus='sata'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='0' target='2' unit='0'/>
+    </disk>
+    <controller type='sata' index='0'/>
+    <interface type='bridge'>
+      <mac address='52:54:00:6f:6a:53'/>
+      <source bridge='virbr0'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-cdrom.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-cdrom.xml
new file mode 100644 (file)
index 0000000..02517e4
--- /dev/null
@@ -0,0 +1,31 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='x86_64'>hvm</type>
+    <boot dev='cdrom'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <disk type='file' device='cdrom'>
+      <driver name='file' type='raw'/>
+      <source file='/tmp/cdrom.iso'/>
+      <target dev='hdc' bus='sata'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='0' target='2' unit='0'/>
+    </disk>
+    <controller type='sata' index='0'/>
+    <interface type='bridge'>
+      <mac address='52:54:00:e3:ec:9b'/>
+      <source bridge='virbr0'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-virtio.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-virtio.xml
new file mode 100644 (file)
index 0000000..065ae81
--- /dev/null
@@ -0,0 +1,29 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <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='vda' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+    </disk>
+    <interface type='bridge'>
+      <mac address='52:54:00:bc:85:fe'/>
+      <source bridge='virbr0'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-bootorder.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-bootorder.xml
new file mode 100644 (file)
index 0000000..939f7ba
--- /dev/null
@@ -0,0 +1,43 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <bootloader>/usr/local/sbin/grub-bhyve</bootloader>
+  <os>
+    <type arch='x86_64'>hvm</type>
+  </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/freebsd1.img'/>
+      <target dev='hda' bus='sata'/>
+      <address type='drive' controller='0' bus='0' target='2' unit='0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='file' type='raw'/>
+      <source file='/tmp/freebsd2.img'/>
+      <target dev='hdb' bus='sata'/>
+      <address type='drive' controller='0' bus='0' target='4' unit='0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='file' type='raw'/>
+      <source file='/tmp/freebsd3.img'/>
+      <target dev='hdc' bus='sata'/>
+      <boot order='1'/>
+      <address type='drive' controller='0' bus='0' target='6' unit='0'/>
+    </disk>
+    <controller type='sata' index='0'/>
+    <interface type='bridge'>
+      <mac address='52:54:00:f4:6c:be'/>
+      <source bridge='virbr0'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-bootorder2.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-bootorder2.xml
new file mode 100644 (file)
index 0000000..f774411
--- /dev/null
@@ -0,0 +1,45 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <bootloader>/usr/local/sbin/grub-bhyve</bootloader>
+  <os>
+    <type arch='x86_64'>hvm</type>
+  </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/freebsd1.img'/>
+      <target dev='hda' bus='sata'/>
+      <boot order='111'/>
+      <address type='drive' controller='0' bus='0' target='2' unit='0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='file' type='raw'/>
+      <source file='/tmp/freebsd2.img'/>
+      <target dev='hdb' bus='sata'/>
+      <boot order='22'/>
+      <address type='drive' controller='0' bus='0' target='4' unit='0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='file' type='raw'/>
+      <source file='/tmp/freebsd3.img'/>
+      <target dev='hdc' bus='sata'/>
+      <boot order='3'/>
+      <address type='drive' controller='0' bus='0' target='6' unit='0'/>
+    </disk>
+    <controller type='sata' index='0'/>
+    <interface type='bridge'>
+      <mac address='52:54:00:0e:d2:6f'/>
+      <source bridge='virbr0'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-defaults.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-defaults.xml
new file mode 100644 (file)
index 0000000..758986b
--- /dev/null
@@ -0,0 +1,30 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <bootloader>/usr/local/sbin/grub-bhyve</bootloader>
+  <os>
+    <type arch='x86_64'>hvm</type>
+  </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='sata' index='0'/>
+    <interface type='bridge'>
+      <mac address='52:54:00:ee:f5:79'/>
+      <source bridge='virbr0'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-localtime.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-localtime.xml
new file mode 100644 (file)
index 0000000..7e08ff9
--- /dev/null
@@ -0,0 +1,30 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='x86_64'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='localtime'/>
+  <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='sata' index='0'/>
+    <interface type='bridge'>
+      <mac address='52:54:00:82:ca:a3'/>
+      <source bridge='virbr0'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-macaddr.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-macaddr.xml
new file mode 100644 (file)
index 0000000..4e4e672
--- /dev/null
@@ -0,0 +1,30 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <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='sata' index='0'/>
+    <interface type='bridge'>
+      <mac address='52:54:00:22:ee:11'/>
+      <source bridge='virbr0'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial-grub-nocons.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial-grub-nocons.xml
new file mode 100644 (file)
index 0000000..a379f12
--- /dev/null
@@ -0,0 +1,38 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <bootloader>/usr/local/sbin/grub-bhyve</bootloader>
+  <os>
+    <type arch='x86_64'>hvm</type>
+  </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='sata' index='0'/>
+    <interface type='bridge'>
+      <mac address='52:54:00:a7:cd:5b'/>
+      <source bridge='virbr0'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+    <serial type='nmdm'>
+      <source master='/dev/nmdm0A' slave='/dev/nmdm0B'/>
+      <target port='0'/>
+    </serial>
+    <console type='nmdm'>
+      <source master='/dev/nmdm0A' slave='/dev/nmdm0B'/>
+      <target type='serial' port='0'/>
+    </console>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial-grub.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial-grub.xml
new file mode 100644 (file)
index 0000000..2864089
--- /dev/null
@@ -0,0 +1,38 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <bootloader>/usr/local/sbin/grub-bhyve</bootloader>
+  <os>
+    <type arch='x86_64'>hvm</type>
+  </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='sata' index='0'/>
+    <interface type='bridge'>
+      <mac address='52:54:00:f0:72:11'/>
+      <source bridge='virbr0'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+    <serial type='nmdm'>
+      <source master='/dev/nmdm0A' slave='/dev/nmdm0B'/>
+      <target port='0'/>
+    </serial>
+    <console type='nmdm'>
+      <source master='/dev/nmdm0A' slave='/dev/nmdm0B'/>
+      <target type='serial' port='0'/>
+    </console>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial.xml
new file mode 100644 (file)
index 0000000..954c58a
--- /dev/null
@@ -0,0 +1,38 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <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='sata' index='0'/>
+    <interface type='bridge'>
+      <mac address='52:54:00:4f:f3:5b'/>
+      <source bridge='virbr0'/>
+      <model type='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+    <serial type='nmdm'>
+      <source master='/dev/nmdm0A' slave='/dev/nmdm0B'/>
+      <target port='0'/>
+    </serial>
+    <console type='nmdm'>
+      <source master='/dev/nmdm0A' slave='/dev/nmdm0B'/>
+      <target type='serial' port='0'/>
+    </console>
+  </devices>
+</domain>
index 756d5d2fc099e02dacf6af387fbb8361f8373b85..e95cee4b8e8ecdad987a85a3222918ac29d09653 100644 (file)
@@ -63,7 +63,28 @@ mymain(void)
 # define DO_TEST_DIFFERENT(name) \
     DO_TEST_FULL(name, true)
 
+    DO_TEST_DIFFERENT("acpiapic");
+    DO_TEST_DIFFERENT("base");
+    DO_TEST_DIFFERENT("bhyveload-bootorder");
+    DO_TEST_DIFFERENT("bhyveload-bootorder1");
+    DO_TEST_DIFFERENT("bhyveload-bootorder2");
+    DO_TEST_DIFFERENT("bhyveload-bootorder3");
+    DO_TEST_DIFFERENT("bhyveload-bootorder4");
+    DO_TEST_DIFFERENT("bhyveload-explicitargs");
+    DO_TEST_DIFFERENT("console");
+    DO_TEST_DIFFERENT("custom-loader");
+    DO_TEST_DIFFERENT("disk-cdrom");
+    DO_TEST_DIFFERENT("disk-cdrom-grub");
+    DO_TEST_DIFFERENT("disk-virtio");
+    DO_TEST_DIFFERENT("grub-bootorder");
+    DO_TEST_DIFFERENT("grub-bootorder2");
+    DO_TEST_DIFFERENT("grub-defaults");
+    DO_TEST_DIFFERENT("localtime");
+    DO_TEST_DIFFERENT("macaddr");
     DO_TEST_DIFFERENT("metadata");
+    DO_TEST_DIFFERENT("serial");
+    DO_TEST_DIFFERENT("serial-grub");
+    DO_TEST_DIFFERENT("serial-grub-nocons");
 
     virObjectUnref(driver.caps);
     virObjectUnref(driver.xmlopt);