]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: Clean up HPT tests
authorAndrea Bolognani <abologna@redhat.com>
Tue, 23 Jan 2018 09:50:04 +0000 (10:50 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 13 Feb 2018 13:40:11 +0000 (14:40 +0100)
Give them better names and remove some redundancy.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
tests/qemuxml2argvdata/pseries-features-hpt.args [new file with mode: 0644]
tests/qemuxml2argvdata/pseries-features-hpt.xml [new file with mode: 0644]
tests/qemuxml2argvdata/pseries-features-invalid-machine.xml [new file with mode: 0644]
tests/qemuxml2argvdata/pseries-hpt-resizing-invalid-machine.xml [deleted file]
tests/qemuxml2argvdata/pseries-hpt-resizing.args [deleted file]
tests/qemuxml2argvdata/pseries-hpt-resizing.xml [deleted file]
tests/qemuxml2argvtest.c
tests/qemuxml2xmloutdata/pseries-features-hpt.xml [new symlink]
tests/qemuxml2xmloutdata/pseries-hpt-resizing.xml [deleted file]
tests/qemuxml2xmltest.c

diff --git a/tests/qemuxml2argvdata/pseries-features-hpt.args b/tests/qemuxml2argvdata/pseries-features-hpt.args
new file mode 100644 (file)
index 0000000..8cdb329
--- /dev/null
@@ -0,0 +1,19 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-ppc64 \
+-name guest \
+-S \
+-machine pseries,accel=tcg,resize-hpt=required \
+-m 512 \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
+-nographic \
+-nodefaults \
+-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-guest/monitor.sock,\
+server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=readline \
+-boot c
diff --git a/tests/qemuxml2argvdata/pseries-features-hpt.xml b/tests/qemuxml2argvdata/pseries-features-hpt.xml
new file mode 100644 (file)
index 0000000..5dd0dbd
--- /dev/null
@@ -0,0 +1,28 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory unit='KiB'>524288</memory>
+  <currentMemory unit='KiB'>524288</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='ppc64' machine='pseries'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <features>
+    <hpt resizing='required'/>
+  </features>
+  <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' 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'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2argvdata/pseries-features-invalid-machine.xml b/tests/qemuxml2argvdata/pseries-features-invalid-machine.xml
new file mode 100644 (file)
index 0000000..5a6bb02
--- /dev/null
@@ -0,0 +1,18 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory unit='KiB'>524288</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='x86_64' machine='pc'>hvm</type>
+  </os>
+  <features>
+    <!-- pSeries features can't be enabled for non-pSeries guests -->
+    <hpt resizing='enabled'/>
+  </features>
+  <devices>
+    <emulator>/usr/bin/qemu-system-x86_64</emulator>
+    <controller type='usb' model='none'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2argvdata/pseries-hpt-resizing-invalid-machine.xml b/tests/qemuxml2argvdata/pseries-hpt-resizing-invalid-machine.xml
deleted file mode 100644 (file)
index 757fcc7..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<domain type='qemu'>
-  <name>guest</name>
-  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
-  <memory unit='KiB'>524288</memory>
-  <vcpu placement='static'>1</vcpu>
-  <os>
-    <type arch='x86_64' machine='pc'>hvm</type>
-  </os>
-  <features>
-    <!-- HPT resizing can't be enabled for non-pSeries guests -->
-    <hpt resizing='enabled'/>
-  </features>
-  <devices>
-    <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' model='none'/>
-    <memballoon model='none'/>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2argvdata/pseries-hpt-resizing.args b/tests/qemuxml2argvdata/pseries-hpt-resizing.args
deleted file mode 100644 (file)
index 994789a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-LC_ALL=C \
-PATH=/bin \
-HOME=/home/test \
-USER=test \
-LOGNAME=test \
-QEMU_AUDIO_DRV=none \
-/usr/bin/qemu-system-ppc64 \
--name guest \
--S \
--machine pseries,accel=tcg,resize-hpt=required \
--m 512 \
--smp 1,sockets=1,cores=1,threads=1 \
--uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
--nographic \
--nodefconfig \
--nodefaults \
--chardev socket,id=charmonitor,path=/tmp/lib/domain--1-guest/monitor.sock,\
-server,nowait \
--mon chardev=charmonitor,id=monitor,mode=readline \
--boot c
diff --git a/tests/qemuxml2argvdata/pseries-hpt-resizing.xml b/tests/qemuxml2argvdata/pseries-hpt-resizing.xml
deleted file mode 100644 (file)
index f9dc9ca..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<domain type='qemu'>
-  <name>guest</name>
-  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
-  <memory unit='KiB'>524288</memory>
-  <vcpu placement='static'>1</vcpu>
-  <os>
-    <type arch='ppc64' machine='pseries'>hvm</type>
-  </os>
-  <features>
-    <!-- Explicitly enable HPT resizing. The guest will not start
-         at all unless HPT resizing can be arranged -->
-    <hpt resizing='required'/>
-  </features>
-  <devices>
-    <emulator>/usr/bin/qemu-system-ppc64</emulator>
-    <controller type='usb' model='none'/>
-    <memballoon model='none'/>
-  </devices>
-</domain>
index fec4da3652d2a97da120a167da596933ae11dd07..ade18c055088a7792b8e4e1fc686843e599dcc27 100644 (file)
@@ -1895,17 +1895,12 @@ mymain(void)
             QEMU_CAPS_VIRTIO_SCSI,
             QEMU_CAPS_DEVICE_VFIO_PCI);
 
-    DO_TEST("pseries-hpt-resizing",
-            QEMU_CAPS_NODEFCONFIG,
+    DO_TEST("pseries-features-hpt",
             QEMU_CAPS_MACHINE_OPT,
             QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);
-    DO_TEST_FAILURE("pseries-hpt-resizing",
-                    QEMU_CAPS_NODEFCONFIG,
+    DO_TEST_FAILURE("pseries-features-hpt",
                     QEMU_CAPS_MACHINE_OPT);
-    DO_TEST_PARSE_ERROR("pseries-hpt-resizing-invalid-machine",
-                        QEMU_CAPS_NODEFCONFIG,
-                        QEMU_CAPS_MACHINE_OPT,
-                        QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);
+    DO_TEST_PARSE_ERROR("pseries-features-invalid-machine", NONE);
 
     DO_TEST("pseries-serial-native",
             QEMU_CAPS_NODEFCONFIG,
diff --git a/tests/qemuxml2xmloutdata/pseries-features-hpt.xml b/tests/qemuxml2xmloutdata/pseries-features-hpt.xml
new file mode 120000 (symlink)
index 0000000..bcaf2e6
--- /dev/null
@@ -0,0 +1 @@
+../qemuxml2argvdata/pseries-features-hpt.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/pseries-hpt-resizing.xml b/tests/qemuxml2xmloutdata/pseries-hpt-resizing.xml
deleted file mode 100644 (file)
index 5dd0dbd..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<domain type='qemu'>
-  <name>guest</name>
-  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
-  <memory unit='KiB'>524288</memory>
-  <currentMemory unit='KiB'>524288</currentMemory>
-  <vcpu placement='static'>1</vcpu>
-  <os>
-    <type arch='ppc64' machine='pseries'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <features>
-    <hpt resizing='required'/>
-  </features>
-  <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' 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'/>
-  </devices>
-</domain>
index 83809574c3d0c7259e8236333c0f90cf27786b52..0eb9e6c77a77c203e60c7d4035fd8143842fed9e 100644 (file)
@@ -763,8 +763,7 @@ mymain(void)
             QEMU_CAPS_VIRTIO_SCSI,
             QEMU_CAPS_DEVICE_VFIO_PCI);
 
-    DO_TEST("pseries-hpt-resizing",
-            QEMU_CAPS_NODEFCONFIG,
+    DO_TEST("pseries-features-hpt",
             QEMU_CAPS_MACHINE_OPT,
             QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);