[PATCH v2 0/9] tests: Add testing of qemu migration cookie

Peter Krempa pkrempa at redhat.com
Wed Nov 4 13:25:36 UTC 2020


Add testing of migration cookie as we don't have any schema or examples
of it to prevent breakage and help with development.

v2:
 - no longer depends on the somewhat controversial GHashTable refactor
 - removed leftover commented out code in patch 2

Peter Krempa (9):
  qemuxml2xmltest: Remove 'WITH_QEMU' conditional
  qemuxml2xmltest: Split out status XML testing to
    qemustatusxml2xmltest.c
  qemu_migration_cookie: Make header standalone
  qemu_migration_cookie: Export qemuMigrationCookieXMLFormat for tests
  tests: Add mock library for virGetHostname and virGetHostUUID
  qemu_migration_cookie: Make cookie parsing robust against missing
    domain job
  tests: Add testing of qemu migration cookie
  qemumigrationcookiexmltest: Add synthetic test case
  virCPUDefFormatBufFull: Use virXMLFormatElement

 src/conf/cpu_conf.c                           |  16 +-
 src/qemu/qemu_migration_cookie.c              |   4 +-
 src/qemu/qemu_migration_cookie.h              |   9 +
 src/util/virutil.h                            |   2 +-
 src/util/viruuid.h                            |   2 +-
 tests/hostidmock.c                            |  36 ++
 tests/meson.build                             |   3 +
 .../basic-xml2xml-in.xml                      |   6 +
 .../basic-xml2xml-out.xml                     |   9 +
 .../full-xml2xml-in.xml                       | 221 ++++++++++++
 .../full-xml2xml-out.xml                      | 219 ++++++++++++
 .../modern-dom-out-dest.xml                   |  12 +
 .../modern-dom-out-source.xml                 |  12 +
 tests/qemumigrationcookiexmltest.c            | 337 ++++++++++++++++++
 tests/qemustatusxml2xmltest.c                 | 155 ++++++++
 tests/qemuxml2xmltest.c                       | 136 ++-----
 16 files changed, 1044 insertions(+), 135 deletions(-)
 create mode 100644 tests/hostidmock.c
 create mode 100644 tests/qemumigrationcookiexmldata/basic-xml2xml-in.xml
 create mode 100644 tests/qemumigrationcookiexmldata/basic-xml2xml-out.xml
 create mode 100644 tests/qemumigrationcookiexmldata/full-xml2xml-in.xml
 create mode 100644 tests/qemumigrationcookiexmldata/full-xml2xml-out.xml
 create mode 100644 tests/qemumigrationcookiexmldata/modern-dom-out-dest.xml
 create mode 100644 tests/qemumigrationcookiexmldata/modern-dom-out-source.xml
 create mode 100644 tests/qemumigrationcookiexmltest.c
 create mode 100644 tests/qemustatusxml2xmltest.c

-- 
2.26.2




More information about the libvir-list mailing list