[PATCH] tests: Adjust libxlxml2domconfigtest to work with Xen < 4.10

Ján Tomko jtomko at redhat.com
Thu Sep 24 07:03:08 UTC 2020

On a Wednesday in 2020, Jim Fehlig wrote:
>Commit f253dc90f5 introduced a test regression in environments with
>Xen < 4.10. The logic in libxl_conf.c correctly maps ACPI and APIC
>from virDomainObj to libxl_domain_conf based on
>LIBXL_HAVE_BUILDINFO_APIC, but the tests did not account for the
>different libxl_domain_conf JSON representations.
>One approach to fixing the test regression is to duplicate JSON test
>data files, having one set for Xen <= 4.9 and another for Xen 4.10
>and greater. To avoid duplicate data files, this patch takes the
>approach of modifying the libxl_domain_conf object based on
>LIBXL_HAVE_BUILDINFO_APIC, before retrieving the JSON representation.
>It allows using the same test data files for all supported versions
>of Xen by adjusting the intermediate form of libxl_domain_conf object
>as needed.
>Signed-off-by: Jim Fehlig <jfehlig at suse.com>
> tests/libxlxml2domconfigtest.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)

Reviewed-by: Ján Tomko <jtomko at redhat.com>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200924/7c12b378/attachment-0001.sig>

More information about the libvir-list mailing list