[libvirt] [PATCH v3 4/4] tests: add dtb test case

Olivia Yin hong-hua.yin at freescale.com
Wed Feb 27 08:28:40 UTC 2013


Signed-off-by: Olivia Yin <hong-hua.yin at freescale.com>
---
 tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.args |    1 +
 tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.xml  |   28 ++++++++++++++++++++++
 tests/qemuxml2argvtest.c                         |    2 +
 3 files changed, 31 insertions(+), 0 deletions(-)
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.xml

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.args b/tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.args
new file mode 100644
index 0000000..99ee22c
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.args
@@ -0,0 +1 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu-system-ppc -M ppce500v2 -enable-kvm -m 256 -nographic -kernel /media/ram/uImage -initrd /media/ram/ramdisk -append "root=/dev/ram rw console=ttyS0,115200" -dtb /media/ram/test.dtb -serial pty
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.xml b/tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.xml
new file mode 100644
index 0000000..3674621
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.xml
@@ -0,0 +1,28 @@
+<domain type='kvm'>
+  <name>QEMUGuest1</name>
+  <uuid>49545eb3-75e1-2d0a-acdd-f0294406c99e</uuid>
+  <memory unit='KiB'>262144</memory>
+  <currentMemory unit='KiB'>262144</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='ppc' machine='ppce500v2'>hvm</type>
+    <kernel>/media/ram/uImage</kernel>
+    <initrd>/media/ram/ramdisk</initrd>
+    <cmdline>root=/dev/ram rw console=ttyS0,115200</cmdline>
+    <dtb>/media/ram/test.dtb</dtb>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-ppc</emulator>
+    <serial type='pty'>
+      <target port='0'/>
+    </serial>
+    <console type='pty'>
+      <target type='serial' port='0'/>
+    </console>
+    <memballoon model='virtio'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index b6b5489..78da9cf 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -887,6 +887,8 @@ mymain(void)
     DO_TEST("virtio-rng-egd", QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_VIRTIO_RNG,
             QEMU_CAPS_OBJECT_RNG_EGD);
 
+    DO_TEST("ppc-dtb", QEMU_CAPS_DTB);
+
     virObjectUnref(driver.config);
     virObjectUnref(driver.caps);
     VIR_FREE(map);
-- 
1.6.4





More information about the libvir-list mailing list