From 8ee83ea8754b7631965762e3b48d28eefaaf2a52 Mon Sep 17 00:00:00 2001 From: Jim Fehlig Date: Fri, 30 Dec 2016 14:43:43 -0700 Subject: [PATCH] tests: move xmconfig tests to WITH_LIBXL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In preparation of removing the legacy Xen driver, move the xmconfig tests from WITH_XEN to WITH_LIBXL. Even though the legacy driver will be removed, we'll want to maintain the ability to convert xm config to XML. Requires fixing up the tests to account for different behavior of Xen vs libxl post parse functions. For consistency with other Xen config tests, change the arch to x86_64. There is some test file fallout due to differences in handling of default values between xend and libxl. Signed-off-by: Jim Fehlig Reviewed-by: Daniel P. Berrangé --- tests/Makefile.am | 19 ++++++++-------- .../xmconfigdata/test-disk-drv-blktap-raw.xml | 3 +-- .../test-disk-drv-blktap2-raw.xml | 3 +-- tests/xmconfigdata/test-escape-paths.xml | 11 +++++----- .../test-fullvirt-default-feature.xml | 9 ++++---- .../xmconfigdata/test-fullvirt-force-hpet.xml | 9 ++++---- .../test-fullvirt-force-nohpet.xml | 9 ++++---- .../xmconfigdata/test-fullvirt-localtime.xml | 9 ++++---- .../test-fullvirt-net-netfront.xml | 9 ++++---- .../xmconfigdata/test-fullvirt-new-cdrom.xml | 9 ++++---- tests/xmconfigdata/test-fullvirt-nohap.xml | 9 ++++---- .../test-fullvirt-parallel-tcp.xml | 9 ++++---- .../test-fullvirt-serial-file.xml | 9 ++++---- .../test-fullvirt-serial-null.xml | 9 ++++---- .../test-fullvirt-serial-pipe.xml | 9 ++++---- .../xmconfigdata/test-fullvirt-serial-pty.xml | 9 ++++---- .../test-fullvirt-serial-stdio.xml | 9 ++++---- .../test-fullvirt-serial-tcp-telnet.xml | 9 ++++---- .../xmconfigdata/test-fullvirt-serial-tcp.xml | 9 ++++---- .../xmconfigdata/test-fullvirt-serial-udp.xml | 9 ++++---- .../test-fullvirt-serial-unix.xml | 9 ++++---- tests/xmconfigdata/test-fullvirt-sound.xml | 9 ++++---- tests/xmconfigdata/test-fullvirt-usbmouse.xml | 9 ++++---- .../xmconfigdata/test-fullvirt-usbtablet.xml | 9 ++++---- tests/xmconfigdata/test-fullvirt-utc.xml | 9 ++++---- tests/xmconfigdata/test-no-source-cdrom.xml | 9 ++++---- tests/xmconfigdata/test-paravirt-maxvcpus.xml | 5 ++--- .../xmconfigdata/test-paravirt-net-e1000.xml | 5 ++--- .../test-paravirt-net-vifname.xml | 5 ++--- .../test-paravirt-new-pvfb-vncdisplay.xml | 5 ++--- tests/xmconfigdata/test-paravirt-new-pvfb.xml | 5 ++--- tests/xmconfigdata/test-paravirt-vcpu.xml | 5 ++--- tests/xmconfigdata/test-pci-devs.xml | 11 +++++----- tests/xmconfigtest.c | 22 +++---------------- 34 files changed, 125 insertions(+), 172 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index e27e24fc8e..e6b85afa65 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -273,12 +273,12 @@ ssh_SOURCES = ssh.c ssh_LDADD = $(COVERAGE_LDFLAGS) if WITH_XEN -test_programs += xmconfigtest xencapstest +test_programs += xencapstest endif WITH_XEN if WITH_LIBXL test_programs += xlconfigtest xml2sexprtest sexpr2xmltest \ - libxlxml2domconfigtest + xmconfigtest libxlxml2domconfigtest test_libraries += virmocklibxl.la endif WITH_LIBXL @@ -502,18 +502,12 @@ if WITH_XEN xen_LDADDS = ../src/libvirt_driver_xen_impl.la xen_LDADDS += $(LDADDS) -xmconfigtest_SOURCES = \ - xmconfigtest.c testutilsxen.c testutilsxen.h \ - testutils.c testutils.h -xmconfigtest_LDADD = $(xen_LDADDS) - xencapstest_SOURCES = \ xencapstest.c testutils.h testutils.c xencapstest_LDADD = $(xen_LDADDS) else ! WITH_XEN -EXTRA_DIST += xmconfigtest.c xencapstest.c \ - testutilsxen.c testutilsxen.h +EXTRA_DIST += xencapstest.c testutilsxen.c testutilsxen.h endif ! WITH_XEN if WITH_LIBXL @@ -538,6 +532,11 @@ sexpr2xmltest_SOURCES = \ testutils.c testutils.h sexpr2xmltest_LDADD = $(libxl_LDADDS) +xmconfigtest_SOURCES = \ + xmconfigtest.c testutilsxen.c testutilsxen.h \ + testutils.c testutils.h +xmconfigtest_LDADD = $(libxl_LDADDS) + libxlxml2domconfigtest_SOURCES = \ libxlxml2domconfigtest.c testutilsxen.c testutilsxen.h \ testutils.c testutils.h @@ -550,7 +549,7 @@ virmocklibxl_la_LIBADD = $(MOCKLIBS_LIBS) else ! WITH_LIBXL EXTRA_DIST += xlconfigtest.c xml2sexprtest.c sexpr2xmltest.c \ - libxlxml2domconfigtest.c + xmconfigtest.c libxlxml2domconfigtest.c endif ! WITH_LIBXL QEMUMONITORTESTUTILS_SOURCES = \ diff --git a/tests/xmconfigdata/test-disk-drv-blktap-raw.xml b/tests/xmconfigdata/test-disk-drv-blktap-raw.xml index cf859bad93..b8a1eafdd9 100644 --- a/tests/xmconfigdata/test-disk-drv-blktap-raw.xml +++ b/tests/xmconfigdata/test-disk-drv-blktap-raw.xml @@ -6,7 +6,7 @@ 2 /usr/bin/pygrub - linux + linux destroy @@ -28,6 +28,5 @@ - diff --git a/tests/xmconfigdata/test-disk-drv-blktap2-raw.xml b/tests/xmconfigdata/test-disk-drv-blktap2-raw.xml index af2519aa93..b47ee3eb12 100644 --- a/tests/xmconfigdata/test-disk-drv-blktap2-raw.xml +++ b/tests/xmconfigdata/test-disk-drv-blktap2-raw.xml @@ -6,7 +6,7 @@ 2 /usr/bin/pygrub - linux + linux destroy @@ -28,6 +28,5 @@ - diff --git a/tests/xmconfigdata/test-escape-paths.xml b/tests/xmconfigdata/test-escape-paths.xml index a5daa2c3ed..91d2b7c810 100644 --- a/tests/xmconfigdata/test-escape-paths.xml +++ b/tests/xmconfigdata/test-escape-paths.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader&test @@ -21,19 +21,19 @@ /usr/lib/xen/bin/qemu-dm&test - +
- +
- + @@ -54,8 +54,7 @@ - diff --git a/tests/xmconfigdata/test-fullvirt-default-feature.xml b/tests/xmconfigdata/test-fullvirt-default-feature.xml index ce1280d791..e890471917 100644 --- a/tests/xmconfigdata/test-fullvirt-default-feature.xml +++ b/tests/xmconfigdata/test-fullvirt-default-feature.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -23,13 +23,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -48,8 +48,7 @@ - diff --git a/tests/xmconfigdata/test-fullvirt-force-hpet.xml b/tests/xmconfigdata/test-fullvirt-force-hpet.xml index ce1280d791..e890471917 100644 --- a/tests/xmconfigdata/test-fullvirt-force-hpet.xml +++ b/tests/xmconfigdata/test-fullvirt-force-hpet.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -23,13 +23,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -48,8 +48,7 @@ - diff --git a/tests/xmconfigdata/test-fullvirt-force-nohpet.xml b/tests/xmconfigdata/test-fullvirt-force-nohpet.xml index 7636f31f00..d33a3f9400 100644 --- a/tests/xmconfigdata/test-fullvirt-force-nohpet.xml +++ b/tests/xmconfigdata/test-fullvirt-force-nohpet.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -23,13 +23,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -48,8 +48,7 @@ - diff --git a/tests/xmconfigdata/test-fullvirt-localtime.xml b/tests/xmconfigdata/test-fullvirt-localtime.xml index b3adf86644..fcc7dbcc30 100644 --- a/tests/xmconfigdata/test-fullvirt-localtime.xml +++ b/tests/xmconfigdata/test-fullvirt-localtime.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -21,13 +21,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -46,8 +46,7 @@ - diff --git a/tests/xmconfigdata/test-fullvirt-net-netfront.xml b/tests/xmconfigdata/test-fullvirt-net-netfront.xml index c22ad8dee1..5049c05f2e 100644 --- a/tests/xmconfigdata/test-fullvirt-net-netfront.xml +++ b/tests/xmconfigdata/test-fullvirt-net-netfront.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -21,13 +21,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -46,8 +46,7 @@ - diff --git a/tests/xmconfigdata/test-fullvirt-new-cdrom.xml b/tests/xmconfigdata/test-fullvirt-new-cdrom.xml index 2bb3d720b4..6756960bfc 100644 --- a/tests/xmconfigdata/test-fullvirt-new-cdrom.xml +++ b/tests/xmconfigdata/test-fullvirt-new-cdrom.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -21,13 +21,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -46,8 +46,7 @@ - diff --git a/tests/xmconfigdata/test-fullvirt-nohap.xml b/tests/xmconfigdata/test-fullvirt-nohap.xml index 234856cde5..a92d5c047d 100644 --- a/tests/xmconfigdata/test-fullvirt-nohap.xml +++ b/tests/xmconfigdata/test-fullvirt-nohap.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -22,13 +22,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -47,8 +47,7 @@ - diff --git a/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml b/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml index be149fd3b5..82464449c5 100644 --- a/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml +++ b/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -21,13 +21,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -51,8 +51,7 @@ - diff --git a/tests/xmconfigdata/test-fullvirt-serial-file.xml b/tests/xmconfigdata/test-fullvirt-serial-file.xml index f27aba92b9..2c25737830 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-file.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-file.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -21,13 +21,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -54,8 +54,7 @@ - diff --git a/tests/xmconfigdata/test-fullvirt-serial-null.xml b/tests/xmconfigdata/test-fullvirt-serial-null.xml index ea2994475e..026f8da83e 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-null.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-null.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -21,13 +21,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -52,8 +52,7 @@ - diff --git a/tests/xmconfigdata/test-fullvirt-serial-pipe.xml b/tests/xmconfigdata/test-fullvirt-serial-pipe.xml index 69bf51c28b..d9ef787a60 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-pipe.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-pipe.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -21,13 +21,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -54,8 +54,7 @@ - diff --git a/tests/xmconfigdata/test-fullvirt-serial-pty.xml b/tests/xmconfigdata/test-fullvirt-serial-pty.xml index 0c6e47795d..8a5af93313 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-pty.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-pty.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -21,13 +21,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -52,8 +52,7 @@ - diff --git a/tests/xmconfigdata/test-fullvirt-serial-stdio.xml b/tests/xmconfigdata/test-fullvirt-serial-stdio.xml index 1f12081967..ddb1fd89d6 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-stdio.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-stdio.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -21,13 +21,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -52,8 +52,7 @@ - diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml index 47544df1de..a43333b474 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -21,13 +21,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -56,8 +56,7 @@ - diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp.xml b/tests/xmconfigdata/test-fullvirt-serial-tcp.xml index 8f1777aa5f..5222ea12b7 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-tcp.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-tcp.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -21,13 +21,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -56,8 +56,7 @@ - diff --git a/tests/xmconfigdata/test-fullvirt-serial-udp.xml b/tests/xmconfigdata/test-fullvirt-serial-udp.xml index c59e2b6643..9862d4ff14 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-udp.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-udp.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -21,13 +21,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -56,8 +56,7 @@ - diff --git a/tests/xmconfigdata/test-fullvirt-serial-unix.xml b/tests/xmconfigdata/test-fullvirt-serial-unix.xml index e6787861d9..2ff7992417 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-unix.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-unix.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -21,13 +21,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -54,8 +54,7 @@ - diff --git a/tests/xmconfigdata/test-fullvirt-sound.xml b/tests/xmconfigdata/test-fullvirt-sound.xml index 3bd2e76d8d..67c762eba1 100644 --- a/tests/xmconfigdata/test-fullvirt-sound.xml +++ b/tests/xmconfigdata/test-fullvirt-sound.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -21,13 +21,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -48,8 +48,7 @@ - diff --git a/tests/xmconfigdata/test-fullvirt-usbmouse.xml b/tests/xmconfigdata/test-fullvirt-usbmouse.xml index f1421b673e..1ef30cf515 100644 --- a/tests/xmconfigdata/test-fullvirt-usbmouse.xml +++ b/tests/xmconfigdata/test-fullvirt-usbmouse.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -21,13 +21,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -47,8 +47,7 @@ - diff --git a/tests/xmconfigdata/test-fullvirt-usbtablet.xml b/tests/xmconfigdata/test-fullvirt-usbtablet.xml index 566c842611..d29e8f6c1b 100644 --- a/tests/xmconfigdata/test-fullvirt-usbtablet.xml +++ b/tests/xmconfigdata/test-fullvirt-usbtablet.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -21,13 +21,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -47,8 +47,7 @@ - diff --git a/tests/xmconfigdata/test-fullvirt-utc.xml b/tests/xmconfigdata/test-fullvirt-utc.xml index 2bb3d720b4..6756960bfc 100644 --- a/tests/xmconfigdata/test-fullvirt-utc.xml +++ b/tests/xmconfigdata/test-fullvirt-utc.xml @@ -5,7 +5,7 @@ 403456 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -21,13 +21,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -46,8 +46,7 @@ - diff --git a/tests/xmconfigdata/test-no-source-cdrom.xml b/tests/xmconfigdata/test-no-source-cdrom.xml index c0b2d4307c..52f7775fe9 100644 --- a/tests/xmconfigdata/test-no-source-cdrom.xml +++ b/tests/xmconfigdata/test-no-source-cdrom.xml @@ -5,7 +5,7 @@ 358400 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -21,13 +21,13 @@ /usr/lib/xen/bin/qemu-dm - +
- +
@@ -51,8 +51,7 @@ - diff --git a/tests/xmconfigdata/test-paravirt-maxvcpus.xml b/tests/xmconfigdata/test-paravirt-maxvcpus.xml index cd6574c6c1..1ad652c4d1 100644 --- a/tests/xmconfigdata/test-paravirt-maxvcpus.xml +++ b/tests/xmconfigdata/test-paravirt-maxvcpus.xml @@ -6,7 +6,7 @@ 4 /usr/bin/pygrub - linux + linux destroy @@ -14,7 +14,7 @@ restart - + @@ -28,6 +28,5 @@ - diff --git a/tests/xmconfigdata/test-paravirt-net-e1000.xml b/tests/xmconfigdata/test-paravirt-net-e1000.xml index 735e8b0ad7..dd5dffdf56 100644 --- a/tests/xmconfigdata/test-paravirt-net-e1000.xml +++ b/tests/xmconfigdata/test-paravirt-net-e1000.xml @@ -6,7 +6,7 @@ 1 /usr/bin/pygrub - linux + linux destroy @@ -14,7 +14,7 @@ restart - + @@ -35,6 +35,5 @@ - diff --git a/tests/xmconfigdata/test-paravirt-net-vifname.xml b/tests/xmconfigdata/test-paravirt-net-vifname.xml index 3ce3639e89..32006f967f 100644 --- a/tests/xmconfigdata/test-paravirt-net-vifname.xml +++ b/tests/xmconfigdata/test-paravirt-net-vifname.xml @@ -6,7 +6,7 @@ 1 /usr/bin/pygrub - linux + linux destroy @@ -14,7 +14,7 @@ restart - + @@ -36,6 +36,5 @@ - diff --git a/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml b/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml index 20c31ecd5c..b55cadd7ca 100644 --- a/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml +++ b/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml @@ -6,7 +6,7 @@ 1 /usr/bin/pygrub - linux + linux destroy @@ -14,7 +14,7 @@ restart - + @@ -34,6 +34,5 @@ - diff --git a/tests/xmconfigdata/test-paravirt-new-pvfb.xml b/tests/xmconfigdata/test-paravirt-new-pvfb.xml index 33c48f42c1..ffc00559fc 100644 --- a/tests/xmconfigdata/test-paravirt-new-pvfb.xml +++ b/tests/xmconfigdata/test-paravirt-new-pvfb.xml @@ -6,7 +6,7 @@ 1 /usr/bin/pygrub - linux + linux destroy @@ -14,7 +14,7 @@ restart - + @@ -34,6 +34,5 @@ - diff --git a/tests/xmconfigdata/test-paravirt-vcpu.xml b/tests/xmconfigdata/test-paravirt-vcpu.xml index cd6574c6c1..1ad652c4d1 100644 --- a/tests/xmconfigdata/test-paravirt-vcpu.xml +++ b/tests/xmconfigdata/test-paravirt-vcpu.xml @@ -6,7 +6,7 @@ 4 /usr/bin/pygrub - linux + linux destroy @@ -14,7 +14,7 @@ restart - + @@ -28,6 +28,5 @@ - diff --git a/tests/xmconfigdata/test-pci-devs.xml b/tests/xmconfigdata/test-pci-devs.xml index 0faae4334e..f39b1494e2 100644 --- a/tests/xmconfigdata/test-pci-devs.xml +++ b/tests/xmconfigdata/test-pci-devs.xml @@ -5,7 +5,7 @@ 358400 1 - hvm + hvm /usr/lib/xen/boot/hvmloader @@ -21,13 +21,13 @@ /usr/lib/xen/bin/qemu-dm - +
- +
@@ -51,18 +51,19 @@ +
+
- diff --git a/tests/xmconfigtest.c b/tests/xmconfigtest.c index 90ccce0b05..6851fa73cd 100644 --- a/tests/xmconfigtest.c +++ b/tests/xmconfigtest.c @@ -29,13 +29,12 @@ #include "internal.h" #include "datatypes.h" -#include "xen/xen_driver.h" -#include "xen/xm_internal.h" #include "xenconfig/xen_xm.h" #include "testutils.h" #include "testutilsxen.h" #include "viralloc.h" #include "virstring.h" +#include "libxl/libxl_conf.h" #define VIR_FROM_THIS VIR_FROM_NONE @@ -50,7 +49,6 @@ testCompareParseXML(const char *xmcfg, const char *xml) int ret = -1; virConnectPtr conn = NULL; int wrote = 4096; - struct _xenUnifiedPrivate priv; virDomainDefPtr def = NULL; if (VIR_ALLOC_N(gotxmcfgData, wrote) < 0) @@ -59,10 +57,6 @@ testCompareParseXML(const char *xmcfg, const char *xml) conn = virGetConnect(); if (!conn) goto fail; - /* Many puppies died to bring you this code. */ - priv.caps = caps; - conn->privateData = &priv; - if (!(def = virDomainDefParseFile(xml, caps, xmlopt, NULL, VIR_DOMAIN_DEF_PARSE_INACTIVE))) goto fail; @@ -101,20 +95,11 @@ testCompareFormatXML(const char *xmcfg, const char *xml) char *gotxml = NULL; virConfPtr conf = NULL; int ret = -1; - virConnectPtr conn; - struct _xenUnifiedPrivate priv; virDomainDefPtr def = NULL; - conn = virGetConnect(); - if (!conn) goto fail; - if (virTestLoadFile(xmcfg, &xmcfgData) < 0) goto fail; - /* Many puppies died to bring you this code. */ - priv.caps = caps; - conn->privateData = &priv; - if (!(conf = virConfReadString(xmcfgData, 0))) goto fail; @@ -135,7 +120,6 @@ testCompareFormatXML(const char *xmcfg, const char *xml) VIR_FREE(xmcfgData); VIR_FREE(gotxml); virDomainDefFree(def); - virObjectUnref(conn); return ret; } @@ -180,10 +164,10 @@ mymain(void) { int ret = 0; - if (!(caps = testXenCapsInit())) + if (!(caps = testXLInitCaps())) return EXIT_FAILURE; - if (!(xmlopt = xenDomainXMLConfInit())) + if (!(xmlopt = libxlCreateXMLConf())) return EXIT_FAILURE; #define DO_TEST_PARSE(name) \