Give them better names and remove some redundancy.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
I would probably just squash this into the previous patch, but
I figured others would prefer it as a separate one.
...es-hpt-resizing.args => pseries-features-hpt.args} | 1 -
.../pseries-features-hpt.xml} | 0
...chine.xml => pseries-features-invalid-machine.xml} | 6 ++++--
tests/qemuxml2argvdata/pseries-hpt-resizing.xml | 19 -------------------
tests/qemuxml2argvtest.c | 9 +++------
tests/qemuxml2xmloutdata/pseries-features-hpt.xml | 1 +
tests/qemuxml2xmltest.c | 3 +--
7 files changed, 9 insertions(+), 30 deletions(-)
rename tests/qemuxml2argvdata/{pseries-hpt-resizing.args => pseries-features-hpt.args}
(96%)
rename tests/{qemuxml2xmloutdata/pseries-hpt-resizing.xml =>
qemuxml2argvdata/pseries-features-hpt.xml} (100%)
rename tests/qemuxml2argvdata/{pseries-hpt-resizing-invalid-machine.xml =>
pseries-features-invalid-machine.xml} (76%)
delete mode 100644 tests/qemuxml2argvdata/pseries-hpt-resizing.xml
create mode 120000 tests/qemuxml2xmloutdata/pseries-features-hpt.xml
diff --git a/tests/qemuxml2argvdata/pseries-hpt-resizing.args
b/tests/qemuxml2argvdata/pseries-features-hpt.args
similarity index 96%
rename from tests/qemuxml2argvdata/pseries-hpt-resizing.args
rename to tests/qemuxml2argvdata/pseries-features-hpt.args
index 994789a5e..8cdb32965 100644
--- a/tests/qemuxml2argvdata/pseries-hpt-resizing.args
+++ b/tests/qemuxml2argvdata/pseries-features-hpt.args
@@ -12,7 +12,6 @@ QEMU_AUDIO_DRV=none \
-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 \
diff --git a/tests/qemuxml2xmloutdata/pseries-hpt-resizing.xml
b/tests/qemuxml2argvdata/pseries-features-hpt.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/pseries-hpt-resizing.xml
rename to tests/qemuxml2argvdata/pseries-features-hpt.xml
diff --git a/tests/qemuxml2argvdata/pseries-hpt-resizing-invalid-machine.xml
b/tests/qemuxml2argvdata/pseries-features-invalid-machine.xml
similarity index 76%
rename from tests/qemuxml2argvdata/pseries-hpt-resizing-invalid-machine.xml
rename to tests/qemuxml2argvdata/pseries-features-invalid-machine.xml
index 757fcc70e..bc5501b6c 100644
--- a/tests/qemuxml2argvdata/pseries-hpt-resizing-invalid-machine.xml
+++ b/tests/qemuxml2argvdata/pseries-features-invalid-machine.xml
@@ -7,8 +7,10 @@
<type arch='x86_64' machine='pc'>hvm</type>
</os>
<features>
- <!-- HPT resizing can't be enabled for non-pSeries guests -->
- <hpt resizing='enabled'/>
+ <!-- pSeries features can't be enabled for non-pSeries guests -->
+ <pseries>
+ <hpt resizing='enabled'/>
+ </pseries>
</features>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
diff --git a/tests/qemuxml2argvdata/pseries-hpt-resizing.xml
b/tests/qemuxml2argvdata/pseries-hpt-resizing.xml
deleted file mode 100644
index f9dc9cac9..000000000
--- a/tests/qemuxml2argvdata/pseries-hpt-resizing.xml
+++ /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>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index c8739909d..cc9280db0 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1891,15 +1891,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,
+ DO_TEST_PARSE_ERROR("pseries-features-invalid-machine",
QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);
diff --git a/tests/qemuxml2xmloutdata/pseries-features-hpt.xml
b/tests/qemuxml2xmloutdata/pseries-features-hpt.xml
new file mode 120000
index 000000000..bcaf2e6fe
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/pseries-features-hpt.xml
@@ -0,0 +1 @@
+../qemuxml2argvdata/pseries-features-hpt.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 78519f509..ba4e853f9 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -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);
--
2.14.3