On Fri, Aug 05, 2016 at 03:56:06PM +0200, Peter Krempa wrote:
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.
---
.../qemumonitorjson-cpuinfo-ppc64-basic-cpus.json | 77 +++++++
...emumonitorjson-cpuinfo-ppc64-basic-hotplug.json | 27 +++
.../qemumonitorjson-cpuinfo-ppc64-basic.data | 40 ++++
...mumonitorjson-cpuinfo-ppc64-hotplug-1-cpus.json | 149 ++++++++++++++
...onitorjson-cpuinfo-ppc64-hotplug-1-hotplug.json | 28 +++
.../qemumonitorjson-cpuinfo-ppc64-hotplug-1.data | 51 +++++
...mumonitorjson-cpuinfo-ppc64-hotplug-2-cpus.json | 221 +++++++++++++++++++++
...onitorjson-cpuinfo-ppc64-hotplug-2-hotplug.json | 29 +++
.../qemumonitorjson-cpuinfo-ppc64-hotplug-2.data | 62 ++++++
...mumonitorjson-cpuinfo-ppc64-hotplug-3-cpus.json | 149 ++++++++++++++
...onitorjson-cpuinfo-ppc64-hotplug-3-hotplug.json | 28 +++
.../qemumonitorjson-cpuinfo-ppc64-hotplug-3.data | 51 +++++
tests/qemumonitorjsontest.c | 5 +
13 files changed, 917 insertions(+)
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic-cpus.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic-hotplug.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic.data
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1-cpus.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1-hotplug.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1.data
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2-cpus.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2-hotplug.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2.data
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-3-cpus.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-3-hotplug.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-3.data
[...]
diff --git
a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1-hotplug.json
b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1-hotplug.json
new file mode 100644
index 0000000..e7594c3
--- /dev/null
+++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1-hotplug.json
@@ -0,0 +1,28 @@
+{
+ "return": [
+ {
+ "props": {
+ "core-id": 16
+ },
+ "vcpus-count": 8,
+ "type": "host-spapr-cpu-core"
+ },
+ {
+ "props": {
+ "core-id": 8
+ },
+ "vcpus-count": 8,
+ "qom-path": "/machine/peripheral/vcpu0",
+ "type": "host-spapr-cpu-core"
+ },
I know that those are just test data, but for the sake of correctness the alias
should be "vcpu8" and this applies for all test data.
+ {
+ "props": {
+ "core-id": 0
+ },
+ "vcpus-count": 8,
+ "qom-path": "/machine/unattached/device[1]",
+ "type": "host-spapr-cpu-core"
+ }
+ ],
+ "id": "libvirt-15"
+}
[...]
diff --git a/tests/qemumonitorjsontest.c
b/tests/qemumonitorjsontest.c
index d707747..09e6a7d 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -2585,6 +2585,11 @@ mymain(void)
DO_TEST_CPU_INFO("x86-basic-pluggable", 8);
+ DO_TEST_CPU_INFO("ppc64-basic", 24);
+ DO_TEST_CPU_INFO("ppc64-hotplug-1", 24);
+ DO_TEST_CPU_INFO("ppc64-hotplug-2", 24);
+ DO_TEST_CPU_INFO("ppc64-hotplug-3", 24);
+
There is no difference between tests *ppc64-hotplug-1* and *ppc64-hotplug-3*.
diff tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-{1,3}.data
qemuTestDriverFree(&driver);
return (ret == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
ACK if you resolve the test duplicate, the alias naming would be nice to
correspond to the real data.
Pavel