summaryrefslogtreecommitdiff
path: root/tests/test_misc.py
Commit message (Collapse)AuthorAgeFilesLines
* tests: update x86 capabilities dataCole Robinson2022-01-251-1/+1
| | | | | | Using qemu 6.1.0 and libvirt 7.6.0 on Fedora 35 Signed-off-by: Cole Robinson <crobinso@redhat.com>
* tests: Clean up URI building and namingCole Robinson2022-01-251-1/+1
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virtinst: allow to force create topology from scratchDaniel P. Berrangé2022-01-201-0/+4
| | | | | | | | | When setting CPU defaults we want to force create the topology even if the user has not specified anything. In particular this allows for overriding the QEMU defaults, to expose vCPUs as cores instead of sockets which is a much saner default for Windows. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* virtinst: prefer cores when exposing topology to the guestDaniel P. Berrangé2022-01-201-2/+2
| | | | | | | | | | | | | | | | | | | | | In real world silicon though it is rare to have high socket/die counts, but common to have huge core counts. Some OS will even refuse to use sockets over a certain count. Thus we prefer to expose cores to the guest rather than sockets as the default for missing fields. This matches a recent change made in QEMU for new machine types commit 4a0af2930a4e4f64ce551152fdb4b9e7be106408 Author: Yanan Wang <wangyanan55@huawei.com> Date: Wed Sep 29 10:58:09 2021 +0800 machine: Prefer cores over sockets in smp parsing since 6.2 Closes: https://github.com/virt-manager/virt-manager/issues/155 Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* virtinst: validate that the CPU topology is saneDaniel P. Berrangé2022-01-201-2/+10
| | | | | | | | | | | The product of sockets * dies * cores * threads must be equal to the vCPU count. While libvirt and QEMU will report this error scenario, it makes sense to catch it in virt-install, so we can test our local logic for setting defaults for topology. This exposes some inconsistent configurations in the test suite. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* tests: re-arrange CPU topology test for clarityDaniel P. Berrangé2022-01-201-2/+5
| | | | Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* virtinst: make CPU topology defaulting take account of diesDaniel P. Berrangé2022-01-201-0/+5
| | | | | | | | | | | | Any missing values in the topology need to be calculated based on the other values which are set. We can take account of fact that 'total_vcpus' treats any unset values as being 1 to simplify the way we set topology defaults. This ensures that topology defaulting takes account of dies. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* virtinst: set dies in topology to 1Daniel P. Berrangé2022-01-201-4/+4
| | | | | | | | It is always permitted to set dies==1 regardless of architecture or machine type. The only constraint is around setting values > 1, for archs/machines that don't support the dies concept. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* virtinst: take account of 'dies' when calc vcpu count from topologyDaniel P. Berrangé2022-01-201-0/+6
| | | | Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* tests: Add full test coverage for progress text outputCole Robinson2021-06-091-0/+75
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* tests: Rename test_xmlconfig.py to test_misc.pyCole Robinson2020-09-191-0/+126
That's what it is now, just a collection of misc virtinst tests Signed-off-by: Cole Robinson <crobinso@redhat.com>