Currently, we have maybe a dozen tests for hugepages related stuff in
qemuxml2xmltest. In all cases DO_TEST() is used, which means we have to
enumerate all capabilities needed (though, it's usually just
QEMU_CAPS_OBJECT_MEMORY_RAM and QEMU_CAPS_OBJECT_MEMORY_FILE,
exceptionally QEMU_CAPS_DEVICE_PC_DIMM too).
Nevertheless, these caps made sense back in QEMU 2.X era when
these objects were being introduced. But now, almost 8 years
after the fact we can safely assume every QEMU knows these caps.
Therefore, switch to DO_TEST_CAPS_LATEST().
Since some of our expected output files are just a symlink to their
respective input files, these are changed too. But from QEMU's
POV nothing changes as no .args file is changed.
Oh, and I'm also adding a 'hugepages-memaccess3' test case, which
was missing, surprisingly.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
.../qemuxml2argvdata/hugepages-default-2M.xml | 5 +-
.../hugepages-default-system-size.xml | 5 +-
tests/qemuxml2argvdata/hugepages-default.xml | 16 +++++-
.../qemuxml2argvdata/hugepages-memaccess.xml | 5 +-
.../qemuxml2argvdata/hugepages-memaccess2.xml | 5 +-
.../qemuxml2argvdata/hugepages-memaccess3.xml | 10 +++-
tests/qemuxml2argvdata/hugepages-nodeset.xml | 8 ++-
.../hugepages-numa-default-2M.xml | 8 ++-
.../hugepages-numa-default-dimm.xml | 5 +-
.../hugepages-numa-nodeset-part.xml | 8 ++-
.../hugepages-numa-nodeset.xml | 8 ++-
tests/qemuxml2argvdata/hugepages-nvdimm.xml | 5 +-
tests/qemuxml2argvdata/hugepages-shared.xml | 17 ++++--
tests/qemuxml2argvdata/pages-dimm-discard.xml | 5 +-
.../pages-discard-hugepages.xml | 5 +-
...=> hugepages-default-2M.x86_64-latest.xml} | 0
...ges-default-system-size.x86_64-latest.xml} | 0
.../hugepages-default.x86_64-latest.xml | 1 +
.../qemuxml2xmloutdata/hugepages-default.xml | 34 ------------
... => hugepages-memaccess.x86_64-latest.xml} | 0
...=> hugepages-memaccess2.x86_64-latest.xml} | 0
.../hugepages-memaccess3.x86_64-latest.xml | 1 +
.../hugepages-nodeset.x86_64-latest.xml | 1 +
.../qemuxml2xmloutdata/hugepages-nodeset.xml | 31 -----------
...ugepages-numa-default-2M.x86_64-latest.xml | 1 +
.../hugepages-numa-default-2M.xml | 37 -------------
...pages-numa-default-dimm.x86_64-latest.xml} | 0
...epages-numa-nodeset-part.x86_64-latest.xml | 1 +
.../hugepages-numa-nodeset-part.xml | 37 -------------
.../hugepages-numa-nodeset.x86_64-latest.xml | 1 +
.../hugepages-numa-nodeset.xml | 40 --------------
...xml => hugepages-nvdimm.x86_64-latest.xml} | 0
.../hugepages-shared.x86_64-latest.xml | 1 +
tests/qemuxml2xmloutdata/hugepages-shared.xml | 55 -------------------
...l => pages-dimm-discard.x86_64-latest.xml} | 0
...pages-discard-hugepages.x86_64-latest.xml} | 0
tests/qemuxml2xmltest.c | 33 +++++------
37 files changed, 107 insertions(+), 282 deletions(-)
rename tests/qemuxml2xmloutdata/{hugepages-default-2M.xml =>
hugepages-default-2M.x86_64-latest.xml} (100%)
rename tests/qemuxml2xmloutdata/{hugepages-default-system-size.xml =>
hugepages-default-system-size.x86_64-latest.xml} (100%)
create mode 120000 tests/qemuxml2xmloutdata/hugepages-default.x86_64-latest.xml
delete mode 100644 tests/qemuxml2xmloutdata/hugepages-default.xml
rename tests/qemuxml2xmloutdata/{hugepages-memaccess.xml =>
hugepages-memaccess.x86_64-latest.xml} (100%)
rename tests/qemuxml2xmloutdata/{hugepages-memaccess2.xml =>
hugepages-memaccess2.x86_64-latest.xml} (100%)
create mode 120000 tests/qemuxml2xmloutdata/hugepages-memaccess3.x86_64-latest.xml
create mode 120000 tests/qemuxml2xmloutdata/hugepages-nodeset.x86_64-latest.xml
delete mode 100644 tests/qemuxml2xmloutdata/hugepages-nodeset.xml
create mode 120000 tests/qemuxml2xmloutdata/hugepages-numa-default-2M.x86_64-latest.xml
delete mode 100644 tests/qemuxml2xmloutdata/hugepages-numa-default-2M.xml
rename tests/qemuxml2xmloutdata/{hugepages-numa-default-dimm.xml =>
hugepages-numa-default-dimm.x86_64-latest.xml} (100%)
create mode 120000
tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.x86_64-latest.xml
delete mode 100644 tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.xml
create mode 120000 tests/qemuxml2xmloutdata/hugepages-numa-nodeset.x86_64-latest.xml
delete mode 100644 tests/qemuxml2xmloutdata/hugepages-numa-nodeset.xml
rename tests/qemuxml2xmloutdata/{hugepages-nvdimm.xml =>
hugepages-nvdimm.x86_64-latest.xml} (100%)
create mode 120000 tests/qemuxml2xmloutdata/hugepages-shared.x86_64-latest.xml
delete mode 100644 tests/qemuxml2xmloutdata/hugepages-shared.xml
rename tests/qemuxml2xmloutdata/{pages-dimm-discard.xml =>
pages-dimm-discard.x86_64-latest.xml} (100%)
rename tests/qemuxml2xmloutdata/{pages-discard-hugepages.xml =>
pages-discard-hugepages.x86_64-latest.xml} (100%)
diff --git a/tests/qemuxml2argvdata/hugepages-default-2M.xml
b/tests/qemuxml2argvdata/hugepages-default-2M.xml
index 296933c6f2..49d1f45c0d 100644
--- a/tests/qemuxml2argvdata/hugepages-default-2M.xml
+++ b/tests/qemuxml2argvdata/hugepages-default-2M.xml
@@ -13,13 +13,16 @@
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
- <controller type='usb' index='0'>
+ <controller type='usb' index='0' model='piix3-uhci'>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
diff --git a/tests/qemuxml2argvdata/hugepages-default-system-size.xml
b/tests/qemuxml2argvdata/hugepages-default-system-size.xml
index f9c99da400..7cb8078844 100644
--- a/tests/qemuxml2argvdata/hugepages-default-system-size.xml
+++ b/tests/qemuxml2argvdata/hugepages-default-system-size.xml
@@ -13,13 +13,16 @@
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
- <controller type='usb' index='0'>
+ <controller type='usb' index='0' model='piix3-uhci'>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
diff --git a/tests/qemuxml2argvdata/hugepages-default.xml
b/tests/qemuxml2argvdata/hugepages-default.xml
index de1006b7d7..9e4568bcf3 100644
--- a/tests/qemuxml2argvdata/hugepages-default.xml
+++ b/tests/qemuxml2argvdata/hugepages-default.xml
@@ -11,17 +11,27 @@
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
- <controller type='usb' index='0'/>
- <controller type='ide' index='0'/>
+ <controller type='usb' index='0' model='piix3-uhci'>
+ <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'/>
- <memballoon model='virtio'/>
+ <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/qemuxml2argvdata/hugepages-memaccess.xml
b/tests/qemuxml2argvdata/hugepages-memaccess.xml
index 9d63ac4a3d..56973edb70 100644
--- a/tests/qemuxml2argvdata/hugepages-memaccess.xml
+++ b/tests/qemuxml2argvdata/hugepages-memaccess.xml
@@ -20,7 +20,8 @@
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
- <cpu>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
<numa>
<cell id='0' cpus='0' memory='1048576'
unit='KiB'/>
<cell id='1' cpus='1' memory='1048576'
unit='KiB' memAccess='shared'/>
@@ -40,7 +41,7 @@
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0'
target='0' unit='0'/>
</disk>
- <controller type='usb' index='0'>
+ <controller type='usb' index='0' model='piix3-uhci'>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
</controller>
<controller type='ide' index='0'>
diff --git a/tests/qemuxml2argvdata/hugepages-memaccess2.xml
b/tests/qemuxml2argvdata/hugepages-memaccess2.xml
index 119662b773..043650db6c 100644
--- a/tests/qemuxml2argvdata/hugepages-memaccess2.xml
+++ b/tests/qemuxml2argvdata/hugepages-memaccess2.xml
@@ -20,7 +20,8 @@
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
- <cpu>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
<numa>
<cell id='0' cpus='0' memory='1048576'
unit='KiB'/>
<cell id='1' cpus='1' memory='1048576'
unit='KiB' memAccess='shared'/>
@@ -40,7 +41,7 @@
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0'
target='0' unit='0'/>
</disk>
- <controller type='usb' index='0'>
+ <controller type='usb' index='0' model='piix3-uhci'>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
</controller>
<controller type='ide' index='0'>
diff --git a/tests/qemuxml2argvdata/hugepages-memaccess3.xml
b/tests/qemuxml2argvdata/hugepages-memaccess3.xml
index 54b27e971d..399e58acc2 100644
--- a/tests/qemuxml2argvdata/hugepages-memaccess3.xml
+++ b/tests/qemuxml2argvdata/hugepages-memaccess3.xml
@@ -10,17 +10,25 @@
<vcpu placement='static'>4</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
+ <boot dev='hd'/>
<bootmenu enable='yes'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
+ <clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
- <controller type='usb' index='0'/>
+ <controller type='usb' index='0' model='piix3-uhci'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
+ </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='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/hugepages-nodeset.xml
b/tests/qemuxml2argvdata/hugepages-nodeset.xml
index 5549cb82ff..49d1f45c0d 100644
--- a/tests/qemuxml2argvdata/hugepages-nodeset.xml
+++ b/tests/qemuxml2argvdata/hugepages-nodeset.xml
@@ -5,7 +5,7 @@
<currentMemory unit='KiB'>1048576</currentMemory>
<memoryBacking>
<hugepages>
- <page size='2048' unit='KiB' nodeset='0'/>
+ <page size='2048' unit='KiB'/>
</hugepages>
</memoryBacking>
<vcpu placement='static'>2</vcpu>
@@ -13,18 +13,22 @@
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
- <controller type='usb' index='0'>
+ <controller type='usb' index='0' model='piix3-uhci'>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
</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='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/hugepages-numa-default-2M.xml
b/tests/qemuxml2argvdata/hugepages-numa-default-2M.xml
index 130af8dd81..ac084a0461 100644
--- a/tests/qemuxml2argvdata/hugepages-numa-default-2M.xml
+++ b/tests/qemuxml2argvdata/hugepages-numa-default-2M.xml
@@ -13,7 +13,8 @@
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
- <cpu>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
<numa>
<cell id='0' cpus='0' memory='262144'
unit='KiB'/>
<cell id='1' cpus='1' memory='786432'
unit='KiB'/>
@@ -25,10 +26,13 @@
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
- <controller type='usb' index='0'/>
+ <controller type='usb' index='0' model='piix3-uhci'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
+ </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='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/hugepages-numa-default-dimm.xml
b/tests/qemuxml2argvdata/hugepages-numa-default-dimm.xml
index 260cbb4869..c7d471af39 100644
--- a/tests/qemuxml2argvdata/hugepages-numa-default-dimm.xml
+++ b/tests/qemuxml2argvdata/hugepages-numa-default-dimm.xml
@@ -12,7 +12,8 @@
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
- <cpu>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
<numa>
<cell id='0' cpus='0-1' memory='1048576'
unit='KiB'/>
</numa>
@@ -23,7 +24,7 @@
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
- <controller type='usb' index='0'>
+ <controller type='usb' index='0' model='piix3-uhci'>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
diff --git a/tests/qemuxml2argvdata/hugepages-numa-nodeset-part.xml
b/tests/qemuxml2argvdata/hugepages-numa-nodeset-part.xml
index 5fbf6b5e85..74e15800fc 100644
--- a/tests/qemuxml2argvdata/hugepages-numa-nodeset-part.xml
+++ b/tests/qemuxml2argvdata/hugepages-numa-nodeset-part.xml
@@ -13,7 +13,8 @@
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
- <cpu>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
<numa>
<cell id='0' cpus='0' memory='262144'
unit='KiB'/>
<cell id='1' cpus='1' memory='786432'
unit='KiB'/>
@@ -25,10 +26,13 @@
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
- <controller type='usb' index='0'/>
+ <controller type='usb' index='0' model='piix3-uhci'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
+ </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='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/hugepages-numa-nodeset.xml
b/tests/qemuxml2argvdata/hugepages-numa-nodeset.xml
index 31ebc1553a..4149d239b1 100644
--- a/tests/qemuxml2argvdata/hugepages-numa-nodeset.xml
+++ b/tests/qemuxml2argvdata/hugepages-numa-nodeset.xml
@@ -14,7 +14,8 @@
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
- <cpu>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
<numa>
<cell id='0' cpus='0' memory='1048576'
unit='KiB'/>
<cell id='1' cpus='1' memory='1048576'
unit='KiB'/>
@@ -28,10 +29,13 @@
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
- <controller type='usb' index='0'/>
+ <controller type='usb' index='0' model='piix3-uhci'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
+ </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='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/hugepages-nvdimm.xml
b/tests/qemuxml2argvdata/hugepages-nvdimm.xml
index a33cce9293..1a1500895b 100644
--- a/tests/qemuxml2argvdata/hugepages-nvdimm.xml
+++ b/tests/qemuxml2argvdata/hugepages-nvdimm.xml
@@ -15,7 +15,8 @@
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
- <cpu>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
<topology sockets='2' dies='1' cores='1'
threads='1'/>
<numa>
<cell id='0' cpus='0-1' memory='1048576'
unit='KiB'/>
@@ -27,7 +28,7 @@
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
- <controller type='usb' index='0'>
+ <controller type='usb' index='0' model='piix3-uhci'>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
diff --git a/tests/qemuxml2argvdata/hugepages-shared.xml
b/tests/qemuxml2argvdata/hugepages-shared.xml
index 33abe71d9e..0a8efc806c 100644
--- a/tests/qemuxml2argvdata/hugepages-shared.xml
+++ b/tests/qemuxml2argvdata/hugepages-shared.xml
@@ -18,7 +18,8 @@
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
- <cpu>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
<numa>
<cell id='0' cpus='0' memory='1048576'
unit='KiB'/>
<cell id='1' cpus='1' memory='1048576'
unit='KiB' memAccess='shared'/>
@@ -33,15 +34,23 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</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'/>
- <controller type='ide' index='0'/>
+ <controller type='usb' index='0' model='piix3-uhci'>
+ <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'/>
- <memballoon model='virtio'/>
+ <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/qemuxml2argvdata/pages-dimm-discard.xml
b/tests/qemuxml2argvdata/pages-dimm-discard.xml
index de7e63ad32..eb0b409b8a 100644
--- a/tests/qemuxml2argvdata/pages-dimm-discard.xml
+++ b/tests/qemuxml2argvdata/pages-dimm-discard.xml
@@ -9,7 +9,8 @@
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
- <cpu>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
<numa>
<cell id='0' cpus='0-1' memory='1048576'
unit='KiB'/>
</numa>
@@ -20,7 +21,7 @@
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
- <controller type='usb' index='0'>
+ <controller type='usb' index='0' model='piix3-uhci'>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
diff --git a/tests/qemuxml2argvdata/pages-discard-hugepages.xml
b/tests/qemuxml2argvdata/pages-discard-hugepages.xml
index 70c5eca0d0..c0b61141c7 100644
--- a/tests/qemuxml2argvdata/pages-discard-hugepages.xml
+++ b/tests/qemuxml2argvdata/pages-discard-hugepages.xml
@@ -11,7 +11,8 @@
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
- <cpu>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
<numa>
<cell id='0' cpus='0' memory='262144' unit='KiB'
discard='no'/>
<cell id='1' cpus='1' memory='786432' unit='KiB'
discard='yes'/>
@@ -23,7 +24,7 @@
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
- <controller type='usb' index='0'>
+ <controller type='usb' index='0' model='piix3-uhci'>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
diff --git a/tests/qemuxml2xmloutdata/hugepages-default-2M.xml
b/tests/qemuxml2xmloutdata/hugepages-default-2M.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/hugepages-default-2M.xml
rename to tests/qemuxml2xmloutdata/hugepages-default-2M.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/hugepages-default-system-size.xml
b/tests/qemuxml2xmloutdata/hugepages-default-system-size.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/hugepages-default-system-size.xml
rename to tests/qemuxml2xmloutdata/hugepages-default-system-size.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/hugepages-default.x86_64-latest.xml
b/tests/qemuxml2xmloutdata/hugepages-default.x86_64-latest.xml
new file mode 120000
index 0000000000..a55514468e
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/hugepages-default.x86_64-latest.xml
@@ -0,0 +1 @@
+../qemuxml2argvdata/hugepages-default.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/hugepages-default.xml
b/tests/qemuxml2xmloutdata/hugepages-default.xml
deleted file mode 100644
index 977993fa52..0000000000
--- a/tests/qemuxml2xmloutdata/hugepages-default.xml
+++ /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>
- <memoryBacking>
- <hugepages/>
- </memoryBacking>
- <vcpu placement='static'>1</vcpu>
- <os>
- <type arch='x86_64' 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-x86_64</emulator>
- <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/hugepages-memaccess.xml
b/tests/qemuxml2xmloutdata/hugepages-memaccess.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/hugepages-memaccess.xml
rename to tests/qemuxml2xmloutdata/hugepages-memaccess.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/hugepages-memaccess2.xml
b/tests/qemuxml2xmloutdata/hugepages-memaccess2.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/hugepages-memaccess2.xml
rename to tests/qemuxml2xmloutdata/hugepages-memaccess2.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/hugepages-memaccess3.x86_64-latest.xml
b/tests/qemuxml2xmloutdata/hugepages-memaccess3.x86_64-latest.xml
new file mode 120000
index 0000000000..0b2a12b5de
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/hugepages-memaccess3.x86_64-latest.xml
@@ -0,0 +1 @@
+../qemuxml2argvdata/hugepages-memaccess3.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/hugepages-nodeset.x86_64-latest.xml
b/tests/qemuxml2xmloutdata/hugepages-nodeset.x86_64-latest.xml
new file mode 120000
index 0000000000..b55838b780
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/hugepages-nodeset.x86_64-latest.xml
@@ -0,0 +1 @@
+../qemuxml2argvdata/hugepages-nodeset.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/hugepages-nodeset.xml
b/tests/qemuxml2xmloutdata/hugepages-nodeset.xml
deleted file mode 100644
index 296933c6f2..0000000000
--- a/tests/qemuxml2xmloutdata/hugepages-nodeset.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<domain type='qemu'>
- <name>SomeDummyHugepagesGuest</name>
- <uuid>ef1bdff4-27f3-4e85-a807-5fb4d58463cc</uuid>
- <memory unit='KiB'>1048576</memory>
- <currentMemory unit='KiB'>1048576</currentMemory>
- <memoryBacking>
- <hugepages>
- <page size='2048' unit='KiB'/>
- </hugepages>
- </memoryBacking>
- <vcpu placement='static'>2</vcpu>
- <os>
- <type arch='x86_64' 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-x86_64</emulator>
- <controller type='usb' index='0'>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
- </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='none'/>
- </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/hugepages-numa-default-2M.x86_64-latest.xml
b/tests/qemuxml2xmloutdata/hugepages-numa-default-2M.x86_64-latest.xml
new file mode 120000
index 0000000000..bab31c4b99
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/hugepages-numa-default-2M.x86_64-latest.xml
@@ -0,0 +1 @@
+../qemuxml2argvdata/hugepages-numa-default-2M.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/hugepages-numa-default-2M.xml
b/tests/qemuxml2xmloutdata/hugepages-numa-default-2M.xml
deleted file mode 100644
index bf9f352d98..0000000000
--- a/tests/qemuxml2xmloutdata/hugepages-numa-default-2M.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<domain type='qemu'>
- <name>SomeDummyHugepagesGuest</name>
- <uuid>ef1bdff4-27f3-4e85-a807-5fb4d58463cc</uuid>
- <memory unit='KiB'>1048576</memory>
- <currentMemory unit='KiB'>1048576</currentMemory>
- <memoryBacking>
- <hugepages>
- <page size='2048' unit='KiB'/>
- </hugepages>
- </memoryBacking>
- <vcpu placement='static'>2</vcpu>
- <os>
- <type arch='x86_64' machine='pc'>hvm</type>
- <boot dev='hd'/>
- </os>
- <cpu>
- <numa>
- <cell id='0' cpus='0' memory='262144'
unit='KiB'/>
- <cell id='1' cpus='1' memory='786432'
unit='KiB'/>
- </numa>
- </cpu>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>destroy</on_crash>
- <devices>
- <emulator>/usr/bin/qemu-system-x86_64</emulator>
- <controller type='usb' index='0'>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
- </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='none'/>
- </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/hugepages-numa-default-dimm.xml
b/tests/qemuxml2xmloutdata/hugepages-numa-default-dimm.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/hugepages-numa-default-dimm.xml
rename to tests/qemuxml2xmloutdata/hugepages-numa-default-dimm.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.x86_64-latest.xml
b/tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.x86_64-latest.xml
new file mode 120000
index 0000000000..c98dfbcd12
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.x86_64-latest.xml
@@ -0,0 +1 @@
+../qemuxml2argvdata/hugepages-numa-nodeset-part.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.xml
b/tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.xml
deleted file mode 100644
index 177faaa19f..0000000000
--- a/tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<domain type='qemu'>
- <name>SomeDummyHugepagesGuest</name>
- <uuid>ef1bdff4-27f3-4e85-a807-5fb4d58463cc</uuid>
- <memory unit='KiB'>1048576</memory>
- <currentMemory unit='KiB'>1048576</currentMemory>
- <memoryBacking>
- <hugepages>
- <page size='1048576' unit='KiB' nodeset='1'/>
- </hugepages>
- </memoryBacking>
- <vcpu placement='static'>2</vcpu>
- <os>
- <type arch='x86_64' machine='pc'>hvm</type>
- <boot dev='hd'/>
- </os>
- <cpu>
- <numa>
- <cell id='0' cpus='0' memory='262144'
unit='KiB'/>
- <cell id='1' cpus='1' memory='786432'
unit='KiB'/>
- </numa>
- </cpu>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>destroy</on_crash>
- <devices>
- <emulator>/usr/bin/qemu-system-x86_64</emulator>
- <controller type='usb' index='0'>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
- </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='none'/>
- </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/hugepages-numa-nodeset.x86_64-latest.xml
b/tests/qemuxml2xmloutdata/hugepages-numa-nodeset.x86_64-latest.xml
new file mode 120000
index 0000000000..5603409c08
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/hugepages-numa-nodeset.x86_64-latest.xml
@@ -0,0 +1 @@
+../qemuxml2argvdata/hugepages-numa-nodeset.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/hugepages-numa-nodeset.xml
b/tests/qemuxml2xmloutdata/hugepages-numa-nodeset.xml
deleted file mode 100644
index e63407d1e2..0000000000
--- a/tests/qemuxml2xmloutdata/hugepages-numa-nodeset.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<domain type='qemu'>
- <name>QEMUGuest1</name>
- <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory unit='KiB'>4194304</memory>
- <currentMemory unit='KiB'>4194304</currentMemory>
- <memoryBacking>
- <hugepages>
- <page size='2048' unit='KiB' nodeset='1'/>
- <page size='1048576' unit='KiB' nodeset='0,2-3'/>
- </hugepages>
- </memoryBacking>
- <vcpu placement='static'>4</vcpu>
- <os>
- <type arch='x86_64' machine='pc'>hvm</type>
- <boot dev='hd'/>
- </os>
- <cpu>
- <numa>
- <cell id='0' cpus='0' memory='1048576'
unit='KiB'/>
- <cell id='1' cpus='1' memory='1048576'
unit='KiB'/>
- <cell id='2' cpus='2' memory='1048576'
unit='KiB'/>
- <cell id='3' cpus='3' memory='1048576'
unit='KiB'/>
- </numa>
- </cpu>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>destroy</on_crash>
- <devices>
- <emulator>/usr/bin/qemu-system-x86_64</emulator>
- <controller type='usb' index='0'>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
- </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='none'/>
- </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/hugepages-nvdimm.xml
b/tests/qemuxml2xmloutdata/hugepages-nvdimm.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/hugepages-nvdimm.xml
rename to tests/qemuxml2xmloutdata/hugepages-nvdimm.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/hugepages-shared.x86_64-latest.xml
b/tests/qemuxml2xmloutdata/hugepages-shared.x86_64-latest.xml
new file mode 120000
index 0000000000..3b7f1d12b1
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/hugepages-shared.x86_64-latest.xml
@@ -0,0 +1 @@
+../qemuxml2argvdata/hugepages-shared.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/hugepages-shared.xml
b/tests/qemuxml2xmloutdata/hugepages-shared.xml
deleted file mode 100644
index 4310442936..0000000000
--- a/tests/qemuxml2xmloutdata/hugepages-shared.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<domain type='qemu'>
- <name>QEMUGuest1</name>
- <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory unit='KiB'>4194304</memory>
- <currentMemory unit='KiB'>4194304</currentMemory>
- <memoryBacking>
- <hugepages>
- <page size='2048' unit='KiB' nodeset='1'/>
- <page size='1048576' unit='KiB' nodeset='0,2-3'/>
- </hugepages>
- </memoryBacking>
- <vcpu placement='static'>4</vcpu>
- <numatune>
- <memory mode='strict' nodeset='0-3'/>
- <memnode cellid='3' mode='strict' nodeset='3'/>
- </numatune>
- <os>
- <type arch='x86_64' machine='pc'>hvm</type>
- <boot dev='hd'/>
- </os>
- <cpu>
- <numa>
- <cell id='0' cpus='0' memory='1048576'
unit='KiB'/>
- <cell id='1' cpus='1' memory='1048576'
unit='KiB' memAccess='shared'/>
- <cell id='2' cpus='2' memory='1048576'
unit='KiB' memAccess='private'/>
- <cell id='3' cpus='3' memory='1048576'
unit='KiB'/>
- </numa>
- </cpu>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>destroy</on_crash>
- <devices>
- <emulator>/usr/bin/qemu-system-x86_64</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/pages-dimm-discard.xml
b/tests/qemuxml2xmloutdata/pages-dimm-discard.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/pages-dimm-discard.xml
rename to tests/qemuxml2xmloutdata/pages-dimm-discard.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/pages-discard-hugepages.xml
b/tests/qemuxml2xmloutdata/pages-discard-hugepages.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/pages-discard-hugepages.xml
rename to tests/qemuxml2xmloutdata/pages-discard-hugepages.x86_64-latest.xml
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 3a2d029c4f..966496604d 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -295,24 +295,21 @@ mymain(void)
DO_TEST_NOCAPS("pmu-feature-off");
DO_TEST_NOCAPS("pages-discard");
- DO_TEST("pages-discard-hugepages", QEMU_CAPS_OBJECT_MEMORY_FILE);
- DO_TEST("pages-dimm-discard", QEMU_CAPS_DEVICE_PC_DIMM);
- DO_TEST("hugepages-default", QEMU_CAPS_OBJECT_MEMORY_FILE);
- DO_TEST("hugepages-default-2M", QEMU_CAPS_OBJECT_MEMORY_FILE);
- DO_TEST("hugepages-default-system-size", QEMU_CAPS_OBJECT_MEMORY_FILE);
- DO_TEST("hugepages-nodeset", QEMU_CAPS_OBJECT_MEMORY_FILE);
- DO_TEST("hugepages-numa-default-2M", QEMU_CAPS_OBJECT_MEMORY_FILE);
- DO_TEST("hugepages-numa-default-dimm", QEMU_CAPS_DEVICE_PC_DIMM,
- QEMU_CAPS_OBJECT_MEMORY_FILE);
- DO_TEST("hugepages-numa-nodeset", QEMU_CAPS_OBJECT_MEMORY_FILE);
- DO_TEST("hugepages-numa-nodeset-part", QEMU_CAPS_OBJECT_MEMORY_FILE);
- DO_TEST("hugepages-shared", QEMU_CAPS_OBJECT_MEMORY_FILE);
- DO_TEST("hugepages-memaccess", QEMU_CAPS_DEVICE_PC_DIMM,
- QEMU_CAPS_OBJECT_MEMORY_FILE);
- DO_TEST("hugepages-memaccess2", QEMU_CAPS_DEVICE_PC_DIMM,
- QEMU_CAPS_OBJECT_MEMORY_FILE);
- DO_TEST("hugepages-nvdimm", QEMU_CAPS_DEVICE_NVDIMM,
- QEMU_CAPS_OBJECT_MEMORY_FILE);
+ DO_TEST_CAPS_LATEST("pages-discard-hugepages");
+ DO_TEST_CAPS_LATEST("pages-dimm-discard");
+ DO_TEST_CAPS_LATEST("hugepages-default");
+ DO_TEST_CAPS_LATEST("hugepages-default-2M");
+ DO_TEST_CAPS_LATEST("hugepages-default-system-size");
+ DO_TEST_CAPS_LATEST("hugepages-nodeset");
+ DO_TEST_CAPS_LATEST("hugepages-numa-default-2M");
+ DO_TEST_CAPS_LATEST("hugepages-numa-default-dimm");
+ DO_TEST_CAPS_LATEST("hugepages-numa-nodeset");
+ DO_TEST_CAPS_LATEST("hugepages-numa-nodeset-part");
+ DO_TEST_CAPS_LATEST("hugepages-shared");
+ DO_TEST_CAPS_LATEST("hugepages-memaccess");
+ DO_TEST_CAPS_LATEST("hugepages-memaccess2");
+ DO_TEST_CAPS_LATEST("hugepages-memaccess3");
+ DO_TEST_CAPS_LATEST("hugepages-nvdimm");
DO_TEST_NOCAPS("nosharepages");
DO_TEST_NOCAPS("restore-v2");
DO_TEST_NOCAPS("migrate");
--
2.37.4