On 23.03.2018 17:07, John Ferlan wrote: > > > On 03/05/2018 06:44 AM, Viktor Mihajlovski wrote: >> Extended the json monitor test program with support for query-cpus-fast >> and added a sample file set for x86 data obtained using the it. >> >> Signed-off-by: Viktor Mihajlovski <mihajlov@xxxxxxxxxxxxxxxxxx> >> --- >> ...qemumonitorjson-cpuinfo-x86-full-fast-cpus.json | 71 +++++++++++++ >> ...umonitorjson-cpuinfo-x86-full-fast-hotplug.json | 115 ++++++++++++++++++++ >> .../qemumonitorjson-cpuinfo-x86-full-fast.data | 109 +++++++++++++++++++ >> tests/qemumonitorjsontest.c | 118 ++++++++++++++++----- >> tests/qemumonitortestutils.c | 6 ++ >> tests/qemumonitortestutils.h | 1 + >> 6 files changed, 394 insertions(+), 26 deletions(-) >> create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast-cpus.json >> create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast-hotplug.json >> create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast.data >> >> diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast-cpus.json b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast-cpus.json >> new file mode 100644 >> index 0000000..88fd2b8 >> --- /dev/null >> +++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast-cpus.json >> @@ -0,0 +1,71 @@ >> +{ >> + "return": [ >> + { >> + "arch": "x86", >> + "cpu-index": 0, >> + "qom-path": "/machine/unattached/device[0]", >> + "thread-id": 895040 >> + }, > > Each of these seems to be missing the "props" structure even though the > hotplug does have it. As noted in my 2/6 review - that could be useful > data to parse (and return and save for printing in the stats output). In > fact I recall those values being the most painful when dealing with this > the last time I was reviewing in here... > Hm ... you are right, QEMUs implementing query-cpus-fast will have the props structure filled, so we should account for it. >> + { >> + "arch": "x86", >> + "cpu-index": 1, >> + "qom-path": "/machine/peripheral/vcpu1", >> + "thread-id": 895056 >> + }, > > [...] > >> diff --git a/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast-hotplug.json b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast-hotplug.json >> new file mode 100644 >> index 0000000..aff5aa3 >> --- /dev/null >> +++ b/tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast-hotplug.json >> @@ -0,0 +1,115 @@ >> +{ >> + "return": [ >> + { >> + "props": { >> + "core-id": 0, >> + "thread-id": 0, >> + "socket-id": 10 >> + }, >> + "vcpus-count": 1, >> + "qom-path": "/machine/peripheral/vcpu10", >> + "type": "Broadwell-x86_64-cpu" >> + }, > > See you do show the props here... > >> + { >> + "props": { >> + "core-id": 0, >> + "thread-id": 0, >> + "socket-id": 9 >> + }, >> + "vcpus-count": 1, >> + "qom-path": "/machine/peripheral/vcpu9", >> + "type": "Broadwell-x86_64-cpu" >> + }, > > [...] > > >> diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c >> index 5e30fb0..b20d59a 100644 >> --- a/tests/qemumonitortestutils.c >> +++ b/tests/qemumonitortestutils.c >> @@ -1439,3 +1439,9 @@ qemuMonitorTestGetAgent(qemuMonitorTestPtr test) >> { >> return test->agent; >> } > > Format here is 2 blank lines between methods OK > > John > >> + >> +virDomainObjPtr >> +qemuMonitorTestGetDomainObj(qemuMonitorTestPtr test) >> +{ >> + return test->vm; >> +} >> diff --git a/tests/qemumonitortestutils.h b/tests/qemumonitortestutils.h >> index 8b19b37..3604a1b 100644 >> --- a/tests/qemumonitortestutils.h >> +++ b/tests/qemumonitortestutils.h >> @@ -96,5 +96,6 @@ void qemuMonitorTestFree(qemuMonitorTestPtr test); >> >> qemuMonitorPtr qemuMonitorTestGetMonitor(qemuMonitorTestPtr test); >> qemuAgentPtr qemuMonitorTestGetAgent(qemuMonitorTestPtr test); >> +virDomainObjPtr qemuMonitorTestGetDomainObj(qemuMonitorTestPtr test); >> >> #endif /* __VIR_QEMU_MONITOR_TEST_UTILS_H__ */ >> > -- Regards, Viktor Mihajlovski -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list