]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: Simplify some ppc64 tests
authorAndrea Bolognani <abologna@redhat.com>
Wed, 2 Dec 2020 19:02:52 +0000 (20:02 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 4 Dec 2020 14:56:48 +0000 (15:56 +0100)
We can leave out things like USB controller, memballoon device,
kernel and initrd since they're not the focus of the tests.

Propagating some information from the output files back to the
input files makes it easier to compare them, as it reduces the
resulting diff, and in the case of the qemuxml2xml test for
memory-hotplug-ppc64-nonuma it allows us to convert the output
file into a symlink, since in the specific case the XML doesn't
change at all.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args
tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.xml
tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args
tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.xml
tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.xml
tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml [changed from file to symlink]

index 94bd86ada051036e47aaa5d691a6f96c7e1a9fa2..f50444e47e2f67b416488cdf7418d2c002d1249a 100644 (file)
@@ -27,6 +27,4 @@ uuid=49545eb3-75e1-2d0a-acdd-f0294406c99e,memdev=memnvdimm0,id=nvdimm0,slot=0 \
 server,nowait \
 -mon chardev=charmonitor,id=monitor,mode=control \
 -rtc base=utc \
--no-shutdown \
--usb \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2
+-no-shutdown
index ae5a17d3c8d731e394158e61174b778cc52b23a2..bf7df9a259e25dbf779cde2b493ea45a6a3d0102 100644 (file)
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-ppc64</emulator>
-    <controller type='usb' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
-    </controller>
+    <controller type='usb' index='0' model='none'/>
     <controller type='pci' index='0' model='pci-root'>
       <model name='spapr-pci-host-bridge'/>
       <target index='0'/>
     </controller>
-    <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
-    </memballoon>
+    <memballoon model='none'/>
     <panic model='pseries'/>
     <memory model='nvdimm'>
       <uuid>49545eb3-75e1-2d0a-acdd-f0294406c99e</uuid>
index 91cea9d8bfe9f1630e88516057c1489547e8468a..f7f151d1cabecd8c639290ca0b0944c43c1c18bb 100644 (file)
@@ -26,9 +26,4 @@ QEMU_AUDIO_DRV=none \
 server,nowait \
 -mon chardev=charmonitor,id=monitor,mode=control \
 -rtc base=utc \
--no-shutdown \
--kernel /media/ram/uImage \
--initrd /media/ram/ramdisk \
--append 'root=/dev/ram rw console=ttyS0,115200' \
--usb \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2
+-no-shutdown
index 7c68cd6aa22e59bab41f52a1ba130966bcedf687..a0806c4b54a5d47b055b9ebdb89b5682b0193cda 100644 (file)
@@ -7,9 +7,7 @@
   <vcpu placement='static'>1</vcpu>
   <os>
     <type arch='ppc64' machine='pseries'>hvm</type>
-    <kernel>/media/ram/uImage</kernel>
-    <initrd>/media/ram/ramdisk</initrd>
-    <cmdline>root=/dev/ram rw console=ttyS0,115200</cmdline>
+    <boot dev='hd'/>
   </os>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-ppc64</emulator>
-    <memballoon model='virtio'/>
+    <controller type='usb' index='0' model='none'/>
+    <controller type='pci' index='0' model='pci-root'>
+      <model name='spapr-pci-host-bridge'/>
+      <target index='0'/>
+    </controller>
+    <memballoon model='none'/>
+    <panic model='pseries'/>
     <memory model='dimm'>
       <target>
         <size unit='KiB'>523264</size>
       </target>
+      <address type='dimm' slot='0'/>
     </memory>
     <memory model='dimm'>
       <target>
         <size unit='KiB'>524287</size>
       </target>
+      <address type='dimm' slot='1'/>
     </memory>
   </devices>
 </domain>
index ecb1b83b4ac6988ae3131a719755db5e6652825e..0c0b9f96fb8bbe26efc3a97f4454e7236db8cf26 100644 (file)
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-ppc64</emulator>
-    <controller type='usb' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
-    </controller>
+    <controller type='usb' index='0' model='none'/>
     <controller type='pci' index='0' model='pci-root'>
       <model name='spapr-pci-host-bridge'/>
       <target index='0'/>
     </controller>
-    <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
-    </memballoon>
+    <memballoon model='none'/>
     <panic model='pseries'/>
     <memory model='nvdimm'>
       <uuid>49545eb3-75e1-2d0a-acdd-f0294406c99e</uuid>
deleted file mode 100644 (file)
index a5905e64b58aff18eba9c65d48d1b9cd27b2e1fb..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<domain type='kvm'>
-  <name>QEMUGuest1</name>
-  <uuid>49545eb3-75e1-2d0a-acdd-f0294406c99e</uuid>
-  <maxMemory slots='16' unit='KiB'>4194304</maxMemory>
-  <memory unit='KiB'>2097152</memory>
-  <currentMemory unit='KiB'>2097152</currentMemory>
-  <vcpu placement='static'>1</vcpu>
-  <os>
-    <type arch='ppc64' machine='pseries'>hvm</type>
-    <kernel>/media/ram/uImage</kernel>
-    <initrd>/media/ram/ramdisk</initrd>
-    <cmdline>root=/dev/ram rw console=ttyS0,115200</cmdline>
-    <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>
-    <controller type='usb' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'>
-      <model name='spapr-pci-host-bridge'/>
-      <target index='0'/>
-    </controller>
-    <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
-    </memballoon>
-    <panic model='pseries'/>
-    <memory model='dimm'>
-      <target>
-        <size unit='KiB'>523264</size>
-      </target>
-      <address type='dimm' slot='0'/>
-    </memory>
-    <memory model='dimm'>
-      <target>
-        <size unit='KiB'>524287</size>
-      </target>
-      <address type='dimm' slot='1'/>
-    </memory>
-  </devices>
-</domain>
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..0822e409b40487e7c5e77ff1aab226a5364362d8
--- /dev/null
@@ -0,0 +1 @@
+../qemuxml2argvdata/memory-hotplug-ppc64-nonuma.xml
\ No newline at end of file