>From 88879d7eac1237b2f6ef67cb5890cb46055d56dc Mon Sep 17 00:00:00 2001
From: Prerna Saxena <pre...@linux.vnet.ibm.com>
Date: Mon, 3 Nov 2014 15:53:08 +0530

This introduces a testcase for PowerPC compat mode cpu specification.

Signed-off-by: Prerna Saxena <pre...@linux.vnet.ibm.com>
---
 .../qemuxml2argv-pseries-cpu-compat.args             |  8 ++++++++
 .../qemuxml2argv-pseries-cpu-compat.xml              | 20 ++++++++++++++++++++
 tests/qemuxml2argvtest.c                             |  2 ++
 3 files changed, 30 insertions(+)
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-compat.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-compat.xml

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-compat.args 
b/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-compat.args
new file mode 100644
index 0000000..64df406
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-compat.args
@@ -0,0 +1,8 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \
+QEMU_AUDIO_DRV=none /usr/bin/qemu-system-ppc64 -S -M pseries \
+-cpu host,compat=power7 \
+-m 214 -smp 4 -nographic -nodefconfig -nodefaults \
+-chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c -usb \
+-chardev pty,id=charserial0 \
+-device spapr-vty,chardev=charserial0,reg=0x30000000
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-compat.xml 
b/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-compat.xml
new file mode 100644
index 0000000..e34a8ad
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-compat.xml
@@ -0,0 +1,20 @@
+<domain type='kvm'>
+  <name>QEMUGuest1</name>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>4</vcpu>
+  <os>
+    <type arch='ppc64' machine='pseries'>hvm</type>
+  </os>
+  <cpu mode='host-model'>
+    <model>power7</model>
+  </cpu>
+  <clock offset='utc'/>
+  <devices>
+      <emulator>/usr/bin/qemu-system-ppc64</emulator>
+      <console type='pty'>
+        <address type="spapr-vio"/>
+      </console>
+      <memballoon model="none"/>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index abdf516..2a1ca4b 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1308,6 +1308,8 @@ mymain(void)
             QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG);
     DO_TEST("pseries-cpu-exact", QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE,
             QEMU_CAPS_NODEFCONFIG);
+    DO_TEST("pseries-cpu-compat", QEMU_CAPS_KVM, QEMU_CAPS_CPU_HOST,
+            QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG);
     DO_TEST("disk-ide-drive-split",
             QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG,
             QEMU_CAPS_IDE_CD);
-- 
1.9.3

-- 
Prerna Saxena

Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India

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

Reply via email to