Commit Graph

17 Commits

Author SHA1 Message Date
Peter Krempa
b0aa088fad tests: qemumonitorjson: Test node name detection on networked storage 2017-03-27 10:35:19 +02:00
Peter Krempa
2a50c18fc0 tests: qemumonitorjson: Add relative image names for node name detection
oVirt uses relative names with directories in them. Test such
configuration. Also tests a snapshot done with _REUSE_EXTERNAL and a
relative backing file pre-specified in the qcow2 metadata.
2017-03-27 10:35:19 +02:00
Peter Krempa
b6c5a3f09b tests: qemumonitorjson: Add case for two disks sharing a backing image
Since we have to match the images by filename a common backing image
will break the detection process. Add a test case to see that the code
correctly did not continue the detection process.
2017-03-27 10:35:19 +02:00
Peter Krempa
aece275043 tests: qemumonitorjson: Add long backing chain test case for node name detection 2017-03-27 10:35:19 +02:00
Peter Krempa
217484bdbd tests: qemumonitorjson: Add test case for node name detection code
The code is rather magic so a test case will help making sure that
everything works well. The first case is a simple backing chain.
2017-03-27 10:35:19 +02:00
Peter Krempa
b6afa9a8b5 qemu: monitor: Properly propagate the 'qemu_id' field through the matcher
Commit 3f71c79768 added 'qemu_id' field to track the id of the cpu
as reported by query-cpus. The patch did not include changes necessary
to propagate the id through the functions matching the data to the
libvirt cpu structures and thus all vcpus had id 0.
2016-11-22 10:44:17 +01:00
Peter Krempa
62d57d1b23 tests: qemumonitorjson: Rename 'qemu-id' to 'enable-id' in cpu info test
The field is named 'enable_id' in other structures and a patch recently
added 'qemu_id' which has different semantics. To avoid confusion in the
tests rename the field.
2016-11-22 10:23:47 +01:00
Peter Krempa
2a0e68be91 qemu: monitor: Add vcpu state information to monitor data
Return whether a vcpu entry is hotpluggable or online so that upper
layers don't have to infer the information from other data.

Advantage is that this code can be tested by unit tests.
2016-09-14 12:55:33 +02:00
Peter Krempa
04fce1d496 tests: cpu-hotplug: Add data for ppc64 without threads enabled
The reported data is unusual so add it to the test suite.
2016-08-24 15:44:47 -04:00
Peter Krempa
1c455c4743 tests: cpu-hotplug: Add data for ppc64 out-of-order hotplug
Test the algorithm that extracts the order in which the vcpu entries
were plugged in on a sample of data created by plugging in vcpus
arbitrarily.
2016-08-24 15:44:47 -04:00
Peter Krempa
d1145aad0b tests: cpu-hotplug: Add data for ppc64 platform including hotplug
Power 8 platform's basic hotpluggable unit is a core rather than a
thread for x86_64 family. This introduces most of the complexity of the
matching code and thus needs to be tested.

The test data contain data captured from in-order cpu hotplug and
unplug operations.
2016-08-24 15:44:47 -04:00
Peter Krempa
22e3bb332e tests: cpu-hotplug: Add data for x86 hotplug with 11+ vcpus
During review it was reported that adding at least 11 vcpus creates a
collision of prefixes in the monitor matching algorithm. Add a test case
to verify that the problem won't happen.
2016-08-24 15:44:47 -04:00
Peter Krempa
f8638471d7 tests: Add test infrastructure for qemuMonitorGetCPUInfo
As the combination algorithm is rather complex and ugly it's necessary
to make sure it works properly. Add test suite infrastructure for
testing it along with a basic test based on x86_64 platform.
2016-08-24 15:44:47 -04:00
Jiri Denemark
f0fd7ae122 cpu_x86: Prepare for ecx_in CPUID parameter
CPUID instruction normally takes its parameter from EAX, but sometimes
ECX is used as an additional parameter. This patch prepares the x86 CPU
driver code for the new 'ecx_in' CPUID parameter.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2016-06-09 10:03:38 +02:00
Jiri Denemark
7b7cc3aaec qemumonitorjsontest: Add getcpu test data
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2016-06-09 09:50:13 +02:00
Jiri Denemark
90f4bc34b5 cpu_x86: Rename CPUID function to eax_in
CPUID instruction normally takes its parameter from EAX, but sometimes
ECX is used as an additional parameter. Let's rename 'function' to
'eax_in' in preparation for adding 'ecx_in'.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2016-06-09 09:47:56 +02:00
Jiri Denemark
3afde0756f qemu: Add monitor APIs to fetch CPUID data from QEMU
The qemu monitor supports retrieval of actual CPUID bits presented to
the guest using QMP monitor. Add APIs to extract these information and
tests for them.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2013-11-08 09:44:36 +01:00