|
|
6ae9ed |
From ee7dbe155f527b43799816c324de447184f7de7e Mon Sep 17 00:00:00 2001
|
|
|
6ae9ed |
Message-Id: <ee7dbe155f527b43799816c324de447184f7de7e@dist-git>
|
|
|
6ae9ed |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
6ae9ed |
Date: Wed, 24 Aug 2016 16:11:26 -0400
|
|
|
6ae9ed |
Subject: [PATCH] tests: cpu-hotplug: Add data for x86 hotplug with 11+ vcpus
|
|
|
6ae9ed |
|
|
|
6ae9ed |
https://bugzilla.redhat.com/show_bug.cgi?id=1097930
|
|
|
6ae9ed |
https://bugzilla.redhat.com/show_bug.cgi?id=1224341
|
|
|
6ae9ed |
|
|
|
6ae9ed |
During review it was reported that adding at least 11 vcpus creates a
|
|
|
6ae9ed |
collision of prefixes in the monitor matching algorithm. Add a test case
|
|
|
6ae9ed |
to verify that the problem won't happen.
|
|
|
6ae9ed |
|
|
|
6ae9ed |
(cherry picked from commit 22e3bb332e1e035b5905686936427ef93a7b834f)
|
|
|
6ae9ed |
---
|
|
|
6ae9ed |
.../qemumonitorjson-cpuinfo-x86-full-cpus.json | 104 +++++++++++++++++++
|
|
|
6ae9ed |
.../qemumonitorjson-cpuinfo-x86-full-hotplug.json | 115 +++++++++++++++++++++
|
|
|
6ae9ed |
.../qemumonitorjson-cpuinfo-x86-full.data | 76 ++++++++++++++
|
|
|
6ae9ed |
tests/qemumonitorjsontest.c | 1 +
|
|
|
6ae9ed |
4 files changed, 296 insertions(+)
|
|
|
6ae9ed |
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-cpus.json
|
|
|
6ae9ed |
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-hotplug.json
|
|
|
6ae9ed |
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full.data
|
|
|
6ae9ed |
|
|
|
6ae9ed |
diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-cpus.json b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-cpus.json
|
|
|
6ae9ed |
new file mode 100644
|
|
|
6ae9ed |
index 0000000..16f5cc4
|
|
|
6ae9ed |
--- /dev/null
|
|
|
6ae9ed |
+++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-cpus.json
|
|
|
6ae9ed |
@@ -0,0 +1,104 @@
|
|
|
6ae9ed |
+{
|
|
|
6ae9ed |
+ "return": [
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "arch": "x86",
|
|
|
6ae9ed |
+ "current": true,
|
|
|
6ae9ed |
+ "CPU": 0,
|
|
|
6ae9ed |
+ "qom_path": "/machine/unattached/device[0]",
|
|
|
6ae9ed |
+ "pc": 1042686,
|
|
|
6ae9ed |
+ "halted": false,
|
|
|
6ae9ed |
+ "thread_id": 895040
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "arch": "x86",
|
|
|
6ae9ed |
+ "current": false,
|
|
|
6ae9ed |
+ "CPU": 1,
|
|
|
6ae9ed |
+ "qom_path": "/machine/peripheral/vcpu1",
|
|
|
6ae9ed |
+ "pc": 4294967280,
|
|
|
6ae9ed |
+ "halted": false,
|
|
|
6ae9ed |
+ "thread_id": 895056
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "arch": "x86",
|
|
|
6ae9ed |
+ "current": false,
|
|
|
6ae9ed |
+ "CPU": 2,
|
|
|
6ae9ed |
+ "qom_path": "/machine/peripheral/vcpu2",
|
|
|
6ae9ed |
+ "pc": 4294967280,
|
|
|
6ae9ed |
+ "halted": false,
|
|
|
6ae9ed |
+ "thread_id": 895057
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "arch": "x86",
|
|
|
6ae9ed |
+ "current": false,
|
|
|
6ae9ed |
+ "CPU": 3,
|
|
|
6ae9ed |
+ "qom_path": "/machine/peripheral/vcpu3",
|
|
|
6ae9ed |
+ "pc": 4294967280,
|
|
|
6ae9ed |
+ "halted": false,
|
|
|
6ae9ed |
+ "thread_id": 895058
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "arch": "x86",
|
|
|
6ae9ed |
+ "current": false,
|
|
|
6ae9ed |
+ "CPU": 4,
|
|
|
6ae9ed |
+ "qom_path": "/machine/peripheral/vcpu4",
|
|
|
6ae9ed |
+ "pc": 4294967280,
|
|
|
6ae9ed |
+ "halted": false,
|
|
|
6ae9ed |
+ "thread_id": 895059
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "arch": "x86",
|
|
|
6ae9ed |
+ "current": false,
|
|
|
6ae9ed |
+ "CPU": 5,
|
|
|
6ae9ed |
+ "qom_path": "/machine/peripheral/vcpu5",
|
|
|
6ae9ed |
+ "pc": 4294967280,
|
|
|
6ae9ed |
+ "halted": false,
|
|
|
6ae9ed |
+ "thread_id": 895060
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "arch": "x86",
|
|
|
6ae9ed |
+ "current": false,
|
|
|
6ae9ed |
+ "CPU": 6,
|
|
|
6ae9ed |
+ "qom_path": "/machine/peripheral/vcpu6",
|
|
|
6ae9ed |
+ "pc": 4294967280,
|
|
|
6ae9ed |
+ "halted": false,
|
|
|
6ae9ed |
+ "thread_id": 895061
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "arch": "x86",
|
|
|
6ae9ed |
+ "current": false,
|
|
|
6ae9ed |
+ "CPU": 7,
|
|
|
6ae9ed |
+ "qom_path": "/machine/peripheral/vcpu7",
|
|
|
6ae9ed |
+ "pc": 4294967280,
|
|
|
6ae9ed |
+ "halted": false,
|
|
|
6ae9ed |
+ "thread_id": 895062
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "arch": "x86",
|
|
|
6ae9ed |
+ "current": false,
|
|
|
6ae9ed |
+ "CPU": 8,
|
|
|
6ae9ed |
+ "qom_path": "/machine/peripheral/vcpu8",
|
|
|
6ae9ed |
+ "pc": 4294967280,
|
|
|
6ae9ed |
+ "halted": false,
|
|
|
6ae9ed |
+ "thread_id": 895063
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "arch": "x86",
|
|
|
6ae9ed |
+ "current": false,
|
|
|
6ae9ed |
+ "CPU": 9,
|
|
|
6ae9ed |
+ "qom_path": "/machine/peripheral/vcpu9",
|
|
|
6ae9ed |
+ "pc": 4294967280,
|
|
|
6ae9ed |
+ "halted": false,
|
|
|
6ae9ed |
+ "thread_id": 895064
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "arch": "x86",
|
|
|
6ae9ed |
+ "current": false,
|
|
|
6ae9ed |
+ "CPU": 10,
|
|
|
6ae9ed |
+ "qom_path": "/machine/peripheral/vcpu10",
|
|
|
6ae9ed |
+ "pc": 4294967280,
|
|
|
6ae9ed |
+ "halted": false,
|
|
|
6ae9ed |
+ "thread_id": 895065
|
|
|
6ae9ed |
+ }
|
|
|
6ae9ed |
+ ],
|
|
|
6ae9ed |
+ "id": "libvirt-52"
|
|
|
6ae9ed |
+}
|
|
|
6ae9ed |
diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-hotplug.json b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-hotplug.json
|
|
|
6ae9ed |
new file mode 100644
|
|
|
6ae9ed |
index 0000000..aff5aa3
|
|
|
6ae9ed |
--- /dev/null
|
|
|
6ae9ed |
+++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-hotplug.json
|
|
|
6ae9ed |
@@ -0,0 +1,115 @@
|
|
|
6ae9ed |
+{
|
|
|
6ae9ed |
+ "return": [
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "props": {
|
|
|
6ae9ed |
+ "core-id": 0,
|
|
|
6ae9ed |
+ "thread-id": 0,
|
|
|
6ae9ed |
+ "socket-id": 10
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ "vcpus-count": 1,
|
|
|
6ae9ed |
+ "qom-path": "/machine/peripheral/vcpu10",
|
|
|
6ae9ed |
+ "type": "Broadwell-x86_64-cpu"
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "props": {
|
|
|
6ae9ed |
+ "core-id": 0,
|
|
|
6ae9ed |
+ "thread-id": 0,
|
|
|
6ae9ed |
+ "socket-id": 9
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ "vcpus-count": 1,
|
|
|
6ae9ed |
+ "qom-path": "/machine/peripheral/vcpu9",
|
|
|
6ae9ed |
+ "type": "Broadwell-x86_64-cpu"
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "props": {
|
|
|
6ae9ed |
+ "core-id": 0,
|
|
|
6ae9ed |
+ "thread-id": 0,
|
|
|
6ae9ed |
+ "socket-id": 8
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ "vcpus-count": 1,
|
|
|
6ae9ed |
+ "qom-path": "/machine/peripheral/vcpu8",
|
|
|
6ae9ed |
+ "type": "Broadwell-x86_64-cpu"
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "props": {
|
|
|
6ae9ed |
+ "core-id": 0,
|
|
|
6ae9ed |
+ "thread-id": 0,
|
|
|
6ae9ed |
+ "socket-id": 7
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ "vcpus-count": 1,
|
|
|
6ae9ed |
+ "qom-path": "/machine/peripheral/vcpu7",
|
|
|
6ae9ed |
+ "type": "Broadwell-x86_64-cpu"
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "props": {
|
|
|
6ae9ed |
+ "core-id": 0,
|
|
|
6ae9ed |
+ "thread-id": 0,
|
|
|
6ae9ed |
+ "socket-id": 6
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ "vcpus-count": 1,
|
|
|
6ae9ed |
+ "qom-path": "/machine/peripheral/vcpu6",
|
|
|
6ae9ed |
+ "type": "Broadwell-x86_64-cpu"
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "props": {
|
|
|
6ae9ed |
+ "core-id": 0,
|
|
|
6ae9ed |
+ "thread-id": 0,
|
|
|
6ae9ed |
+ "socket-id": 5
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ "vcpus-count": 1,
|
|
|
6ae9ed |
+ "qom-path": "/machine/peripheral/vcpu5",
|
|
|
6ae9ed |
+ "type": "Broadwell-x86_64-cpu"
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "props": {
|
|
|
6ae9ed |
+ "core-id": 0,
|
|
|
6ae9ed |
+ "thread-id": 0,
|
|
|
6ae9ed |
+ "socket-id": 4
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ "vcpus-count": 1,
|
|
|
6ae9ed |
+ "qom-path": "/machine/peripheral/vcpu4",
|
|
|
6ae9ed |
+ "type": "Broadwell-x86_64-cpu"
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "props": {
|
|
|
6ae9ed |
+ "core-id": 0,
|
|
|
6ae9ed |
+ "thread-id": 0,
|
|
|
6ae9ed |
+ "socket-id": 3
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ "vcpus-count": 1,
|
|
|
6ae9ed |
+ "qom-path": "/machine/peripheral/vcpu3",
|
|
|
6ae9ed |
+ "type": "Broadwell-x86_64-cpu"
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "props": {
|
|
|
6ae9ed |
+ "core-id": 0,
|
|
|
6ae9ed |
+ "thread-id": 0,
|
|
|
6ae9ed |
+ "socket-id": 2
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ "vcpus-count": 1,
|
|
|
6ae9ed |
+ "qom-path": "/machine/peripheral/vcpu2",
|
|
|
6ae9ed |
+ "type": "Broadwell-x86_64-cpu"
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "props": {
|
|
|
6ae9ed |
+ "core-id": 0,
|
|
|
6ae9ed |
+ "thread-id": 0,
|
|
|
6ae9ed |
+ "socket-id": 1
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ "vcpus-count": 1,
|
|
|
6ae9ed |
+ "qom-path": "/machine/peripheral/vcpu1",
|
|
|
6ae9ed |
+ "type": "Broadwell-x86_64-cpu"
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ {
|
|
|
6ae9ed |
+ "props": {
|
|
|
6ae9ed |
+ "core-id": 0,
|
|
|
6ae9ed |
+ "thread-id": 0,
|
|
|
6ae9ed |
+ "socket-id": 0
|
|
|
6ae9ed |
+ },
|
|
|
6ae9ed |
+ "vcpus-count": 1,
|
|
|
6ae9ed |
+ "qom-path": "/machine/unattached/device[0]",
|
|
|
6ae9ed |
+ "type": "Broadwell-x86_64-cpu"
|
|
|
6ae9ed |
+ }
|
|
|
6ae9ed |
+ ],
|
|
|
6ae9ed |
+ "id": "libvirt-51"
|
|
|
6ae9ed |
+}
|
|
|
6ae9ed |
diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full.data b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full.data
|
|
|
6ae9ed |
new file mode 100644
|
|
|
6ae9ed |
index 0000000..a6c1069
|
|
|
6ae9ed |
--- /dev/null
|
|
|
6ae9ed |
+++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full.data
|
|
|
6ae9ed |
@@ -0,0 +1,76 @@
|
|
|
6ae9ed |
+[vcpu libvirt-id='0']
|
|
|
6ae9ed |
+ thread-id='895040'
|
|
|
6ae9ed |
+ qemu-id='1'
|
|
|
6ae9ed |
+ type='Broadwell-x86_64-cpu'
|
|
|
6ae9ed |
+ qom_path='/machine/unattached/device[0]'
|
|
|
6ae9ed |
+ topology: socket='0' core='0' thread='0' vcpus='1'
|
|
|
6ae9ed |
+[vcpu libvirt-id='1']
|
|
|
6ae9ed |
+ thread-id='895056'
|
|
|
6ae9ed |
+ qemu-id='2'
|
|
|
6ae9ed |
+ type='Broadwell-x86_64-cpu'
|
|
|
6ae9ed |
+ alias='vcpu1'
|
|
|
6ae9ed |
+ qom_path='/machine/peripheral/vcpu1'
|
|
|
6ae9ed |
+ topology: socket='1' core='0' thread='0' vcpus='1'
|
|
|
6ae9ed |
+[vcpu libvirt-id='2']
|
|
|
6ae9ed |
+ thread-id='895057'
|
|
|
6ae9ed |
+ qemu-id='3'
|
|
|
6ae9ed |
+ type='Broadwell-x86_64-cpu'
|
|
|
6ae9ed |
+ alias='vcpu2'
|
|
|
6ae9ed |
+ qom_path='/machine/peripheral/vcpu2'
|
|
|
6ae9ed |
+ topology: socket='2' core='0' thread='0' vcpus='1'
|
|
|
6ae9ed |
+[vcpu libvirt-id='3']
|
|
|
6ae9ed |
+ thread-id='895058'
|
|
|
6ae9ed |
+ qemu-id='4'
|
|
|
6ae9ed |
+ type='Broadwell-x86_64-cpu'
|
|
|
6ae9ed |
+ alias='vcpu3'
|
|
|
6ae9ed |
+ qom_path='/machine/peripheral/vcpu3'
|
|
|
6ae9ed |
+ topology: socket='3' core='0' thread='0' vcpus='1'
|
|
|
6ae9ed |
+[vcpu libvirt-id='4']
|
|
|
6ae9ed |
+ thread-id='895059'
|
|
|
6ae9ed |
+ qemu-id='5'
|
|
|
6ae9ed |
+ type='Broadwell-x86_64-cpu'
|
|
|
6ae9ed |
+ alias='vcpu4'
|
|
|
6ae9ed |
+ qom_path='/machine/peripheral/vcpu4'
|
|
|
6ae9ed |
+ topology: socket='4' core='0' thread='0' vcpus='1'
|
|
|
6ae9ed |
+[vcpu libvirt-id='5']
|
|
|
6ae9ed |
+ thread-id='895060'
|
|
|
6ae9ed |
+ qemu-id='6'
|
|
|
6ae9ed |
+ type='Broadwell-x86_64-cpu'
|
|
|
6ae9ed |
+ alias='vcpu5'
|
|
|
6ae9ed |
+ qom_path='/machine/peripheral/vcpu5'
|
|
|
6ae9ed |
+ topology: socket='5' core='0' thread='0' vcpus='1'
|
|
|
6ae9ed |
+[vcpu libvirt-id='6']
|
|
|
6ae9ed |
+ thread-id='895061'
|
|
|
6ae9ed |
+ qemu-id='7'
|
|
|
6ae9ed |
+ type='Broadwell-x86_64-cpu'
|
|
|
6ae9ed |
+ alias='vcpu6'
|
|
|
6ae9ed |
+ qom_path='/machine/peripheral/vcpu6'
|
|
|
6ae9ed |
+ topology: socket='6' core='0' thread='0' vcpus='1'
|
|
|
6ae9ed |
+[vcpu libvirt-id='7']
|
|
|
6ae9ed |
+ thread-id='895062'
|
|
|
6ae9ed |
+ qemu-id='8'
|
|
|
6ae9ed |
+ type='Broadwell-x86_64-cpu'
|
|
|
6ae9ed |
+ alias='vcpu7'
|
|
|
6ae9ed |
+ qom_path='/machine/peripheral/vcpu7'
|
|
|
6ae9ed |
+ topology: socket='7' core='0' thread='0' vcpus='1'
|
|
|
6ae9ed |
+[vcpu libvirt-id='8']
|
|
|
6ae9ed |
+ thread-id='895063'
|
|
|
6ae9ed |
+ qemu-id='9'
|
|
|
6ae9ed |
+ type='Broadwell-x86_64-cpu'
|
|
|
6ae9ed |
+ alias='vcpu8'
|
|
|
6ae9ed |
+ qom_path='/machine/peripheral/vcpu8'
|
|
|
6ae9ed |
+ topology: socket='8' core='0' thread='0' vcpus='1'
|
|
|
6ae9ed |
+[vcpu libvirt-id='9']
|
|
|
6ae9ed |
+ thread-id='895064'
|
|
|
6ae9ed |
+ qemu-id='10'
|
|
|
6ae9ed |
+ type='Broadwell-x86_64-cpu'
|
|
|
6ae9ed |
+ alias='vcpu9'
|
|
|
6ae9ed |
+ qom_path='/machine/peripheral/vcpu9'
|
|
|
6ae9ed |
+ topology: socket='9' core='0' thread='0' vcpus='1'
|
|
|
6ae9ed |
+[vcpu libvirt-id='10']
|
|
|
6ae9ed |
+ thread-id='895065'
|
|
|
6ae9ed |
+ qemu-id='11'
|
|
|
6ae9ed |
+ type='Broadwell-x86_64-cpu'
|
|
|
6ae9ed |
+ alias='vcpu10'
|
|
|
6ae9ed |
+ qom_path='/machine/peripheral/vcpu10'
|
|
|
6ae9ed |
+ topology: socket='10' core='0' thread='0' vcpus='1'
|
|
|
6ae9ed |
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
|
|
|
6ae9ed |
index 22b4ccc..3d96397 100644
|
|
|
6ae9ed |
--- a/tests/qemumonitorjsontest.c
|
|
|
6ae9ed |
+++ b/tests/qemumonitorjsontest.c
|
|
|
6ae9ed |
@@ -2585,6 +2585,7 @@ mymain(void)
|
|
|
6ae9ed |
DO_TEST_CPU_DATA("ecx");
|
|
|
6ae9ed |
|
|
|
6ae9ed |
DO_TEST_CPU_INFO("x86-basic-pluggable", 8);
|
|
|
6ae9ed |
+ DO_TEST_CPU_INFO("x86-full", 11);
|
|
|
6ae9ed |
|
|
|
6ae9ed |
qemuTestDriverFree(&driver);
|
|
|
6ae9ed |
|
|
|
6ae9ed |
--
|
|
|
6ae9ed |
2.10.0
|
|
|
6ae9ed |
|