mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
libxl: Add a test suite for libxl_domain_config generator
The libxl library allows a libxl_domain_config object to be serialized from/to a JSON string. Use this to allow testing of the XML to libxl_domain_config conversion process. Test XML is converted to libxl_domain_config, which is then serialized to json. A json template corresponding to the test XML is converted to a libxl_domain_config object using libxl_domain_config_from_json(), and then serialized back to json using libxl_domain_config_to_json(). The two json docs are then compared. Using libxl to convert the json template to a libxl_domain_config object and then back to json provides a simple way to account for any changes or additions to the json representation across Xen releases. Signed-off-by: Jim Fehlig <jfehlig@suse.com> [update to v3.5.0-rc1, improve error reporting, use /bin/true emulator] Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
This commit is contained in:
1 parent
b7dba9336f
commit
d8e8b63d30
10 files changed
+704
-2
No files matched your search
@@ -80,6 +80,10 @@ AC_DEFUN([LIBVIRT_DRIVER_CHECK_LIBXL], [
|
||||
LIBXL_LIBS="$LIBXL_LIBS -lxenctrl"
|
||||
])
|
||||
|
||||
dnl Check if libxl_domain_config_from_json is available for domXML to
|
||||
dnl libxl_domain_config tests
|
||||
LIBS="$LIBS -lxenlight -lxenctrl"
|
||||
AC_CHECK_FUNCS([libxl_domain_config_from_json])
|
||||
CFLAGS="$old_CFLAGS"
|
||||
LIBS="$old_LIBS"
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user