render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
Blob Blame History Raw
From 152273b20712529ee9506c5e1307b4703d1b9297 Mon Sep 17 00:00:00 2001
Message-Id: <152273b20712529ee9506c5e1307b4703d1b9297@dist-git>
From: Peter Krempa <pkrempa@redhat.com>
Date: Wed, 24 Aug 2016 16:11:27 -0400
Subject: [PATCH] tests: cpu-hotplug: Add data for ppc64 platform including
 hotplug

https://bugzilla.redhat.com/show_bug.cgi?id=1097930
https://bugzilla.redhat.com/show_bug.cgi?id=1224341

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.

(cherry picked from commit d1145aad0be156ca04d9745bc1130e148d74eaee)
---
 .../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 ++++++
 tests/qemumonitorjsontest.c                        |   4 +
 10 files changed, 688 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

diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic-cpus.json b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic-cpus.json
new file mode 100644
index 0000000..27a3d8b
--- /dev/null
+++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic-cpus.json
@@ -0,0 +1,77 @@
+{
+  "return": [
+    {
+      "arch": "ppc",
+      "current": true,
+      "CPU": 0,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/unattached/device[1]/thread[0]",
+      "halted": false,
+      "thread_id": 21925
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 1,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/unattached/device[1]/thread[1]",
+      "halted": false,
+      "thread_id": 21926
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 2,
+      "nip": -4611686018422360608,
+      "qom_path": "/machine/unattached/device[1]/thread[2]",
+      "halted": false,
+      "thread_id": 21927
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 3,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/unattached/device[1]/thread[3]",
+      "halted": false,
+      "thread_id": 21928
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 4,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/unattached/device[1]/thread[4]",
+      "halted": false,
+      "thread_id": 21930
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 5,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/unattached/device[1]/thread[5]",
+      "halted": false,
+      "thread_id": 21931
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 6,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/unattached/device[1]/thread[6]",
+      "halted": false,
+      "thread_id": 21932
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 7,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/unattached/device[1]/thread[7]",
+      "halted": false,
+      "thread_id": 21933
+    }
+  ],
+  "id": "libvirt-12"
+}
diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic-hotplug.json b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic-hotplug.json
new file mode 100644
index 0000000..513317b
--- /dev/null
+++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic-hotplug.json
@@ -0,0 +1,27 @@
+{
+  "return": [
+    {
+      "props": {
+        "core-id": 16
+      },
+      "vcpus-count": 8,
+      "type": "host-spapr-cpu-core"
+    },
+    {
+      "props": {
+        "core-id": 8
+      },
+      "vcpus-count": 8,
+      "type": "host-spapr-cpu-core"
+    },
+    {
+      "props": {
+        "core-id": 0
+      },
+      "vcpus-count": 8,
+      "qom-path": "/machine/unattached/device[1]",
+      "type": "host-spapr-cpu-core"
+    }
+  ],
+  "id": "libvirt-11"
+}
diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic.data b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic.data
new file mode 100644
index 0000000..9fc8148
--- /dev/null
+++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic.data
@@ -0,0 +1,40 @@
+[vcpu libvirt-id='0']
+    thread-id='21925'
+    qemu-id='1'
+    type='host-spapr-cpu-core'
+    qom_path='/machine/unattached/device[1]'
+    topology: core='0' vcpus='8'
+[vcpu libvirt-id='1']
+    thread-id='21926'
+[vcpu libvirt-id='2']
+    thread-id='21927'
+[vcpu libvirt-id='3']
+    thread-id='21928'
+[vcpu libvirt-id='4']
+    thread-id='21930'
+[vcpu libvirt-id='5']
+    thread-id='21931'
+[vcpu libvirt-id='6']
+    thread-id='21932'
+[vcpu libvirt-id='7']
+    thread-id='21933'
+[vcpu libvirt-id='8']
+    type='host-spapr-cpu-core'
+    topology: core='8' vcpus='8'
+[vcpu libvirt-id='9']
+[vcpu libvirt-id='10']
+[vcpu libvirt-id='11']
+[vcpu libvirt-id='12']
+[vcpu libvirt-id='13']
+[vcpu libvirt-id='14']
+[vcpu libvirt-id='15']
+[vcpu libvirt-id='16']
+    type='host-spapr-cpu-core'
+    topology: core='16' vcpus='8'
+[vcpu libvirt-id='17']
+[vcpu libvirt-id='18']
+[vcpu libvirt-id='19']
+[vcpu libvirt-id='20']
+[vcpu libvirt-id='21']
+[vcpu libvirt-id='22']
+[vcpu libvirt-id='23']
diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1-cpus.json b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1-cpus.json
new file mode 100644
index 0000000..7771cbc
--- /dev/null
+++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1-cpus.json
@@ -0,0 +1,149 @@
+{
+  "return": [
+    {
+      "arch": "ppc",
+      "current": true,
+      "CPU": 0,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/unattached/device[1]/thread[0]",
+      "halted": false,
+      "thread_id": 21925
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 1,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/unattached/device[1]/thread[1]",
+      "halted": false,
+      "thread_id": 21926
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 2,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/unattached/device[1]/thread[2]",
+      "halted": false,
+      "thread_id": 21927
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 3,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/unattached/device[1]/thread[3]",
+      "halted": false,
+      "thread_id": 21928
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 4,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/unattached/device[1]/thread[4]",
+      "halted": false,
+      "thread_id": 21930
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 5,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/unattached/device[1]/thread[5]",
+      "halted": false,
+      "thread_id": 21931
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 6,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/unattached/device[1]/thread[6]",
+      "halted": false,
+      "thread_id": 21932
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 7,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/unattached/device[1]/thread[7]",
+      "halted": false,
+      "thread_id": 21933
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 8,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu0/thread[0]",
+      "halted": false,
+      "thread_id": 22131
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 9,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu0/thread[1]",
+      "halted": false,
+      "thread_id": 22132
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 10,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu0/thread[2]",
+      "halted": false,
+      "thread_id": 22133
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 11,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu0/thread[3]",
+      "halted": false,
+      "thread_id": 22134
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 12,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu0/thread[4]",
+      "halted": false,
+      "thread_id": 22135
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 13,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu0/thread[5]",
+      "halted": false,
+      "thread_id": 22136
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 14,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu0/thread[6]",
+      "halted": false,
+      "thread_id": 22137
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 15,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu0/thread[7]",
+      "halted": false,
+      "thread_id": 22138
+    }
+  ],
+  "id": "libvirt-14"
+}
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"
+    },
+    {
+      "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/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1.data b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1.data
new file mode 100644
index 0000000..b0139b5
--- /dev/null
+++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1.data
@@ -0,0 +1,51 @@
+[vcpu libvirt-id='0']
+    thread-id='21925'
+    qemu-id='1'
+    type='host-spapr-cpu-core'
+    qom_path='/machine/unattached/device[1]'
+    topology: core='0' vcpus='8'
+[vcpu libvirt-id='1']
+    thread-id='21926'
+[vcpu libvirt-id='2']
+    thread-id='21927'
+[vcpu libvirt-id='3']
+    thread-id='21928'
+[vcpu libvirt-id='4']
+    thread-id='21930'
+[vcpu libvirt-id='5']
+    thread-id='21931'
+[vcpu libvirt-id='6']
+    thread-id='21932'
+[vcpu libvirt-id='7']
+    thread-id='21933'
+[vcpu libvirt-id='8']
+    thread-id='22131'
+    qemu-id='2'
+    type='host-spapr-cpu-core'
+    alias='vcpu0'
+    qom_path='/machine/peripheral/vcpu0'
+    topology: core='8' vcpus='8'
+[vcpu libvirt-id='9']
+    thread-id='22132'
+[vcpu libvirt-id='10']
+    thread-id='22133'
+[vcpu libvirt-id='11']
+    thread-id='22134'
+[vcpu libvirt-id='12']
+    thread-id='22135'
+[vcpu libvirt-id='13']
+    thread-id='22136'
+[vcpu libvirt-id='14']
+    thread-id='22137'
+[vcpu libvirt-id='15']
+    thread-id='22138'
+[vcpu libvirt-id='16']
+    type='host-spapr-cpu-core'
+    topology: core='16' vcpus='8'
+[vcpu libvirt-id='17']
+[vcpu libvirt-id='18']
+[vcpu libvirt-id='19']
+[vcpu libvirt-id='20']
+[vcpu libvirt-id='21']
+[vcpu libvirt-id='22']
+[vcpu libvirt-id='23']
diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2-cpus.json b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2-cpus.json
new file mode 100644
index 0000000..b377b6a
--- /dev/null
+++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2-cpus.json
@@ -0,0 +1,221 @@
+{
+  "return": [
+    {
+      "arch": "ppc",
+      "current": true,
+      "CPU": 0,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/unattached/device[1]/thread[0]",
+      "halted": false,
+      "thread_id": 21925
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 1,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/unattached/device[1]/thread[1]",
+      "halted": false,
+      "thread_id": 21926
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 2,
+      "nip": -4611686018422360576,
+      "qom_path": "/machine/unattached/device[1]/thread[2]",
+      "halted": false,
+      "thread_id": 21927
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 3,
+      "nip": -4611686018422360596,
+      "qom_path": "/machine/unattached/device[1]/thread[3]",
+      "halted": false,
+      "thread_id": 21928
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 4,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/unattached/device[1]/thread[4]",
+      "halted": false,
+      "thread_id": 21930
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 5,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/unattached/device[1]/thread[5]",
+      "halted": false,
+      "thread_id": 21931
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 6,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/unattached/device[1]/thread[6]",
+      "halted": false,
+      "thread_id": 21932
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 7,
+      "nip": -4611686018422360596,
+      "qom_path": "/machine/unattached/device[1]/thread[7]",
+      "halted": false,
+      "thread_id": 21933
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 8,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu0/thread[0]",
+      "halted": false,
+      "thread_id": 22131
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 9,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu0/thread[1]",
+      "halted": false,
+      "thread_id": 22132
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 10,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu0/thread[2]",
+      "halted": false,
+      "thread_id": 22133
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 11,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu0/thread[3]",
+      "halted": false,
+      "thread_id": 22134
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 12,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu0/thread[4]",
+      "halted": false,
+      "thread_id": 22135
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 13,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu0/thread[5]",
+      "halted": false,
+      "thread_id": 22136
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 14,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu0/thread[6]",
+      "halted": false,
+      "thread_id": 22137
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 15,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu0/thread[7]",
+      "halted": false,
+      "thread_id": 22138
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 16,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu1/thread[0]",
+      "halted": false,
+      "thread_id": 22223
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 17,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu1/thread[1]",
+      "halted": false,
+      "thread_id": 22224
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 18,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu1/thread[2]",
+      "halted": false,
+      "thread_id": 22225
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 19,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu1/thread[3]",
+      "halted": false,
+      "thread_id": 22226
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 20,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu1/thread[4]",
+      "halted": false,
+      "thread_id": 22227
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 21,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu1/thread[5]",
+      "halted": false,
+      "thread_id": 22228
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 22,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu1/thread[6]",
+      "halted": false,
+      "thread_id": 22229
+    },
+    {
+      "arch": "ppc",
+      "current": false,
+      "CPU": 23,
+      "nip": -4611686018426772172,
+      "qom_path": "/machine/peripheral/vcpu1/thread[7]",
+      "halted": false,
+      "thread_id": 22230
+    }
+  ],
+  "id": "libvirt-17"
+}
diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2-hotplug.json b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2-hotplug.json
new file mode 100644
index 0000000..7027531
--- /dev/null
+++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2-hotplug.json
@@ -0,0 +1,29 @@
+{
+  "return": [
+    {
+      "props": {
+        "core-id": 16
+      },
+      "vcpus-count": 8,
+      "qom-path": "/machine/peripheral/vcpu1",
+      "type": "host-spapr-cpu-core"
+    },
+    {
+      "props": {
+        "core-id": 8
+      },
+      "vcpus-count": 8,
+      "qom-path": "/machine/peripheral/vcpu0",
+      "type": "host-spapr-cpu-core"
+    },
+    {
+      "props": {
+        "core-id": 0
+      },
+      "vcpus-count": 8,
+      "qom-path": "/machine/unattached/device[1]",
+      "type": "host-spapr-cpu-core"
+    }
+  ],
+  "id": "libvirt-18"
+}
diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2.data b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2.data
new file mode 100644
index 0000000..ea4b099
--- /dev/null
+++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2.data
@@ -0,0 +1,62 @@
+[vcpu libvirt-id='0']
+    thread-id='21925'
+    qemu-id='1'
+    type='host-spapr-cpu-core'
+    qom_path='/machine/unattached/device[1]'
+    topology: core='0' vcpus='8'
+[vcpu libvirt-id='1']
+    thread-id='21926'
+[vcpu libvirt-id='2']
+    thread-id='21927'
+[vcpu libvirt-id='3']
+    thread-id='21928'
+[vcpu libvirt-id='4']
+    thread-id='21930'
+[vcpu libvirt-id='5']
+    thread-id='21931'
+[vcpu libvirt-id='6']
+    thread-id='21932'
+[vcpu libvirt-id='7']
+    thread-id='21933'
+[vcpu libvirt-id='8']
+    thread-id='22131'
+    qemu-id='2'
+    type='host-spapr-cpu-core'
+    alias='vcpu0'
+    qom_path='/machine/peripheral/vcpu0'
+    topology: core='8' vcpus='8'
+[vcpu libvirt-id='9']
+    thread-id='22132'
+[vcpu libvirt-id='10']
+    thread-id='22133'
+[vcpu libvirt-id='11']
+    thread-id='22134'
+[vcpu libvirt-id='12']
+    thread-id='22135'
+[vcpu libvirt-id='13']
+    thread-id='22136'
+[vcpu libvirt-id='14']
+    thread-id='22137'
+[vcpu libvirt-id='15']
+    thread-id='22138'
+[vcpu libvirt-id='16']
+    thread-id='22223'
+    qemu-id='3'
+    type='host-spapr-cpu-core'
+    alias='vcpu1'
+    qom_path='/machine/peripheral/vcpu1'
+    topology: core='16' vcpus='8'
+[vcpu libvirt-id='17']
+    thread-id='22224'
+[vcpu libvirt-id='18']
+    thread-id='22225'
+[vcpu libvirt-id='19']
+    thread-id='22226'
+[vcpu libvirt-id='20']
+    thread-id='22227'
+[vcpu libvirt-id='21']
+    thread-id='22228'
+[vcpu libvirt-id='22']
+    thread-id='22229'
+[vcpu libvirt-id='23']
+    thread-id='22230'
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 3d96397..3cb7083 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -2587,6 +2587,10 @@ mymain(void)
     DO_TEST_CPU_INFO("x86-basic-pluggable", 8);
     DO_TEST_CPU_INFO("x86-full", 11);
 
+    DO_TEST_CPU_INFO("ppc64-basic", 24);
+    DO_TEST_CPU_INFO("ppc64-hotplug-1", 24);
+    DO_TEST_CPU_INFO("ppc64-hotplug-2", 24);
+
     qemuTestDriverFree(&driver);
 
     return (ret == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-- 
2.10.0