]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
bhyve: add xml2argv tests for console
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Sun, 30 Mar 2014 11:54:52 +0000 (15:54 +0400)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Sat, 5 Apr 2014 15:12:18 +0000 (19:12 +0400)
tests/bhyvexml2argvdata/bhyvexml2argv-console.args [new file with mode: 0644]
tests/bhyvexml2argvdata/bhyvexml2argv-console.xml [new file with mode: 0644]
tests/bhyvexml2argvdata/bhyvexml2argv-serial.args [new file with mode: 0644]
tests/bhyvexml2argvdata/bhyvexml2argv-serial.xml [new file with mode: 0644]
tests/bhyvexml2argvtest.c

diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-console.args b/tests/bhyvexml2argvdata/bhyvexml2argv-console.args
new file mode 100644 (file)
index 0000000..1e09fb4
--- /dev/null
@@ -0,0 +1,4 @@
+/usr/sbin/bhyve -c 1 -m 214 -H -P -s 0:0,hostbridge \
+-s 1:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \
+-s 2:0,ahci-hd,/tmp/freebsd.img \
+-s 31,lpc -l com1,/dev/nmdm0A bhyve
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-console.xml b/tests/bhyvexml2argvdata/bhyvexml2argv-console.xml
new file mode 100644 (file)
index 0000000..64073f0
--- /dev/null
@@ -0,0 +1,23 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory>219136</memory>
+  <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'/>
+    </disk>
+    <interface type='bridge'>
+      <model type='virtio'/>
+      <source bridge="virbr0"/>
+    </interface>
+    <console type='nmdm'>
+      <source master='/dev/nmdm0A' slave='/dev/nmdm0B'/>
+    </console>
+  </devices>
+</domain>
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial.args b/tests/bhyvexml2argvdata/bhyvexml2argv-serial.args
new file mode 100644 (file)
index 0000000..1e09fb4
--- /dev/null
@@ -0,0 +1,4 @@
+/usr/sbin/bhyve -c 1 -m 214 -H -P -s 0:0,hostbridge \
+-s 1:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \
+-s 2:0,ahci-hd,/tmp/freebsd.img \
+-s 31,lpc -l com1,/dev/nmdm0A bhyve
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial.xml b/tests/bhyvexml2argvdata/bhyvexml2argv-serial.xml
new file mode 100644 (file)
index 0000000..bfecbb9
--- /dev/null
@@ -0,0 +1,23 @@
+<domain type='bhyve'>
+  <name>bhyve</name>
+  <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+  <memory>219136</memory>
+  <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'/>
+    </disk>
+    <interface type='bridge'>
+      <model type='virtio'/>
+      <source bridge="virbr0"/>
+    </interface>
+    <serial type='nmdm'>
+      <source master='/dev/nmdm0A' slave='/dev/nmdm0B'/>
+    </serial>
+  </devices>
+</domain>
index cb33fbfac0c000effb0d357488f9d24b7359ebf1..b37fbb04832f8943b26792566f26f166955c5bf5 100644 (file)
@@ -132,6 +132,8 @@ mymain(void)
     DO_TEST("acpiapic");
     DO_TEST("disk-virtio");
     DO_TEST("macaddr");
+    DO_TEST("serial");
+    DO_TEST("console");
 
     virObjectUnref(driver.caps);
     virObjectUnref(driver.xmlopt);