tests: qemudomainsnapshotxml2xmlout: Use real 'x86_64' capabilities in all test data

Use the platform which is getting most development for the snapshot XML
examples so that it's tested against latest capabilities.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Peter Krempa 2023-07-03 13:40:38 +02:00
parent faa4d488e5
commit 86edcfac4d
5 changed files with 30 additions and 12 deletions

View File

@ -31,15 +31,18 @@
<currentMemory unit='KiB'>219100</currentMemory> <currentMemory unit='KiB'>219100</currentMemory>
<vcpu placement='static' cpuset='1-4,8-20,525'>1</vcpu> <vcpu placement='static' cpuset='1-4,8-20,525'>1</vcpu>
<os> <os>
<type arch='i686' machine='pc'>hvm</type> <type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/> <boot dev='hd'/>
</os> </os>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu64</model>
</cpu>
<clock offset='utc'/> <clock offset='utc'/>
<on_poweroff>destroy</on_poweroff> <on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot> <on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash> <on_crash>destroy</on_crash>
<devices> <devices>
<emulator>/usr/bin/qemu-system-i386</emulator> <emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='block' device='disk'> <disk type='block' device='disk'>
<driver name='qemu' type='raw'/> <driver name='qemu' type='raw'/>
<source dev='/dev/HostVG/QEMUGuest1'/> <source dev='/dev/HostVG/QEMUGuest1'/>
@ -76,7 +79,7 @@
<target dev='hdf' bus='ide'/> <target dev='hdf' bus='ide'/>
<address type='drive' controller='0' bus='5' target='0' unit='0'/> <address type='drive' controller='0' bus='5' target='0' unit='0'/>
</disk> </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'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller> </controller>
<controller type='ide' index='0'> <controller type='ide' index='0'>

View File

@ -21,22 +21,25 @@
<currentMemory unit='KiB'>219100</currentMemory> <currentMemory unit='KiB'>219100</currentMemory>
<vcpu placement='static' cpuset='1-4,8-20,525'>1</vcpu> <vcpu placement='static' cpuset='1-4,8-20,525'>1</vcpu>
<os> <os>
<type arch='i686' machine='pc'>hvm</type> <type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/> <boot dev='hd'/>
</os> </os>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu64</model>
</cpu>
<clock offset='utc'/> <clock offset='utc'/>
<on_poweroff>destroy</on_poweroff> <on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot> <on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash> <on_crash>destroy</on_crash>
<devices> <devices>
<emulator>/usr/bin/qemu-system-i386</emulator> <emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='block' device='disk' snapshot='no'> <disk type='block' device='disk' snapshot='no'>
<driver name='qemu' type='raw'/> <driver name='qemu' type='raw'/>
<source dev='/dev/HostVG/QEMUGuest1'/> <source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda' bus='ide'/> <target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk> </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'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller> </controller>
<controller type='ide' index='0'> <controller type='ide' index='0'>

View File

@ -14,22 +14,25 @@
<currentMemory unit='KiB'>219100</currentMemory> <currentMemory unit='KiB'>219100</currentMemory>
<vcpu placement='static' cpuset='1-4,8-20,525'>1</vcpu> <vcpu placement='static' cpuset='1-4,8-20,525'>1</vcpu>
<os> <os>
<type arch='i686' machine='pc'>hvm</type> <type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/> <boot dev='hd'/>
</os> </os>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu64</model>
</cpu>
<clock offset='utc'/> <clock offset='utc'/>
<on_poweroff>destroy</on_poweroff> <on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot> <on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash> <on_crash>destroy</on_crash>
<devices> <devices>
<emulator>/usr/bin/qemu-system-i386</emulator> <emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='block' device='disk'> <disk type='block' device='disk'>
<driver name='qemu' type='raw'/> <driver name='qemu' type='raw'/>
<source dev='/dev/HostVG/QEMUGuest1'/> <source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda' bus='ide'/> <target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk> </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'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller> </controller>
<controller type='ide' index='0'> <controller type='ide' index='0'>

View File

@ -18,22 +18,25 @@
<currentMemory unit='KiB'>219100</currentMemory> <currentMemory unit='KiB'>219100</currentMemory>
<vcpu placement='static' cpuset='1-4,8-20,525'>1</vcpu> <vcpu placement='static' cpuset='1-4,8-20,525'>1</vcpu>
<os> <os>
<type arch='i686' machine='pc'>hvm</type> <type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/> <boot dev='hd'/>
</os> </os>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu64</model>
</cpu>
<clock offset='utc'/> <clock offset='utc'/>
<on_poweroff>destroy</on_poweroff> <on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot> <on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash> <on_crash>destroy</on_crash>
<devices> <devices>
<emulator>/usr/bin/qemu-system-i386</emulator> <emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='block' device='disk'> <disk type='block' device='disk'>
<driver name='qemu' type='raw'/> <driver name='qemu' type='raw'/>
<source dev='/dev/HostVG/QEMUGuest1'/> <source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda' bus='ide'/> <target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk> </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'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller> </controller>
<controller type='ide' index='0'> <controller type='ide' index='0'>

View File

@ -109,11 +109,17 @@ testCompareXMLToXMLHelper(const void *data)
static int static int
mymain(void) mymain(void)
{ {
g_autoptr(GHashTable) capslatest = testQemuGetLatestCaps();
g_autoptr(GHashTable) capscache = virHashNew(virObjectUnref);
int ret = 0; int ret = 0;
if (qemuTestDriverInit(&driver) < 0) if (qemuTestDriverInit(&driver) < 0)
return EXIT_FAILURE; return EXIT_FAILURE;
if (testQemuInsertRealCaps(driver.qemuCapsCache, "x86_64", "latest", "",
capslatest, capscache, NULL, NULL) < 0)
return EXIT_FAILURE;
virDomainXMLOptionSetMomentPostParse(driver.xmlopt, virDomainXMLOptionSetMomentPostParse(driver.xmlopt,
testSnapshotPostParse); testSnapshotPostParse);