[libvirt] [PATCH 6/6] tests: Add qemuxml2argv tests for PPC64 pseries machine

Eric Blake eblake at redhat.com
Wed Dec 21 00:14:12 UTC 2011


On 12/20/2011 04:54 PM, Eric Blake wrote:
> On 12/12/2011 04:39 PM, Michael Ellerman wrote:
>> Add four tests of the XML -> argv handling for the PPC64 pseries machine.
>>
>> The first is just a basic test of a bare bones machine.
>>
> Hmm, I got a test failure:
> 
>   9) qemuxml2argvdata/qemuxml2argv-pseries-vio.xml                ... FAILED
> 119) qemuxml2argvdata/qemuxml2argv-pseries-vio-user-assigned.xml  ... FAILED
> 173) qemuxml2argvdata/qemuxml2argv-pseries-vio-address-clash.xml  ... FAILED
> 
> I'm still trying to figure out what went wrong.

Meanwhile, I wanted to validate xml output.  Does this look correct, or
do we have more changes to make in domain_conf.c to support your desired
output?

diff --git i/tests/qemuxml2argvdata/qemuxml2argv-pseries-basic.xml
w/tests/qemuxml2argvdata/qemuxml2argv-pseries-basic.xml
index 908ff4b..7893c47 100644
--- i/tests/qemuxml2argvdata/qemuxml2argv-pseries-basic.xml
+++ w/tests/qemuxml2argvdata/qemuxml2argv-pseries-basic.xml
@@ -2,16 +2,26 @@
   <name>QEMUGuest1</name>
   <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
   <memory>524288</memory>
+  <currentMemory>524288</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='ppc64' machine='pseries'>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>
     <emulator>/usr/bin/qemu-system-ppc64</emulator>
+    <serial type='pty'>
+      <target port='0'/>
+      <address type='spapr-vio'/>
+    </serial>
     <console type='pty'>
-        <address type="spapr-vio"/>
+      <target type='serial' port='0'/>
+      <address type='spapr-vio'/>
     </console>
-    <memballoon model="none"/>
+    <memballoon model='none'/>
   </devices>
 </domain>
diff --git i/tests/qemuxml2xmltest.c w/tests/qemuxml2xmltest.c
index 35bfdce..6a88a77 100644
--- i/tests/qemuxml2xmltest.c
+++ w/tests/qemuxml2xmltest.c
@@ -194,6 +194,8 @@ mymain(void)
     DO_TEST("usb-redir");
     DO_TEST("blkdeviotune");

+    DO_TEST("pseries-basic");
+
     /* These tests generate different XML */
     DO_TEST_DIFFERENT("balloon-device-auto");
     DO_TEST_DIFFERENT("channel-virtio-auto");


-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111220/1a858a77/attachment-0001.sig>


More information about the libvir-list mailing list