]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxml2(argv|xmltest): Simplify testing of scheduler settings
authorPeter Krempa <pkrempa@redhat.com>
Thu, 23 Feb 2023 08:07:50 +0000 (09:07 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 6 Mar 2023 12:22:36 +0000 (13:22 +0100)
Remove the cputune-iothreads, cputune-iothreadsched-zeropriority,
cputune-iothreadsched test files by moving the relevant elements into
the cputune case as we can setup scheduler settings for multiple objects
and thus test everything in one go.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemuxml2argvdata/cputune-iothreads.xml [deleted file]
tests/qemuxml2argvdata/cputune-iothreadsched-zeropriority.xml [deleted file]
tests/qemuxml2argvdata/cputune-iothreadsched.xml [deleted file]
tests/qemuxml2argvdata/cputune.x86_64-latest.args
tests/qemuxml2argvdata/cputune.xml
tests/qemuxml2xmloutdata/cputune-iothreads.xml [deleted file]
tests/qemuxml2xmloutdata/cputune-iothreadsched-zeropriority.xml [deleted file]
tests/qemuxml2xmloutdata/cputune-iothreadsched.xml [deleted file]
tests/qemuxml2xmloutdata/cputune.x86_64-latest.xml
tests/qemuxml2xmltest.c

diff --git a/tests/qemuxml2argvdata/cputune-iothreads.xml b/tests/qemuxml2argvdata/cputune-iothreads.xml
deleted file mode 100644 (file)
index d55d85c..0000000
+++ /dev/null
@@ -1,39 +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'>2</vcpu>
-  <iothreads>2</iothreads>
-  <cputune>
-    <!-- intentionally in odd order -->
-    <iothreadpin iothread='2' cpuset='3'/>
-    <iothreadpin iothread='1' cpuset='2'/>
-    <emulatorpin cpuset='1'/>
-    <vcpupin vcpu='0' cpuset='0'/>
-    <vcpupin vcpu='1' cpuset='1'/>
-    <quota>-1</quota>
-    <period>1000000</period>
-    <shares>2048</shares>
-  </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>
-    <disk type='block' device='disk'>
-      <source dev='/dev/HostVG/QEMUGuest1'/>
-      <target dev='hda' bus='ide'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
-    <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
-    <controller type='pci' index='0' model='pci-root'/>
-    <memballoon model='virtio'/>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2argvdata/cputune-iothreadsched-zeropriority.xml b/tests/qemuxml2argvdata/cputune-iothreadsched-zeropriority.xml
deleted file mode 100644 (file)
index 1144e0f..0000000
+++ /dev/null
@@ -1,40 +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'>2</vcpu>
-  <iothreads>4</iothreads>
-  <cputune>
-    <shares>2048</shares>
-    <period>1000000</period>
-    <quota>-1</quota>
-    <vcpupin vcpu='0' cpuset='0'/>
-    <vcpupin vcpu='1' cpuset='1'/>
-    <emulatorpin cpuset='1'/>
-    <vcpusched vcpus='0-1' scheduler='fifo' priority='0'/>
-    <iothreadsched iothreads='1-3' scheduler='rr' priority='0'/>
-  </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>
-    <disk type='block' device='disk'>
-      <source dev='/dev/HostVG/QEMUGuest1'/>
-      <target dev='hda' bus='ide'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
-    <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>
diff --git a/tests/qemuxml2argvdata/cputune-iothreadsched.xml b/tests/qemuxml2argvdata/cputune-iothreadsched.xml
deleted file mode 100644 (file)
index 73bcec6..0000000
+++ /dev/null
@@ -1,39 +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'>2</vcpu>
-  <iothreads>4</iothreads>
-  <cputune>
-    <shares>2048</shares>
-    <period>1000000</period>
-    <quota>-1</quota>
-    <vcpupin vcpu='0' cpuset='0'/>
-    <vcpupin vcpu='1' cpuset='1'/>
-    <emulatorpin cpuset='1'/>
-    <vcpusched vcpus='0-1' scheduler='fifo' priority='1'/>
-    <iothreadsched iothreads='1-3,^2' scheduler='batch'/>
-    <iothreadsched iothreads='2' scheduler='batch'/>
-  </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>
-    <disk type='block' device='disk'>
-      <source dev='/dev/HostVG/QEMUGuest1'/>
-      <target dev='hda' bus='ide'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
-    <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
-    <controller type='pci' index='0' model='pci-root'/>
-    <memballoon model='virtio'/>
-  </devices>
-</domain>
index d77c1db2c28d7c38852b44694a7cdb8698849eb5..e52211ee6dfaad3d4fd1be673aa6c65fbb78a603 100644 (file)
@@ -16,7 +16,11 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -m 214 \
 -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
 -overcommit mem-lock=off \
--smp 2,sockets=2,cores=1,threads=1 \
+-smp 4,sockets=4,cores=1,threads=1 \
+-object '{"qom-type":"iothread","id":"iothread1"}' \
+-object '{"qom-type":"iothread","id":"iothread2"}' \
+-object '{"qom-type":"iothread","id":"iothread3"}' \
+-object '{"qom-type":"iothread","id":"iothread4"}' \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
 -no-user-config \
index 3c8116f63768eed315c3b0fb6d1581522fd7db24..722636780ceeb87d75c8f7dcc75fc2d93461325c 100644 (file)
@@ -3,7 +3,8 @@
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
   <memory unit='KiB'>219136</memory>
   <currentMemory unit='KiB'>219136</currentMemory>
-  <vcpu placement='static'>2</vcpu>
+  <vcpu placement='static'>4</vcpu>
+  <iothreads>4</iothreads>
   <cputune>
     <shares>2048</shares>
     <period>1000000</period>
     <vcpupin vcpu='0' cpuset='0'/>
     <vcpupin vcpu='1' cpuset='1'/>
     <emulatorpin cpuset='1'/>
+    <vcpusched vcpus='2-3' scheduler='rr' priority='1'/>
+    <vcpusched vcpus='0' scheduler='batch'/>
+    <vcpusched vcpus='1' scheduler='fifo' priority='0'/>
+    <iothreadsched iothreads='1-3,^2' scheduler='batch'/>
+    <iothreadsched iothreads='2' scheduler='rr' priority='0'/>
   </cputune>
   <os>
     <type arch='x86_64' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2xmloutdata/cputune-iothreads.xml b/tests/qemuxml2xmloutdata/cputune-iothreads.xml
deleted file mode 100644 (file)
index 36c4b09..0000000
+++ /dev/null
@@ -1,48 +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'>2</vcpu>
-  <iothreads>2</iothreads>
-  <cputune>
-    <shares>2048</shares>
-    <period>1000000</period>
-    <quota>-1</quota>
-    <vcpupin vcpu='0' cpuset='0'/>
-    <vcpupin vcpu='1' cpuset='1'/>
-    <emulatorpin cpuset='1'/>
-    <iothreadpin iothread='1' cpuset='2'/>
-    <iothreadpin iothread='2' cpuset='3'/>
-  </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>
-    <disk type='block' device='disk'>
-      <driver name='qemu' type='raw'/>
-      <source dev='/dev/HostVG/QEMUGuest1'/>
-      <target dev='hda' bus='ide'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
-    <controller type='usb' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='ide' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'/>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <audio id='1' type='none'/>
-    <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
-    </memballoon>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/cputune-iothreadsched-zeropriority.xml b/tests/qemuxml2xmloutdata/cputune-iothreadsched-zeropriority.xml
deleted file mode 100644 (file)
index b6a7910..0000000
+++ /dev/null
@@ -1,51 +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'>2</vcpu>
-  <iothreads>4</iothreads>
-  <cputune>
-    <shares>2048</shares>
-    <period>1000000</period>
-    <quota>-1</quota>
-    <vcpupin vcpu='0' cpuset='0'/>
-    <vcpupin vcpu='1' cpuset='1'/>
-    <emulatorpin cpuset='1'/>
-    <vcpusched vcpus='0' scheduler='fifo' priority='0'/>
-    <vcpusched vcpus='1' scheduler='fifo' priority='0'/>
-    <iothreadsched iothreads='1' scheduler='rr' priority='0'/>
-    <iothreadsched iothreads='2' scheduler='rr' priority='0'/>
-    <iothreadsched iothreads='3' scheduler='rr' priority='0'/>
-  </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>
-    <disk type='block' device='disk'>
-      <driver name='qemu' type='raw'/>
-      <source dev='/dev/HostVG/QEMUGuest1'/>
-      <target dev='hda' bus='ide'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
-    <controller type='usb' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='ide' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'/>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <audio id='1' type='none'/>
-    <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
-    </memballoon>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/cputune-iothreadsched.xml b/tests/qemuxml2xmloutdata/cputune-iothreadsched.xml
deleted file mode 100644 (file)
index ca94bc8..0000000
+++ /dev/null
@@ -1,51 +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'>2</vcpu>
-  <iothreads>4</iothreads>
-  <cputune>
-    <shares>2048</shares>
-    <period>1000000</period>
-    <quota>-1</quota>
-    <vcpupin vcpu='0' cpuset='0'/>
-    <vcpupin vcpu='1' cpuset='1'/>
-    <emulatorpin cpuset='1'/>
-    <vcpusched vcpus='0' scheduler='fifo' priority='1'/>
-    <vcpusched vcpus='1' scheduler='fifo' priority='1'/>
-    <iothreadsched iothreads='1' scheduler='batch'/>
-    <iothreadsched iothreads='2' scheduler='batch'/>
-    <iothreadsched iothreads='3' scheduler='batch'/>
-  </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>
-    <disk type='block' device='disk'>
-      <driver name='qemu' type='raw'/>
-      <source dev='/dev/HostVG/QEMUGuest1'/>
-      <target dev='hda' bus='ide'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
-    <controller type='usb' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='ide' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'/>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <audio id='1' type='none'/>
-    <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
-    </memballoon>
-  </devices>
-</domain>
index 3a94b6c1c6b26271532d3deef5b70db5c21b4d7f..f9c0fbd934c17136f93a13d030f5c176a2fda380 100644 (file)
@@ -3,7 +3,8 @@
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
   <memory unit='KiB'>219136</memory>
   <currentMemory unit='KiB'>219136</currentMemory>
-  <vcpu placement='static'>2</vcpu>
+  <vcpu placement='static'>4</vcpu>
+  <iothreads>4</iothreads>
   <cputune>
     <shares>2048</shares>
     <period>1000000</period>
     <vcpupin vcpu='0' cpuset='0'/>
     <vcpupin vcpu='1' cpuset='1'/>
     <emulatorpin cpuset='1'/>
+    <vcpusched vcpus='0' scheduler='batch'/>
+    <vcpusched vcpus='1' scheduler='fifo' priority='0'/>
+    <vcpusched vcpus='2' scheduler='rr' priority='1'/>
+    <vcpusched vcpus='3' scheduler='rr' priority='1'/>
+    <iothreadsched iothreads='1' scheduler='batch'/>
+    <iothreadsched iothreads='2' scheduler='rr' priority='0'/>
+    <iothreadsched iothreads='3' scheduler='batch'/>
   </cputune>
   <os>
     <type arch='x86_64' machine='pc'>hvm</type>
index d3ee7b06865e7b04b1747738ee305bcc5a42e694..ef6c829afe0de0822756154ed9ac56c434d789e4 100644 (file)
@@ -562,8 +562,6 @@ mymain(void)
     DO_TEST_NOCAPS("blkiotune-device");
     DO_TEST_CAPS_LATEST("cputune");
     DO_TEST_CAPS_LATEST("cputune-zero-shares");
-    DO_TEST_NOCAPS("cputune-iothreadsched");
-    DO_TEST_NOCAPS("cputune-iothreadsched-zeropriority");
     DO_TEST_CAPS_LATEST("cputune-numatune");
     DO_TEST_CAPS_LATEST("vcpu-placement-static");
     DO_TEST_CAPS_LATEST("cputune-cpuset-big-id");
@@ -573,7 +571,6 @@ mymain(void)
     DO_TEST_CAPS_LATEST("iothreads-ids");
     DO_TEST_CAPS_LATEST("iothreads-ids-pool-sizes");
     DO_TEST_CAPS_LATEST("iothreads-ids-partial");
-    DO_TEST_NOCAPS("cputune-iothreads");
     DO_TEST_CAPS_LATEST("iothreads-disk");
     DO_TEST_CAPS_ARCH_LATEST("iothreads-disk-virtio-ccw", "s390x");
     DO_TEST_CAPS_LATEST("iothreads-virtio-scsi-pci");