From f07ae0fcbd84f52da6660a7ad0b19c99f6a6f9d6 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Mon, 8 Mar 2021 14:29:31 +0100 Subject: [PATCH] tests: Adjust libxlxml2domconfigtest to work with Xen < 4.8 Commit fcdc387410fadfb066b95395c5b5d2a6a16f7066 used a libxl API which is only available since Xen 4.8. Due to lack of a specific guard for this API change, reuse another guard from libxl.h. Signed-off-by: Olaf Hering Reviewed-by: Daniel Henrique Barboza Reviewed-by: Jim Fehlig --- tests/libxlxml2domconfigtest.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/libxlxml2domconfigtest.c b/tests/libxlxml2domconfigtest.c index d58be1211b..3c133ac6f0 100644 --- a/tests/libxlxml2domconfigtest.c +++ b/tests/libxlxml2domconfigtest.c @@ -105,7 +105,13 @@ testCompareXMLToDomConfig(const char *xmlfile, */ # ifndef LIBXL_HAVE_BUILDINFO_APIC if (expectconfig.c_info.type == LIBXL_DOMAIN_TYPE_HVM) { +# ifdef LIBXL_HAVE_MEMKB_64BITS + /* + * This part of the libxl API was changed without a guard in Xen 4.8. + * Reuse another Xen 4.8 specific conditional. + */ libxl_defbool_unset(&expectconfig.b_info.acpi); +# endif libxl_defbool_set(&expectconfig.b_info.u.hvm.apic, true); libxl_defbool_set(&expectconfig.b_info.u.hvm.acpi, true); }