render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
6ae9ed
From 152273b20712529ee9506c5e1307b4703d1b9297 Mon Sep 17 00:00:00 2001
6ae9ed
Message-Id: <152273b20712529ee9506c5e1307b4703d1b9297@dist-git>
6ae9ed
From: Peter Krempa <pkrempa@redhat.com>
6ae9ed
Date: Wed, 24 Aug 2016 16:11:27 -0400
6ae9ed
Subject: [PATCH] tests: cpu-hotplug: Add data for ppc64 platform including
6ae9ed
 hotplug
6ae9ed
6ae9ed
https://bugzilla.redhat.com/show_bug.cgi?id=1097930
6ae9ed
https://bugzilla.redhat.com/show_bug.cgi?id=1224341
6ae9ed
6ae9ed
Power 8 platform's basic hotpluggable unit is a core rather than a
6ae9ed
thread for x86_64 family. This introduces most of the complexity of the
6ae9ed
matching code and thus needs to be tested.
6ae9ed
6ae9ed
The test data contain data captured from in-order cpu hotplug and
6ae9ed
unplug operations.
6ae9ed
6ae9ed
(cherry picked from commit d1145aad0be156ca04d9745bc1130e148d74eaee)
6ae9ed
---
6ae9ed
 .../qemumonitorjson-cpuinfo-ppc64-basic-cpus.json  |  77 +++++++
6ae9ed
 ...emumonitorjson-cpuinfo-ppc64-basic-hotplug.json |  27 +++
6ae9ed
 .../qemumonitorjson-cpuinfo-ppc64-basic.data       |  40 ++++
6ae9ed
 ...mumonitorjson-cpuinfo-ppc64-hotplug-1-cpus.json | 149 ++++++++++++++
6ae9ed
 ...onitorjson-cpuinfo-ppc64-hotplug-1-hotplug.json |  28 +++
6ae9ed
 .../qemumonitorjson-cpuinfo-ppc64-hotplug-1.data   |  51 +++++
6ae9ed
 ...mumonitorjson-cpuinfo-ppc64-hotplug-2-cpus.json | 221 +++++++++++++++++++++
6ae9ed
 ...onitorjson-cpuinfo-ppc64-hotplug-2-hotplug.json |  29 +++
6ae9ed
 .../qemumonitorjson-cpuinfo-ppc64-hotplug-2.data   |  62 ++++++
6ae9ed
 tests/qemumonitorjsontest.c                        |   4 +
6ae9ed
 10 files changed, 688 insertions(+)
6ae9ed
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic-cpus.json
6ae9ed
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic-hotplug.json
6ae9ed
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic.data
6ae9ed
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1-cpus.json
6ae9ed
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1-hotplug.json
6ae9ed
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1.data
6ae9ed
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2-cpus.json
6ae9ed
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2-hotplug.json
6ae9ed
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2.data
6ae9ed
6ae9ed
diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic-cpus.json b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic-cpus.json
6ae9ed
new file mode 100644
6ae9ed
index 0000000..27a3d8b
6ae9ed
--- /dev/null
6ae9ed
+++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic-cpus.json
6ae9ed
@@ -0,0 +1,77 @@
6ae9ed
+{
6ae9ed
+  "return": [
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": true,
6ae9ed
+      "CPU": 0,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[0]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21925
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 1,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[1]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21926
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 2,
6ae9ed
+      "nip": -4611686018422360608,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[2]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21927
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 3,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[3]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21928
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 4,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[4]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21930
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 5,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[5]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21931
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 6,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[6]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21932
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 7,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[7]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21933
6ae9ed
+    }
6ae9ed
+  ],
6ae9ed
+  "id": "libvirt-12"
6ae9ed
+}
6ae9ed
diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic-hotplug.json b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic-hotplug.json
6ae9ed
new file mode 100644
6ae9ed
index 0000000..513317b
6ae9ed
--- /dev/null
6ae9ed
+++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic-hotplug.json
6ae9ed
@@ -0,0 +1,27 @@
6ae9ed
+{
6ae9ed
+  "return": [
6ae9ed
+    {
6ae9ed
+      "props": {
6ae9ed
+        "core-id": 16
6ae9ed
+      },
6ae9ed
+      "vcpus-count": 8,
6ae9ed
+      "type": "host-spapr-cpu-core"
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "props": {
6ae9ed
+        "core-id": 8
6ae9ed
+      },
6ae9ed
+      "vcpus-count": 8,
6ae9ed
+      "type": "host-spapr-cpu-core"
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "props": {
6ae9ed
+        "core-id": 0
6ae9ed
+      },
6ae9ed
+      "vcpus-count": 8,
6ae9ed
+      "qom-path": "/machine/unattached/device[1]",
6ae9ed
+      "type": "host-spapr-cpu-core"
6ae9ed
+    }
6ae9ed
+  ],
6ae9ed
+  "id": "libvirt-11"
6ae9ed
+}
6ae9ed
diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic.data b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic.data
6ae9ed
new file mode 100644
6ae9ed
index 0000000..9fc8148
6ae9ed
--- /dev/null
6ae9ed
+++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic.data
6ae9ed
@@ -0,0 +1,40 @@
6ae9ed
+[vcpu libvirt-id='0']
6ae9ed
+    thread-id='21925'
6ae9ed
+    qemu-id='1'
6ae9ed
+    type='host-spapr-cpu-core'
6ae9ed
+    qom_path='/machine/unattached/device[1]'
6ae9ed
+    topology: core='0' vcpus='8'
6ae9ed
+[vcpu libvirt-id='1']
6ae9ed
+    thread-id='21926'
6ae9ed
+[vcpu libvirt-id='2']
6ae9ed
+    thread-id='21927'
6ae9ed
+[vcpu libvirt-id='3']
6ae9ed
+    thread-id='21928'
6ae9ed
+[vcpu libvirt-id='4']
6ae9ed
+    thread-id='21930'
6ae9ed
+[vcpu libvirt-id='5']
6ae9ed
+    thread-id='21931'
6ae9ed
+[vcpu libvirt-id='6']
6ae9ed
+    thread-id='21932'
6ae9ed
+[vcpu libvirt-id='7']
6ae9ed
+    thread-id='21933'
6ae9ed
+[vcpu libvirt-id='8']
6ae9ed
+    type='host-spapr-cpu-core'
6ae9ed
+    topology: core='8' vcpus='8'
6ae9ed
+[vcpu libvirt-id='9']
6ae9ed
+[vcpu libvirt-id='10']
6ae9ed
+[vcpu libvirt-id='11']
6ae9ed
+[vcpu libvirt-id='12']
6ae9ed
+[vcpu libvirt-id='13']
6ae9ed
+[vcpu libvirt-id='14']
6ae9ed
+[vcpu libvirt-id='15']
6ae9ed
+[vcpu libvirt-id='16']
6ae9ed
+    type='host-spapr-cpu-core'
6ae9ed
+    topology: core='16' vcpus='8'
6ae9ed
+[vcpu libvirt-id='17']
6ae9ed
+[vcpu libvirt-id='18']
6ae9ed
+[vcpu libvirt-id='19']
6ae9ed
+[vcpu libvirt-id='20']
6ae9ed
+[vcpu libvirt-id='21']
6ae9ed
+[vcpu libvirt-id='22']
6ae9ed
+[vcpu libvirt-id='23']
6ae9ed
diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1-cpus.json b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1-cpus.json
6ae9ed
new file mode 100644
6ae9ed
index 0000000..7771cbc
6ae9ed
--- /dev/null
6ae9ed
+++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1-cpus.json
6ae9ed
@@ -0,0 +1,149 @@
6ae9ed
+{
6ae9ed
+  "return": [
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": true,
6ae9ed
+      "CPU": 0,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[0]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21925
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 1,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[1]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21926
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 2,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[2]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21927
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 3,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[3]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21928
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 4,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[4]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21930
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 5,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[5]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21931
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 6,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[6]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21932
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 7,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[7]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21933
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 8,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu0/thread[0]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22131
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 9,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu0/thread[1]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22132
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 10,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu0/thread[2]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22133
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 11,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu0/thread[3]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22134
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 12,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu0/thread[4]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22135
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 13,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu0/thread[5]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22136
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 14,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu0/thread[6]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22137
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 15,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu0/thread[7]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22138
6ae9ed
+    }
6ae9ed
+  ],
6ae9ed
+  "id": "libvirt-14"
6ae9ed
+}
6ae9ed
diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1-hotplug.json b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1-hotplug.json
6ae9ed
new file mode 100644
6ae9ed
index 0000000..e7594c3
6ae9ed
--- /dev/null
6ae9ed
+++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1-hotplug.json
6ae9ed
@@ -0,0 +1,28 @@
6ae9ed
+{
6ae9ed
+  "return": [
6ae9ed
+    {
6ae9ed
+      "props": {
6ae9ed
+        "core-id": 16
6ae9ed
+      },
6ae9ed
+      "vcpus-count": 8,
6ae9ed
+      "type": "host-spapr-cpu-core"
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "props": {
6ae9ed
+        "core-id": 8
6ae9ed
+      },
6ae9ed
+      "vcpus-count": 8,
6ae9ed
+      "qom-path": "/machine/peripheral/vcpu0",
6ae9ed
+      "type": "host-spapr-cpu-core"
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "props": {
6ae9ed
+        "core-id": 0
6ae9ed
+      },
6ae9ed
+      "vcpus-count": 8,
6ae9ed
+      "qom-path": "/machine/unattached/device[1]",
6ae9ed
+      "type": "host-spapr-cpu-core"
6ae9ed
+    }
6ae9ed
+  ],
6ae9ed
+  "id": "libvirt-15"
6ae9ed
+}
6ae9ed
diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1.data b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1.data
6ae9ed
new file mode 100644
6ae9ed
index 0000000..b0139b5
6ae9ed
--- /dev/null
6ae9ed
+++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1.data
6ae9ed
@@ -0,0 +1,51 @@
6ae9ed
+[vcpu libvirt-id='0']
6ae9ed
+    thread-id='21925'
6ae9ed
+    qemu-id='1'
6ae9ed
+    type='host-spapr-cpu-core'
6ae9ed
+    qom_path='/machine/unattached/device[1]'
6ae9ed
+    topology: core='0' vcpus='8'
6ae9ed
+[vcpu libvirt-id='1']
6ae9ed
+    thread-id='21926'
6ae9ed
+[vcpu libvirt-id='2']
6ae9ed
+    thread-id='21927'
6ae9ed
+[vcpu libvirt-id='3']
6ae9ed
+    thread-id='21928'
6ae9ed
+[vcpu libvirt-id='4']
6ae9ed
+    thread-id='21930'
6ae9ed
+[vcpu libvirt-id='5']
6ae9ed
+    thread-id='21931'
6ae9ed
+[vcpu libvirt-id='6']
6ae9ed
+    thread-id='21932'
6ae9ed
+[vcpu libvirt-id='7']
6ae9ed
+    thread-id='21933'
6ae9ed
+[vcpu libvirt-id='8']
6ae9ed
+    thread-id='22131'
6ae9ed
+    qemu-id='2'
6ae9ed
+    type='host-spapr-cpu-core'
6ae9ed
+    alias='vcpu0'
6ae9ed
+    qom_path='/machine/peripheral/vcpu0'
6ae9ed
+    topology: core='8' vcpus='8'
6ae9ed
+[vcpu libvirt-id='9']
6ae9ed
+    thread-id='22132'
6ae9ed
+[vcpu libvirt-id='10']
6ae9ed
+    thread-id='22133'
6ae9ed
+[vcpu libvirt-id='11']
6ae9ed
+    thread-id='22134'
6ae9ed
+[vcpu libvirt-id='12']
6ae9ed
+    thread-id='22135'
6ae9ed
+[vcpu libvirt-id='13']
6ae9ed
+    thread-id='22136'
6ae9ed
+[vcpu libvirt-id='14']
6ae9ed
+    thread-id='22137'
6ae9ed
+[vcpu libvirt-id='15']
6ae9ed
+    thread-id='22138'
6ae9ed
+[vcpu libvirt-id='16']
6ae9ed
+    type='host-spapr-cpu-core'
6ae9ed
+    topology: core='16' vcpus='8'
6ae9ed
+[vcpu libvirt-id='17']
6ae9ed
+[vcpu libvirt-id='18']
6ae9ed
+[vcpu libvirt-id='19']
6ae9ed
+[vcpu libvirt-id='20']
6ae9ed
+[vcpu libvirt-id='21']
6ae9ed
+[vcpu libvirt-id='22']
6ae9ed
+[vcpu libvirt-id='23']
6ae9ed
diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2-cpus.json b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2-cpus.json
6ae9ed
new file mode 100644
6ae9ed
index 0000000..b377b6a
6ae9ed
--- /dev/null
6ae9ed
+++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2-cpus.json
6ae9ed
@@ -0,0 +1,221 @@
6ae9ed
+{
6ae9ed
+  "return": [
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": true,
6ae9ed
+      "CPU": 0,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[0]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21925
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 1,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[1]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21926
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 2,
6ae9ed
+      "nip": -4611686018422360576,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[2]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21927
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 3,
6ae9ed
+      "nip": -4611686018422360596,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[3]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21928
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 4,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[4]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21930
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 5,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[5]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21931
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 6,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[6]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21932
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 7,
6ae9ed
+      "nip": -4611686018422360596,
6ae9ed
+      "qom_path": "/machine/unattached/device[1]/thread[7]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 21933
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 8,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu0/thread[0]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22131
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 9,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu0/thread[1]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22132
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 10,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu0/thread[2]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22133
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 11,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu0/thread[3]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22134
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 12,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu0/thread[4]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22135
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 13,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu0/thread[5]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22136
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 14,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu0/thread[6]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22137
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 15,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu0/thread[7]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22138
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 16,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu1/thread[0]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22223
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 17,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu1/thread[1]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22224
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 18,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu1/thread[2]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22225
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 19,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu1/thread[3]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22226
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 20,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu1/thread[4]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22227
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 21,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu1/thread[5]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22228
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 22,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu1/thread[6]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22229
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "arch": "ppc",
6ae9ed
+      "current": false,
6ae9ed
+      "CPU": 23,
6ae9ed
+      "nip": -4611686018426772172,
6ae9ed
+      "qom_path": "/machine/peripheral/vcpu1/thread[7]",
6ae9ed
+      "halted": false,
6ae9ed
+      "thread_id": 22230
6ae9ed
+    }
6ae9ed
+  ],
6ae9ed
+  "id": "libvirt-17"
6ae9ed
+}
6ae9ed
diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2-hotplug.json b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2-hotplug.json
6ae9ed
new file mode 100644
6ae9ed
index 0000000..7027531
6ae9ed
--- /dev/null
6ae9ed
+++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2-hotplug.json
6ae9ed
@@ -0,0 +1,29 @@
6ae9ed
+{
6ae9ed
+  "return": [
6ae9ed
+    {
6ae9ed
+      "props": {
6ae9ed
+        "core-id": 16
6ae9ed
+      },
6ae9ed
+      "vcpus-count": 8,
6ae9ed
+      "qom-path": "/machine/peripheral/vcpu1",
6ae9ed
+      "type": "host-spapr-cpu-core"
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "props": {
6ae9ed
+        "core-id": 8
6ae9ed
+      },
6ae9ed
+      "vcpus-count": 8,
6ae9ed
+      "qom-path": "/machine/peripheral/vcpu0",
6ae9ed
+      "type": "host-spapr-cpu-core"
6ae9ed
+    },
6ae9ed
+    {
6ae9ed
+      "props": {
6ae9ed
+        "core-id": 0
6ae9ed
+      },
6ae9ed
+      "vcpus-count": 8,
6ae9ed
+      "qom-path": "/machine/unattached/device[1]",
6ae9ed
+      "type": "host-spapr-cpu-core"
6ae9ed
+    }
6ae9ed
+  ],
6ae9ed
+  "id": "libvirt-18"
6ae9ed
+}
6ae9ed
diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2.data b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2.data
6ae9ed
new file mode 100644
6ae9ed
index 0000000..ea4b099
6ae9ed
--- /dev/null
6ae9ed
+++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2.data
6ae9ed
@@ -0,0 +1,62 @@
6ae9ed
+[vcpu libvirt-id='0']
6ae9ed
+    thread-id='21925'
6ae9ed
+    qemu-id='1'
6ae9ed
+    type='host-spapr-cpu-core'
6ae9ed
+    qom_path='/machine/unattached/device[1]'
6ae9ed
+    topology: core='0' vcpus='8'
6ae9ed
+[vcpu libvirt-id='1']
6ae9ed
+    thread-id='21926'
6ae9ed
+[vcpu libvirt-id='2']
6ae9ed
+    thread-id='21927'
6ae9ed
+[vcpu libvirt-id='3']
6ae9ed
+    thread-id='21928'
6ae9ed
+[vcpu libvirt-id='4']
6ae9ed
+    thread-id='21930'
6ae9ed
+[vcpu libvirt-id='5']
6ae9ed
+    thread-id='21931'
6ae9ed
+[vcpu libvirt-id='6']
6ae9ed
+    thread-id='21932'
6ae9ed
+[vcpu libvirt-id='7']
6ae9ed
+    thread-id='21933'
6ae9ed
+[vcpu libvirt-id='8']
6ae9ed
+    thread-id='22131'
6ae9ed
+    qemu-id='2'
6ae9ed
+    type='host-spapr-cpu-core'
6ae9ed
+    alias='vcpu0'
6ae9ed
+    qom_path='/machine/peripheral/vcpu0'
6ae9ed
+    topology: core='8' vcpus='8'
6ae9ed
+[vcpu libvirt-id='9']
6ae9ed
+    thread-id='22132'
6ae9ed
+[vcpu libvirt-id='10']
6ae9ed
+    thread-id='22133'
6ae9ed
+[vcpu libvirt-id='11']
6ae9ed
+    thread-id='22134'
6ae9ed
+[vcpu libvirt-id='12']
6ae9ed
+    thread-id='22135'
6ae9ed
+[vcpu libvirt-id='13']
6ae9ed
+    thread-id='22136'
6ae9ed
+[vcpu libvirt-id='14']
6ae9ed
+    thread-id='22137'
6ae9ed
+[vcpu libvirt-id='15']
6ae9ed
+    thread-id='22138'
6ae9ed
+[vcpu libvirt-id='16']
6ae9ed
+    thread-id='22223'
6ae9ed
+    qemu-id='3'
6ae9ed
+    type='host-spapr-cpu-core'
6ae9ed
+    alias='vcpu1'
6ae9ed
+    qom_path='/machine/peripheral/vcpu1'
6ae9ed
+    topology: core='16' vcpus='8'
6ae9ed
+[vcpu libvirt-id='17']
6ae9ed
+    thread-id='22224'
6ae9ed
+[vcpu libvirt-id='18']
6ae9ed
+    thread-id='22225'
6ae9ed
+[vcpu libvirt-id='19']
6ae9ed
+    thread-id='22226'
6ae9ed
+[vcpu libvirt-id='20']
6ae9ed
+    thread-id='22227'
6ae9ed
+[vcpu libvirt-id='21']
6ae9ed
+    thread-id='22228'
6ae9ed
+[vcpu libvirt-id='22']
6ae9ed
+    thread-id='22229'
6ae9ed
+[vcpu libvirt-id='23']
6ae9ed
+    thread-id='22230'
6ae9ed
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
6ae9ed
index 3d96397..3cb7083 100644
6ae9ed
--- a/tests/qemumonitorjsontest.c
6ae9ed
+++ b/tests/qemumonitorjsontest.c
6ae9ed
@@ -2587,6 +2587,10 @@ mymain(void)
6ae9ed
     DO_TEST_CPU_INFO("x86-basic-pluggable", 8);
6ae9ed
     DO_TEST_CPU_INFO("x86-full", 11);
6ae9ed
 
6ae9ed
+    DO_TEST_CPU_INFO("ppc64-basic", 24);
6ae9ed
+    DO_TEST_CPU_INFO("ppc64-hotplug-1", 24);
6ae9ed
+    DO_TEST_CPU_INFO("ppc64-hotplug-2", 24);
6ae9ed
+
6ae9ed
     qemuTestDriverFree(&driver);
6ae9ed
 
6ae9ed
     return (ret == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
6ae9ed
-- 
6ae9ed
2.10.0
6ae9ed