[PATCHv7 4/7] bhyvexml2argv: Add tests for domain-configured bootloader, args

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 .../bhyvexml2argv-bhyveload-explicitargs.args      |  3 +++
 .../bhyvexml2argv-bhyveload-explicitargs.ldargs    |  1 +
 .../bhyvexml2argv-bhyveload-explicitargs.xml       | 23 +++++++++++++++++++++
 .../bhyvexml2argv-custom-loader.args               |  3 +++
 .../bhyvexml2argv-custom-loader.ldargs             |  1 +
 .../bhyvexml2argv-custom-loader.xml                | 24 ++++++++++++++++++++++
 .../bhyvexml2argv-disk-cdrom-grub.args             |  3 +++
 .../bhyvexml2argv-disk-cdrom-grub.devmap           |  1 +
 .../bhyvexml2argv-disk-cdrom-grub.ldargs           |  2 ++
 .../bhyvexml2argv-disk-cdrom-grub.xml              | 23 +++++++++++++++++++++
 .../bhyvexml2argv-grub-defaults.args               |  3 +++
 .../bhyvexml2argv-grub-defaults.devmap             |  1 +
 .../bhyvexml2argv-grub-defaults.ldargs             |  2 ++
 .../bhyvexml2argv-grub-defaults.xml                | 23 +++++++++++++++++++++
 tests/bhyvexml2argvtest.c                          |  4 ++++
 15 files changed, 117 insertions(+)
 create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.args
 create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.ldargs
 create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.xml
 create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.args
 create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.ldargs
 create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.xml
 create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.args
 create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.devmap
 create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.ldargs
 create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.xml
 create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.args
 create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.devmap
 create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.ldargs
 create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.xml

diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.args b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.args
new file mode 100644
index 0000000..4122e62
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.args
@@ -0,0 +1,3 @@
+/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 bhyve
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.ldargs
new file mode 100644
index 0000000..a3f58f0
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.ldargs
@@ -0,0 +1 @@
+/usr/sbin/bhyveload -X -Y -Z
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.xml b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.xml
new file mode 100644
index 0000000..65823cd
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.xml
@@ -0,0 +1,23 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory>219136</memory>
+  <vcpu>1</vcpu>
+  <bootloader_args>-X -Y -Z</bootloader_args>
+  <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>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.args b/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.args
new file mode 100644
index 0000000..4122e62
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.args
@@ -0,0 +1,3 @@
+/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 bhyve
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.ldargs
new file mode 100644
index 0000000..100e163
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.ldargs
@@ -0,0 +1 @@
+/fizz_buzz_bazz -X -Y -Z
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.xml b/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.xml
new file mode 100644
index 0000000..e9e0d5e
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.xml
@@ -0,0 +1,24 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory>219136</memory>
+  <vcpu>1</vcpu>
+  <bootloader>/fizz_buzz_bazz</bootloader>
+  <bootloader_args>-X -Y -Z</bootloader_args>
+  <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>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.args b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.args
new file mode 100644
index 0000000..eb38969
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.args
@@ -0,0 +1,3 @@
+/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-cd,/tmp/cdrom.iso bhyve
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.devmap b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.devmap
new file mode 100644
index 0000000..47d4364
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.devmap
@@ -0,0 +1 @@
+(cd) /tmp/cdrom.iso
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.ldargs
new file mode 100644
index 0000000..d9161ba
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.ldargs
@@ -0,0 +1,2 @@
+/usr/local/sbin/grub-bhyve --root cd --device-map '<device.map>' --memory 214 \
+bhyve
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.xml b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.xml
new file mode 100644
index 0000000..00708e6
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.xml
@@ -0,0 +1,23 @@
+<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' device='cdrom'>
+      <driver name='file' type='raw'/>
+      <source file='/tmp/cdrom.iso'/>
+      <target dev='hdc' 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>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.args b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.args
new file mode 100644
index 0000000..4122e62
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.args
@@ -0,0 +1,3 @@
+/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 bhyve
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.devmap b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.devmap
new file mode 100644
index 0000000..68c35da
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.devmap
@@ -0,0 +1 @@
+(hd0) /tmp/freebsd.img
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.ldargs
new file mode 100644
index 0000000..91c15ce
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.ldargs
@@ -0,0 +1,2 @@
+/usr/local/sbin/grub-bhyve --root hd0,msdos1 --device-map '<device.map>' \
+--memory 214 bhyve
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.xml b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.xml
new file mode 100644
index 0000000..27b7fd9
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.xml
@@ -0,0 +1,23 @@
+<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>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c
index 3ff6696..64e6c0d 100644
--- a/tests/bhyvexml2argvtest.c
+++ b/tests/bhyvexml2argvtest.c
@@ -160,6 +160,10 @@ mymain(void)
     DO_TEST("macaddr");
     DO_TEST("serial");
     DO_TEST("console");
+    DO_TEST("grub-defaults");
+    DO_TEST("bhyveload-explicitargs");
+    DO_TEST("custom-loader");
+    DO_TEST("disk-cdrom-grub");
 
     virObjectUnref(driver.caps);
     virObjectUnref(driver.xmlopt);
-- 
1.9.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]