[libvirt] [PATCH v2 00/11] tests: qemu: Add cpu hotplug testing

Peter Krempa pkrempa at redhat.com
Wed Jan 11 09:48:10 UTC 2017


This is a repost of
https://www.redhat.com/archives/libvir-list/2016-December/msg00420.html
after a recent rebase conflict.

Add some useful monitor infrastructure to simplify testing and add testing for
the cpu hotplug code. The code has some complex logic which was not covered
by current test suite.

Peter Krempa (11):
  qemu: monitor: More strict checking of 'query-cpus' if hotplug is
    supported
  util: json: Add helper to reformat JSON strings
  tests: qemu: Document qemuMonitorTestNewFromFile
  qemu: Prepare for reuse of qemuDomainSetVcpusLive
  qemu: Move cpu hotplug code into qemu_hotplug.c
  tests: qemumonitor: Propagate better error messages
  tests: qemu: monitor: Add helpers to test full command syntax
  tests: qemu: Add helper to load full monitor conversation from file
  tests: hotplug: Add test infrastructure for testing qemu CPU hotplug
    code
  tests: hotplug: Add test data for legacy cpu hotplug
  tests: hotplug: Test CPU hotplug with ppc64 data

 src/libvirt_private.syms                           |   1 +
 src/qemu/qemu_driver.c                             | 328 ------------
 src/qemu/qemu_hotplug.c                            | 339 ++++++++++++
 src/qemu/qemu_hotplug.h                            |   7 +
 src/qemu/qemu_monitor.c                            |   6 +-
 src/qemu/qemu_monitor_json.c                       |   6 +-
 src/qemu/qemu_monitor_json.h                       |   3 +-
 src/util/virjson.c                                 |  29 +
 src/util/virjson.h                                 |   2 +
 tests/qemuagenttest.c                              |   3 +-
 tests/qemuhotplugtest.c                            | 194 +++++++
 tests/qemuhotplugtestcpus/ppc64-bulk-domain.xml    |  20 +
 tests/qemuhotplugtestcpus/ppc64-bulk-monitor.json  | 593 +++++++++++++++++++++
 .../qemuhotplugtestcpus/ppc64-bulk-result-conf.xml |  64 +++
 .../qemuhotplugtestcpus/ppc64-bulk-result-live.xml |  72 +++
 .../qemuhotplugtestcpus/x86-modern-bulk-domain.xml |  21 +
 .../x86-modern-bulk-monitor.json                   | 471 ++++++++++++++++
 .../x86-modern-bulk-result-conf.xml                |  40 ++
 .../x86-modern-bulk-result-live.xml                |  48 ++
 tests/qemuhotplugtestcpus/x86-old-bulk-domain.xml  |  21 +
 .../qemuhotplugtestcpus/x86-old-bulk-monitor.json  | 193 +++++++
 .../x86-old-bulk-result-conf.xml                   |  30 ++
 .../x86-old-bulk-result-live.xml                   |  38 ++
 tests/qemumonitorjsontest.c                        |   2 +-
 tests/qemumonitortestutils.c                       | 322 ++++++++++-
 tests/qemumonitortestutils.h                       |  12 +-
 26 files changed, 2516 insertions(+), 349 deletions(-)
 create mode 100644 tests/qemuhotplugtestcpus/ppc64-bulk-domain.xml
 create mode 100644 tests/qemuhotplugtestcpus/ppc64-bulk-monitor.json
 create mode 100644 tests/qemuhotplugtestcpus/ppc64-bulk-result-conf.xml
 create mode 100644 tests/qemuhotplugtestcpus/ppc64-bulk-result-live.xml
 create mode 100644 tests/qemuhotplugtestcpus/x86-modern-bulk-domain.xml
 create mode 100644 tests/qemuhotplugtestcpus/x86-modern-bulk-monitor.json
 create mode 100644 tests/qemuhotplugtestcpus/x86-modern-bulk-result-conf.xml
 create mode 100644 tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml
 create mode 100644 tests/qemuhotplugtestcpus/x86-old-bulk-domain.xml
 create mode 100644 tests/qemuhotplugtestcpus/x86-old-bulk-monitor.json
 create mode 100644 tests/qemuhotplugtestcpus/x86-old-bulk-result-conf.xml
 create mode 100644 tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml

-- 
2.11.0




More information about the libvir-list mailing list