Re: [PATCH v3] libxl: Add a test suite for libxl_domain_config generator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/03/2017 06:29 AM, Joao Martins wrote:
On Tue, Aug 01, 2017 at 03:17:51PM +0200, Marek Marczykowski-Górecki wrote:
From: Jim Fehlig <jfehlig@xxxxxxxx>

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@xxxxxxxx>
[update to v3.5.0-rc1, improve error reporting, use /bin/true emulator]
Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>

I've been looking at this series for the past days, and taking into
account the comments that Jim mentioned yesterday are ammended, and this
looks good to me:

Reviewed-by: Joao Martins <joao.m.martins@xxxxxxxxxx>

Thanks, I've pushed it now.

It adds a really nice piece of testing infra for libxl_domain_configs.
Maybe in the future more tests could be added in (in addition to the
CPUID one that Marek has planned).

Agreed. Testing of the libxl_domain_config generation code was long overdue.

Regards,
Jim

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux