xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Testing libvirt XML -> libxl_domain_config conversion
@ 2014-06-03 11:02 Daniel P. Berrange
  2014-06-03 11:02 ` [libvirt] [PATCH v2 1/4] util: Introduce virJSONStringCompare for JSON doc comparisons Daniel P. Berrange
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Daniel P. Berrange @ 2014-06-03 11:02 UTC (permalink / raw)
  To: libvir-list; +Cc: Jim Fehlig, xen-devel, Daniel P. Berrange, Ian Campbell

Version 2 of:

  https://www.redhat.com/archives/libvir-list/2014-May/msg01102.html

This tests the conversion of libvirt XML to libxl_domain_config
objects by the libvirt libxl driver.

Changed in v2:

 - Compare the parsed JSON object model instead of strcmp() on
   the string-ified JSON document

 - To cope with new additions between Xen 4.3 and 4.4

    - Ignore case where actual JSON object has gained new keys.
      This copes with fact that '/c_info' gained a new key
      called 'pvh' in 4.4

    - Ignore case where actual JSON value has changed from 'null'
      to a non-'null' value type. This copes with fact that
      the element at /b_info/device_model_version changed from 
      'null' to a specific value by default in 4.4.

 - Use libxl_domain_config_to_json instead of libxl_json.h
   functions, and disable test if running on Xen version
   which lacks this function (eg 4.2)

 - Isolate VNC port allocator from host TCP ports so a predictable
   VNC port is always in the config.

Daniel P. Berrange (4):
  util: Introduce virJSONStringCompare for JSON doc comparisons
  util: Allow port allocator to skip bind() check
  tests: Add more test suite mock helpers
  libxl: Add a test suite for libxl option generator

 configure.ac                         |   2 +
 src/libvirt_private.syms             |   1 +
 src/libxl/libxl_driver.c             |   3 +-
 src/qemu/qemu_driver.c               |   9 +-
 src/util/virjson.c                   | 185 ++++++++++++++++++++++++++++++++++
 src/util/virjson.h                   |  22 +++++
 src/util/virportallocator.c          |  14 ++-
 src/util/virportallocator.h          |   7 +-
 tests/Makefile.am                    |  25 ++++-
 tests/libxlxml2jsondata/minimal.json | 172 ++++++++++++++++++++++++++++++++
 tests/libxlxml2jsondata/minimal.xml  |  36 +++++++
 tests/libxlxml2jsontest.c            | 186 +++++++++++++++++++++++++++++++++++
 tests/virfirewalltest.c              |   4 +-
 tests/virmock.h                      |  54 +++++++---
 tests/virmocklibxl.c                 |  87 ++++++++++++++++
 tests/virportallocatortest.c         |   4 +-
 tests/virsystemdtest.c               |   4 +-
 17 files changed, 786 insertions(+), 29 deletions(-)
 create mode 100644 tests/libxlxml2jsondata/minimal.json
 create mode 100644 tests/libxlxml2jsondata/minimal.xml
 create mode 100644 tests/libxlxml2jsontest.c
 create mode 100644 tests/virmocklibxl.c

-- 
1.9.3

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-06-18  9:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-03 11:02 [PATCH v2 0/4] Testing libvirt XML -> libxl_domain_config conversion Daniel P. Berrange
2014-06-03 11:02 ` [libvirt] [PATCH v2 1/4] util: Introduce virJSONStringCompare for JSON doc comparisons Daniel P. Berrange
2014-06-03 21:18   ` Jim Fehlig
2014-06-03 11:02 ` [PATCH v2 2/4] util: Allow port allocator to skip bind() check Daniel P. Berrange
2014-06-03 21:25   ` [libvirt] " Jim Fehlig
2014-06-03 11:02 ` [PATCH v2 3/4] tests: Add more test suite mock helpers Daniel P. Berrange
2014-06-03 21:30   ` [libvirt] " Jim Fehlig
2014-06-03 11:02 ` [PATCH v2 4/4] libxl: Add a test suite for libxl option generator Daniel P. Berrange
2014-06-03 21:45   ` [libvirt] " Jim Fehlig
2014-06-16 23:11     ` Jim Fehlig
2014-06-17  8:52       ` Ian Campbell
2014-06-17 18:40         ` Jim Fehlig
2014-06-18  8:33           ` Ian Campbell
2014-06-18  9:07           ` Daniel P. Berrange

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).