From 212da33f81ce743bb034999a0582622b2b7de2c0 Mon Sep 17 00:00:00 2001 From: Jim Fehlig Date: Tue, 27 Dec 2016 16:19:43 -0700 Subject: [PATCH] tests: move sexpr2xml 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 sexpr2xml tests from WITH_XEN to WITH_LIBXL. Even though the legacy driver will be removed, we'll want to maintain the ability to convert sexpr to XML. Requires fixing up the tests to account for different behavior of Xen vs libxl post parse functions. 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 | 22 ++++++------ tests/sexpr2xmldata/sexpr2xml-boot-grub.xml | 3 +- .../sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml | 3 +- tests/sexpr2xmldata/sexpr2xml-curmem.xml | 1 - .../sexpr2xml-disk-block-shareable.xml | 1 - tests/sexpr2xmldata/sexpr2xml-disk-block.xml | 3 +- .../sexpr2xml-disk-drv-blktap-qcow.xml | 1 - .../sexpr2xml-disk-drv-blktap-raw.xml | 1 - .../sexpr2xml-disk-drv-blktap2-raw.xml | 1 - tests/sexpr2xmldata/sexpr2xml-disk-file.xml | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml | 7 ++-- .../sexpr2xml-fv-empty-kernel.xml | 7 ++-- .../sexpr2xmldata/sexpr2xml-fv-force-hpet.xml | 7 ++-- .../sexpr2xml-fv-force-nohpet.xml | 7 ++-- tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml | 3 +- .../sexpr2xmldata/sexpr2xml-fv-localtime.xml | 7 ++-- .../sexpr2xml-fv-net-netfront.xml | 7 ++-- .../sexpr2xml-fv-parallel-tcp.xml | 7 ++-- .../sexpr2xml-fv-serial-dev-2-ports.xml | 7 ++-- .../sexpr2xml-fv-serial-dev-2nd-port.xml | 7 ++-- .../sexpr2xml-fv-serial-file.xml | 7 ++-- .../sexpr2xml-fv-serial-null.xml | 7 ++-- .../sexpr2xml-fv-serial-pipe.xml | 7 ++-- .../sexpr2xmldata/sexpr2xml-fv-serial-pty.xml | 7 ++-- .../sexpr2xml-fv-serial-stdio.xml | 7 ++-- .../sexpr2xml-fv-serial-tcp-telnet.xml | 7 ++-- .../sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml | 7 ++-- .../sexpr2xmldata/sexpr2xml-fv-serial-udp.xml | 7 ++-- .../sexpr2xml-fv-serial-unix.xml | 7 ++-- .../sexpr2xmldata/sexpr2xml-fv-sound-all.xml | 7 ++-- tests/sexpr2xmldata/sexpr2xml-fv-sound.xml | 7 ++-- tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml | 7 ++-- .../sexpr2xmldata/sexpr2xml-fv-usbtablet.xml | 7 ++-- tests/sexpr2xmldata/sexpr2xml-fv-utc.xml | 7 ++-- tests/sexpr2xmldata/sexpr2xml-fv-v2.xml | 7 ++-- tests/sexpr2xmldata/sexpr2xml-fv.xml | 7 ++-- tests/sexpr2xmldata/sexpr2xml-net-bridged.xml | 3 +- tests/sexpr2xmldata/sexpr2xml-net-e1000.xml | 3 +- tests/sexpr2xmldata/sexpr2xml-net-routed.xml | 3 +- .../sexpr2xml-no-source-cdrom.xml | 6 ++-- tests/sexpr2xmldata/sexpr2xml-pci-devs.xml | 5 +-- .../sexpr2xml-pv-bootloader-cmdline.xml | 3 +- .../sexpr2xmldata/sexpr2xml-pv-bootloader.xml | 3 +- .../sexpr2xmldata/sexpr2xml-pv-localtime.xml | 3 +- tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml | 3 +- .../sexpr2xml-pv-vfb-new-vncdisplay.xml | 3 +- tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml | 3 +- .../sexpr2xml-pv-vfb-type-crash.xml | 3 +- tests/sexpr2xmldata/sexpr2xml-pv.xml | 3 +- tests/sexpr2xmldata/sexpr2xml-vif-rate.xml | 7 ++-- tests/sexpr2xmltest.c | 35 +++---------------- 51 files changed, 115 insertions(+), 188 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 8e48acc691..e27e24fc8e 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 += sexpr2xmltest \ - xmconfigtest xencapstest +test_programs += xmconfigtest xencapstest endif WITH_XEN if WITH_LIBXL -test_programs += xlconfigtest xml2sexprtest libxlxml2domconfigtest +test_programs += xlconfigtest xml2sexprtest sexpr2xmltest \ + libxlxml2domconfigtest test_libraries += virmocklibxl.la endif WITH_LIBXL @@ -502,11 +502,6 @@ if WITH_XEN xen_LDADDS = ../src/libvirt_driver_xen_impl.la xen_LDADDS += $(LDADDS) -sexpr2xmltest_SOURCES = \ - sexpr2xmltest.c testutilsxen.c testutilsxen.h \ - testutils.c testutils.h -sexpr2xmltest_LDADD = $(xen_LDADDS) - xmconfigtest_SOURCES = \ xmconfigtest.c testutilsxen.c testutilsxen.h \ testutils.c testutils.h @@ -517,8 +512,7 @@ xencapstest_SOURCES = \ xencapstest_LDADD = $(xen_LDADDS) else ! WITH_XEN -EXTRA_DIST += sexpr2xmltest.c xmconfigtest.c \ - xencapstest.c \ +EXTRA_DIST += xmconfigtest.c xencapstest.c \ testutilsxen.c testutilsxen.h endif ! WITH_XEN @@ -539,6 +533,11 @@ xml2sexprtest_SOURCES = \ testutils.c testutils.h xml2sexprtest_LDADD = $(libxl_LDADDS) +sexpr2xmltest_SOURCES = \ + sexpr2xmltest.c testutilsxen.c testutilsxen.h \ + testutils.c testutils.h +sexpr2xmltest_LDADD = $(libxl_LDADDS) + libxlxml2domconfigtest_SOURCES = \ libxlxml2domconfigtest.c testutilsxen.c testutilsxen.h \ testutils.c testutils.h @@ -550,7 +549,8 @@ virmocklibxl_la_LDFLAGS = $(MOCKLIBS_LDFLAGS) virmocklibxl_la_LIBADD = $(MOCKLIBS_LIBS) else ! WITH_LIBXL -EXTRA_DIST += xlconfigtest.c xml2sexprtest.c libxlxml2domconfigtest.c +EXTRA_DIST += xlconfigtest.c xml2sexprtest.c sexpr2xmltest.c \ + libxlxml2domconfigtest.c endif ! WITH_LIBXL QEMUMONITORTESTUTILS_SOURCES = \ diff --git a/tests/sexpr2xmldata/sexpr2xml-boot-grub.xml b/tests/sexpr2xmldata/sexpr2xml-boot-grub.xml index b9a8716b25..4b9f535fc4 100644 --- a/tests/sexpr2xmldata/sexpr2xml-boot-grub.xml +++ b/tests/sexpr2xmldata/sexpr2xml-boot-grub.xml @@ -15,7 +15,7 @@ destroy - + @@ -24,6 +24,5 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml b/tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml index a8f804423e..af43a106af 100644 --- a/tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml +++ b/tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml @@ -16,7 +16,7 @@ destroy - + @@ -32,6 +32,5 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-curmem.xml b/tests/sexpr2xmldata/sexpr2xml-curmem.xml index a976986a12..28c71e5d1c 100644 --- a/tests/sexpr2xmldata/sexpr2xml-curmem.xml +++ b/tests/sexpr2xmldata/sexpr2xml-curmem.xml @@ -38,6 +38,5 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml b/tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml index 9f757efa2d..e458b75a80 100644 --- a/tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml +++ b/tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml @@ -30,6 +30,5 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-block.xml b/tests/sexpr2xmldata/sexpr2xml-disk-block.xml index 56d6db5a5c..756a21124e 100644 --- a/tests/sexpr2xmldata/sexpr2xml-disk-block.xml +++ b/tests/sexpr2xmldata/sexpr2xml-disk-block.xml @@ -16,7 +16,7 @@ destroy - + @@ -25,6 +25,5 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml index 80f6dd205f..d3781f7377 100644 --- a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml +++ b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml @@ -25,6 +25,5 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.xml b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.xml index 71e7c40b63..5952b9d9eb 100644 --- a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.xml +++ b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.xml @@ -25,6 +25,5 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.xml b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.xml index bd244bbc39..86093272b8 100644 --- a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.xml +++ b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.xml @@ -25,6 +25,5 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-file.xml b/tests/sexpr2xmldata/sexpr2xml-disk-file.xml index c624fe31cc..3af99e0f69 100644 --- a/tests/sexpr2xmldata/sexpr2xml-disk-file.xml +++ b/tests/sexpr2xmldata/sexpr2xml-disk-file.xml @@ -16,7 +16,7 @@ destroy - + @@ -25,6 +25,5 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml b/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml index 5d4976fb3a..04495090d5 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml @@ -19,13 +19,13 @@ /usr/lib/xen/bin/qemu-dm - +
- + @@ -51,8 +51,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml b/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml index 57b60ec786..9179cfe5bc 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -44,8 +44,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml index 8266d10e0d..a9e677e84d 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml @@ -21,13 +21,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -47,8 +47,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml index 0b360446f9..d53f4a6407 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml @@ -21,13 +21,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -47,8 +47,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml b/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml index c638d8c724..a4f15b6546 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml @@ -17,7 +17,7 @@ destroy - + @@ -29,6 +29,5 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml b/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml index 40866d3924..9c162273b9 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -44,8 +44,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml b/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml index ed53462ab8..44289a14a8 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -45,8 +45,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml index 0fbce74c36..bcd5ce8028 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -49,8 +49,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml index bf25184650..f5cbb9d6ee 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -56,8 +56,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml index 60e9dd819a..35ee75679e 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -52,8 +52,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml index 6dfc32f01c..7e38e7f2ec 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -52,8 +52,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml index 274e3c36cc..b5e5af9c8f 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -50,8 +50,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml index fe251cb5f6..6e5cce4545 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -52,8 +52,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml index 258d76c451..66452b3852 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -50,8 +50,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml index 768a4253ba..1f5e0c965b 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -50,8 +50,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml index 6d76e57526..12334294b0 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -54,8 +54,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml index 9b7edd110e..29feada211 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -54,8 +54,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml index 65c4ffcbb0..ad3cd3dbc1 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -54,8 +54,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml index 2c75df14d6..b7a337100d 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -52,8 +52,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml b/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml index cb5e9443c6..b527fc29d2 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -46,8 +46,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml b/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml index cb5e9443c6..b527fc29d2 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -46,8 +46,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml b/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml index 6de380ba08..1a11f92fa6 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -45,8 +45,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml index 46628dff44..a92b7d5fb1 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -45,8 +45,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml b/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml index f75eac3a7b..1f595014f3 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -44,8 +44,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml b/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml index f75eac3a7b..1f595014f3 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -44,8 +44,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv.xml b/tests/sexpr2xmldata/sexpr2xml-fv.xml index f75eac3a7b..1f595014f3 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -44,8 +44,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-net-bridged.xml b/tests/sexpr2xmldata/sexpr2xml-net-bridged.xml index b680fd8aa4..b06a412808 100644 --- a/tests/sexpr2xmldata/sexpr2xml-net-bridged.xml +++ b/tests/sexpr2xmldata/sexpr2xml-net-bridged.xml @@ -16,7 +16,7 @@ destroy - + @@ -31,6 +31,5 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-net-e1000.xml b/tests/sexpr2xmldata/sexpr2xml-net-e1000.xml index bd9f680483..a184c990a2 100644 --- a/tests/sexpr2xmldata/sexpr2xml-net-e1000.xml +++ b/tests/sexpr2xmldata/sexpr2xml-net-e1000.xml @@ -16,7 +16,7 @@ destroy - + @@ -32,6 +32,5 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-net-routed.xml b/tests/sexpr2xmldata/sexpr2xml-net-routed.xml index f3cd1a7e78..758dde64b2 100644 --- a/tests/sexpr2xmldata/sexpr2xml-net-routed.xml +++ b/tests/sexpr2xmldata/sexpr2xml-net-routed.xml @@ -16,7 +16,7 @@ destroy - + @@ -31,6 +31,5 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml b/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml index 8a0c28b491..2a4e774b78 100644 --- a/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml +++ b/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml @@ -21,12 +21,13 @@ /usr/lib/xen/bin/qemu-dm - +
+
@@ -49,8 +50,7 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-pci-devs.xml b/tests/sexpr2xmldata/sexpr2xml-pci-devs.xml index ea8e5a5fa7..72b7c57505 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pci-devs.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pci-devs.xml @@ -16,7 +16,7 @@ destroy - + @@ -26,15 +26,16 @@ +
+
- diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-bootloader-cmdline.xml b/tests/sexpr2xmldata/sexpr2xml-pv-bootloader-cmdline.xml index f830742fc4..519d02d57f 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-bootloader-cmdline.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-bootloader-cmdline.xml @@ -16,7 +16,7 @@ destroy - + @@ -25,6 +25,5 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml b/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml index 131e04d50c..b3e97c4d7e 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml @@ -15,7 +15,7 @@ destroy - + @@ -24,6 +24,5 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml b/tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml index c1d702d9ac..31e18edc61 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml @@ -16,7 +16,7 @@ destroy - + @@ -25,6 +25,5 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml index 968697802b..d66509a33d 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml @@ -16,7 +16,7 @@ destroy - + @@ -25,6 +25,5 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml index a7553a520e..f45ead6559 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml @@ -16,7 +16,7 @@ destroy - + @@ -31,6 +31,5 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml index 6172dc3369..bbabc50fd0 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml @@ -16,7 +16,7 @@ destroy - + @@ -31,6 +31,5 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml index 8062082c1f..7dd473dd4e 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml @@ -15,7 +15,7 @@ /usr/lib/xen/bin/qemu-dm - + @@ -36,6 +36,5 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-pv.xml b/tests/sexpr2xmldata/sexpr2xml-pv.xml index c624fe31cc..3af99e0f69 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv.xml @@ -16,7 +16,7 @@ destroy - + @@ -25,6 +25,5 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-vif-rate.xml b/tests/sexpr2xmldata/sexpr2xml-vif-rate.xml index 3b04ae23ca..5466823b9b 100644 --- a/tests/sexpr2xmldata/sexpr2xml-vif-rate.xml +++ b/tests/sexpr2xmldata/sexpr2xml-vif-rate.xml @@ -19,13 +19,13 @@ /usr/lib64/xen/bin/qemu-dm - +
- + @@ -48,8 +48,7 @@ - diff --git a/tests/sexpr2xmltest.c b/tests/sexpr2xmltest.c index e1986e425f..efe64110d8 100644 --- a/tests/sexpr2xmltest.c +++ b/tests/sexpr2xmltest.c @@ -7,12 +7,11 @@ #include "internal.h" #include "virxml.h" #include "datatypes.h" -#include "xen/xen_driver.h" -#include "xen/xend_internal.h" #include "xenconfig/xen_sxpr.h" #include "testutils.h" #include "testutilsxen.h" #include "virstring.h" +#include "libxl/libxl_conf.h" #define VIR_FROM_THIS VIR_FROM_NONE @@ -24,37 +23,14 @@ testCompareFiles(const char *xml, const char *sexpr) { char *sexprData = NULL; char *gotxml = NULL; - int id; - char * tty; - int vncport; int ret = -1; virDomainDefPtr def = NULL; - virConnectPtr conn; - struct _xenUnifiedPrivate priv; - - - conn = virGetConnect(); - if (!conn) goto fail; if (virTestLoadFile(sexpr, &sexprData) < 0) goto fail; - memset(&priv, 0, sizeof(priv)); - /* Many puppies died to bring you this code. */ - priv.caps = caps; - conn->privateData = &priv; - if (virMutexInit(&priv.lock) < 0) - goto fail; - - if (xenGetDomIdFromSxprString(sexprData, &id) < 0) - goto fail; - xenUnifiedLock(&priv); - tty = xenStoreDomainGetConsolePath(conn, id); - vncport = xenStoreDomainGetVNCPort(conn, id); - xenUnifiedUnlock(&priv); - if (!(def = xenParseSxprString(sexprData, - tty, vncport, caps, xmlopt))) + NULL, -1, caps, xmlopt))) goto fail; if (!virDomainDefCheckABIStability(def, def, xmlopt)) { @@ -74,7 +50,6 @@ testCompareFiles(const char *xml, const char *sexpr) VIR_FREE(sexprData); VIR_FREE(gotxml); virDomainDefFree(def); - virObjectUnref(conn); return ret; } @@ -113,13 +88,11 @@ mymain(void) { int ret = 0; - if (!(caps = testXenCapsInit())) + if (!(caps = testXLInitCaps())) return EXIT_FAILURE; - if (!(xmlopt = xenDomainXMLConfInit())) { - virObjectUnref(caps); + if (!(xmlopt = libxlCreateXMLConf())) return EXIT_FAILURE; - } #define DO_TEST(in, out) \ do { \