]> xenbits.xensource.com Git - libvirt.git/commitdiff
bhyve: add tests for wiring memory
authorFabian Freyer <fabian.freyer@physik.tu-berlin.de>
Wed, 9 May 2018 01:01:36 +0000 (03:01 +0200)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Sun, 13 May 2018 09:38:31 +0000 (13:38 +0400)
Signed-off-by: Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
tests/bhyveargv2xmldata/bhyveargv2xml-wired.args [new file with mode: 0644]
tests/bhyveargv2xmldata/bhyveargv2xml-wired.xml [new file with mode: 0644]
tests/bhyveargv2xmltest.c
tests/bhyvexml2argvdata/bhyvexml2argv-wired.args [new file with mode: 0644]
tests/bhyvexml2argvdata/bhyvexml2argv-wired.ldargs [new file with mode: 0644]
tests/bhyvexml2argvdata/bhyvexml2argv-wired.xml [new file with mode: 0644]
tests/bhyvexml2argvtest.c
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-wired.xml [new file with mode: 0644]
tests/bhyvexml2xmltest.c

diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-wired.args b/tests/bhyveargv2xmldata/bhyveargv2xml-wired.args
new file mode 100644 (file)
index 0000000..5d0ad76
--- /dev/null
@@ -0,0 +1,7 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-H \
+-P \
+-S \
+-s 0:0,hostbridge bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-wired.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-wired.xml
new file mode 100644 (file)
index 0000000..0f4cea5
--- /dev/null
@@ -0,0 +1,19 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <memoryBacking>
+    <locked/>
+  </memoryBacking>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type>hvm</type>
+  </os>
+  <clock offset='localtime'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>destroy</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+  </devices>
+</domain>
index e5d78530c59c9f8d9d9f95ee70c2ace428e28cc7..d5523648464b946ddb7f7f4f4382d6b9e8d66d4e 100644 (file)
@@ -163,6 +163,7 @@ mymain(void)
     driver.bhyvecaps = BHYVE_CAP_RTC_UTC;
 
     DO_TEST("base");
+    DO_TEST("wired");
     DO_TEST("oneline");
     DO_TEST("name");
     DO_TEST("console");
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-wired.args b/tests/bhyvexml2argvdata/bhyvexml2argv-wired.args
new file mode 100644 (file)
index 0000000..13d4f49
--- /dev/null
@@ -0,0 +1,10 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-S \
+-u \
+-H \
+-P \
+-s 0:0,hostbridge \
+-s 2:0,ahci,hd:/tmp/freebsd.img \
+-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-wired.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-wired.ldargs
new file mode 100644 (file)
index 0000000..32538b5
--- /dev/null
@@ -0,0 +1,3 @@
+/usr/sbin/bhyveload \
+-m 214 \
+-d /tmp/freebsd.img bhyve
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-wired.xml b/tests/bhyvexml2argvdata/bhyvexml2argv-wired.xml
new file mode 100644 (file)
index 0000000..639e047
--- /dev/null
@@ -0,0 +1,26 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory>219136</memory>
+  <memoryBacking>
+    <locked/>
+  </memoryBacking>
+  <vcpu>1</vcpu>
+  <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='drive' controller='0' bus='0' target='2' unit='0'/>
+    </disk>
+    <interface type='bridge'>
+      <mac address='52:54:00:b9:94:02'/>
+      <model type='virtio'/>
+      <source bridge="virbr0"/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </interface>
+  </devices>
+</domain>
index 6f3b0c2ebf6eaf92bdd02d6b01c68339415f1804..b08b1675f32bf28f0736b50d4ae197cb47e8c21c 100644 (file)
@@ -179,6 +179,7 @@ mymain(void)
                        BHYVE_CAP_FBUF | BHYVE_CAP_XHCI;
 
     DO_TEST("base");
+    DO_TEST("wired");
     DO_TEST("acpiapic");
     DO_TEST("disk-cdrom");
     DO_TEST("disk-virtio");
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-wired.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-wired.xml
new file mode 100644 (file)
index 0000000..ed564e2
--- /dev/null
@@ -0,0 +1,36 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <memoryBacking>
+    <locked/>
+  </memoryBacking>
+  <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='pci' index='0' model='pci-root'/>
+    <controller type='sata' index='0'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+    </controller>
+    <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>
index 4d9c1681db1215c3f78cb016333220a38b8cc399..6aaeab741ecff5f100f06ea40ee27080f876a964 100644 (file)
@@ -84,6 +84,7 @@ mymain(void)
 
     DO_TEST_DIFFERENT("acpiapic");
     DO_TEST_DIFFERENT("base");
+    DO_TEST_DIFFERENT("wired");
     DO_TEST_DIFFERENT("bhyveload-bootorder");
     DO_TEST_DIFFERENT("bhyveload-bootorder1");
     DO_TEST_DIFFERENT("bhyveload-bootorder2");