]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
genericxml2xmltest: Modify cachetune test to include id
authorKristina Hanicova <khanicov@redhat.com>
Tue, 20 Jul 2021 12:58:09 +0000 (14:58 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 20 Jul 2021 14:43:46 +0000 (16:43 +0200)
I changed DO_TEST_DIFFERENT to DO_TEST, which allows us to remove
the duplicate out file. I also added id attribute for domain
element in order to parse it as a live XML ('cachetune id' is in
the output of only live XMLs). Lastly I added id of cachetune to
test its output value.

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/genericxml2xmlindata/cachetune.xml
tests/genericxml2xmloutdata/cachetune.xml [deleted file]
tests/genericxml2xmltest.c

index 40259cf2eed38bd7b438cd846fa4d7e22b4c008b..07e81999a55d47785b7879f639175abda1d699bc 100644 (file)
@@ -1,16 +1,16 @@
-<domain type='qemu'>
+<domain type='qemu' id='42'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
   <memory unit='KiB'>219136</memory>
   <currentMemory unit='KiB'>219136</currentMemory>
   <vcpu placement='static'>4</vcpu>
   <cputune>
-    <cachetune vcpus='0-1'>
-      <monitor level='3' vcpus='0-1'/>
+    <cachetune vcpus='0-1' id='vcpus_0-1'>
       <cache id='0' level='3' type='both' size='3' unit='MiB'/>
       <cache id='1' level='3' type='both' size='3' unit='MiB'/>
+      <monitor level='3' vcpus='0-1'/>
     </cachetune>
-    <cachetune vcpus='3'>
+    <cachetune vcpus='3' id='vcpus_3'>
       <cache id='0' level='3' type='both' size='3' unit='MiB'/>
     </cachetune>
   </cputune>
diff --git a/tests/genericxml2xmloutdata/cachetune.xml b/tests/genericxml2xmloutdata/cachetune.xml
deleted file mode 100644 (file)
index f05cab7..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<domain type='qemu'>
-  <name>QEMUGuest1</name>
-  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory unit='KiB'>219136</memory>
-  <currentMemory unit='KiB'>219136</currentMemory>
-  <vcpu placement='static'>4</vcpu>
-  <cputune>
-    <cachetune vcpus='0-1'>
-      <cache id='0' level='3' type='both' size='3' unit='MiB'/>
-      <cache id='1' level='3' type='both' size='3' unit='MiB'/>
-      <monitor level='3' vcpus='0-1'/>
-    </cachetune>
-    <cachetune vcpus='3'>
-      <cache id='0' level='3' type='both' size='3' unit='MiB'/>
-    </cachetune>
-  </cputune>
-  <os>
-    <type arch='i686' machine='pc'>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-i386</emulator>
-    <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
-    <controller type='pci' index='0' model='pci-root'/>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <memballoon model='virtio'/>
-  </devices>
-</domain>
index ac89422a326c227f4585dbac2e6b7984ad416ab5..17448a3465c5b816b71efd07439407ec6be9d9c0 100644 (file)
@@ -214,7 +214,7 @@ mymain(void)
 
     DO_TEST("cachetune-small");
     DO_TEST("cachetune-cdp");
-    DO_TEST_DIFFERENT("cachetune");
+    DO_TEST("cachetune");
     DO_TEST_DIFFERENT("cachetune-extra-tunes");
     DO_TEST_FULL("cachetune-colliding-allocs", false, true,
                  TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_PARSE);