libvirt/tests/qemuxml2xmloutdata
Cole Robinson 8910e063db caps: Fix regression defaulting to host arch
My commit 747761a79 (v1.2.15 only) dropped this bit of logic when filling
in a default arch in the XML:

-    /* First try to find one matching host arch */
-    for (i = 0; i < caps->nguests; i++) {
-        if (caps->guests[i]->ostype == ostype) {
-            for (j = 0; j < caps->guests[i]->arch.ndomains; j++) {
-                if (caps->guests[i]->arch.domains[j]->type == domain &&
-                    caps->guests[i]->arch.id == caps->host.arch)
-                    return caps->guests[i]->arch.id;
-            }
-        }
-    }

That attempt to match host.arch is important, otherwise we end up
defaulting to i686 on x86_64 host for KVM, which is not intended.
Duplicate it in the centralized CapsLookup function.

Additionally add some testcases that would have caught this.

https://bugzilla.redhat.com/show_bug.cgi?id=1219191
2015-05-08 11:11:32 -04:00
..
qemuxml2xmlout-balloon-device-auto.xml conf: Swap order of AddImplicitControllers and DomainDefPostParse 2013-06-28 09:52:00 +02:00
qemuxml2xmlout-balloon-device-period.xml conf: Reorder elements inside memballoon 2015-03-17 12:03:33 +01:00
qemuxml2xmlout-bios-nvram-os-interleave.xml tests: Add test for os interleaving 2015-03-09 07:52:34 +01:00
qemuxml2xmlout-boot-menu-disable-with-timeout.xml docs, conf: add support for bootmenu timeout 2014-08-25 14:10:54 +02:00
qemuxml2xmlout-channel-virtio-auto.xml Allocate virtio-serial addresses when starting a domain 2015-04-02 15:00:13 +02:00
qemuxml2xmlout-channel-virtio-state-active.xml conf: Add channel state for virtio channels to the XML 2014-11-21 11:00:11 +01:00
qemuxml2xmlout-channel-virtio-state-inactive.xml conf: Add channel state for virtio channels to the XML 2014-11-21 11:00:11 +01:00
qemuxml2xmlout-console-compat-auto.xml qemu: auto-add pci-root controller for pc machine types 2013-04-25 13:05:10 +02:00
qemuxml2xmlout-console-virtio.xml conf: Swap order of AddImplicitControllers and DomainDefPostParse 2013-06-28 09:52:00 +02:00
qemuxml2xmlout-cpu-empty.xml conf: Don't output <cpu> tag if it contains no information. 2015-04-13 09:27:26 +02:00
qemuxml2xmlout-cpu-numa1.xml cpu_conf: Allow specification of 'units' for @memory on numa nodes. 2014-11-10 14:55:45 +01:00
qemuxml2xmlout-cpu-numa2.xml cpu_conf: Allow specification of 'units' for @memory on numa nodes. 2014-11-10 14:55:45 +01:00
qemuxml2xmlout-cpu-numa-no-memory-element.xml conf: Make specifying <memory> optional 2015-03-16 14:32:20 +01:00
qemuxml2xmlout-cputune-iothreads.xml Move iothreadspin information into iothreadids 2015-04-27 12:36:35 -04:00
qemuxml2xmlout-cputune-iothreadsched.xml docs, schema, conf: Add support for setting scheduler parameters of guest threads 2015-02-11 17:30:06 +01:00
qemuxml2xmlout-default-kvm-host-arch.xml caps: Fix regression defaulting to host arch 2015-05-08 11:11:32 -04:00
qemuxml2xmlout-default-qemu-host-arch.xml caps: Fix regression defaulting to host arch 2015-05-08 11:11:32 -04:00
qemuxml2xmlout-disk-backing-chains-active.xml tests: Test backing store XML formatting and parsing 2014-04-24 16:07:56 +02:00
qemuxml2xmlout-disk-backing-chains-inactive.xml tests: Test backing store XML formatting and parsing 2014-04-24 16:07:56 +02:00
qemuxml2xmlout-disk-drive-discard.xml conf: fix omission of <driver> in domain dumpxml 2014-04-16 10:49:07 +02:00
qemuxml2xmlout-disk-mirror-old-inactive.xml conf: alter disk mirror xml output 2014-06-06 11:48:09 -06:00
qemuxml2xmlout-disk-mirror-old.xml blockcommit: track job type in xml 2014-07-30 06:32:38 -06:00
qemuxml2xmlout-disk-mirror.xml qemu: auto-add pci-root controller for pc machine types 2013-04-25 13:05:10 +02:00
qemuxml2xmlout-disk-scsi-device-auto.xml conf: Swap order of AddImplicitControllers and DomainDefPostParse 2013-06-28 09:52:00 +02:00
qemuxml2xmlout-disk-source-pool.xml disk: Disallow duplicated target 'dev' values 2015-03-02 22:38:36 -05:00
qemuxml2xmlout-graphics-listen-network2.xml video: cleanup usage of vram attribute and update documentation 2014-11-24 22:05:55 +01:00
qemuxml2xmlout-graphics-spice-timeout.xml video: cleanup usage of vram attribute and update documentation 2014-11-24 22:05:55 +01:00
qemuxml2xmlout-hostdev-scsi-autogen-address.xml conf: Generate address for scsi host device automatically 2013-06-01 10:00:23 +08:00
qemuxml2xmlout-memtune-unlimited.xml conf: don't format memtune with unlimited values 2013-12-10 09:11:26 +01:00
qemuxml2xmlout-memtune.xml memtune: change the way how we store unlimited value 2015-03-06 11:52:24 +01:00
qemuxml2xmlout-metadata-duplicate.xml conf: Remove duplicate entries in <metadata> by namespace 2015-03-05 16:24:34 +01:00
qemuxml2xmlout-metadata.xml qemu: auto-add pci-root controller for pc machine types 2013-04-25 13:05:10 +02:00
qemuxml2xmlout-numad-auto-memory-vcpu-cpuset.xml qemu: auto-add pci-root controller for pc machine types 2013-04-25 13:05:10 +02:00
qemuxml2xmlout-numad-auto-memory-vcpu-no-cpuset-and-placement.xml qemu: auto-add pci-root controller for pc machine types 2013-04-25 13:05:10 +02:00
qemuxml2xmlout-numad-auto-vcpu-no-numatune.xml qemu: auto-add pci-root controller for pc machine types 2013-04-25 13:05:10 +02:00
qemuxml2xmlout-numatune-auto-prefer.xml cpu_conf: Allow specification of 'units' for @memory on numa nodes. 2014-11-10 14:55:45 +01:00
qemuxml2xmlout-numatune-memnode.xml conf: numa: Don't duplicate NUMA cell cpumask 2015-02-20 17:43:03 +01:00
qemuxml2xmlout-pci-autoadd-addr.xml video: cleanup usage of vram attribute and update documentation 2014-11-24 22:05:55 +01:00
qemuxml2xmlout-pci-autoadd-idx.xml video: cleanup usage of vram attribute and update documentation 2014-11-24 22:05:55 +01:00
qemuxml2xmlout-pci-bridge-many-disks.xml disk: Disallow duplicated target 'dev' values 2015-03-02 22:38:36 -05:00
qemuxml2xmlout-pcie-root.xml qemu: fix handling of default/implicit devices for q35 2013-08-05 15:47:49 -04:00
qemuxml2xmlout-pcihole64-gib.xml Add pcihole64 element to root PCI controllers 2013-08-27 17:42:29 +02:00
qemuxml2xmlout-pmu-feature.xml docs, schema, conf: Add support for PMU feature 2015-01-16 13:43:46 +01:00
qemuxml2xmlout-q35.xml qemu-command: introduce new vgamem attribute for QXL video device 2014-11-24 22:20:13 +01:00
qemuxml2xmlout-s390-defaultconsole.xml Prevent default creation of usb controller on s390 and s390x 2015-02-23 14:50:15 -05:00
qemuxml2xmlout-seclabel-dynamic-labelskip.xml selinux: distinguish failure to label from request to avoid label 2013-08-20 10:39:03 -06:00
qemuxml2xmlout-seclabel-dynamic-none-relabel.xml tests: Add test cases for previous commit 2014-09-05 08:35:34 +02:00
qemuxml2xmlout-seclabel-dynamic-relabel.xml tests: Add test cases for previous commit 2014-09-05 08:35:34 +02:00
qemuxml2xmlout-seclabel-none.xml tests: Add test cases for previous commit 2014-09-05 08:35:34 +02:00
qemuxml2xmlout-serial-target-port-auto.xml qemu: auto-add pci-root controller for pc machine types 2013-04-25 13:05:10 +02:00
qemuxml2xmlout-tap-vhost-incorrect.xml Only parse custom vhost path for virtio interfaces 2015-02-06 12:52:50 +01:00
qemuxml2xmlout-usb-ich9-ehci-addr.xml qemu: auto-add pci-root controller for pc machine types 2013-04-25 13:05:10 +02:00
qemuxml2xmlout-usb-redir-filter-version.xml Fix usb device version parsing issues 2015-04-13 12:33:41 +02:00
qemuxml2xmlout-usb-redir-filter.xml Do xml->xml test for usb-redir-filter 2015-04-13 12:24:26 +02:00