1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

tests: move sexpr2xml tests to WITH_LIBXL

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 <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Jim Fehlig 2016-12-27 16:19:43 -07:00
parent 2ea9d403ff
commit 212da33f81
51 changed files with 115 additions and 188 deletions

View File

@ -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 = \

View File

@ -15,7 +15,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='block' device='disk'>
<driver name='phy'/>
<driver name='phy' type='raw'/>
<source dev='/dev/MainVG/GuestVG'/>
<target dev='xvda' bus='xen'/>
</disk>
@ -24,6 +24,5 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -16,7 +16,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/some.img'/>
<target dev='xvda' bus='xen'/>
</disk>
@ -32,6 +32,5 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -38,6 +38,5 @@
<video>
<model type='xen' vram='4096' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -30,6 +30,5 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -16,7 +16,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='block' device='disk'>
<driver name='phy'/>
<driver name='phy' type='raw'/>
<source dev='/dev/MainVG/GuestVG'/>
<target dev='xvda' bus='xen'/>
</disk>
@ -25,6 +25,5 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -25,6 +25,5 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -25,6 +25,5 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -25,6 +25,5 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -16,7 +16,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/some.img'/>
<target dev='xvda' bus='xen'/>
</disk>
@ -25,6 +25,5 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
<disk type='block' device='disk'>
<driver name='phy'/>
<driver name='phy' type='raw'/>
<source dev='/iscsi/winxp'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/net/heaped/export/netimage/windows/xp-sp2-vol.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -51,8 +51,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -44,8 +44,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -21,13 +21,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -47,8 +47,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -21,13 +21,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -47,8 +47,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -17,7 +17,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/some.img'/>
<target dev='xvda' bus='xen'/>
</disk>
@ -29,6 +29,5 @@
</console>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -44,8 +44,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -45,8 +45,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -49,8 +49,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -56,8 +56,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -52,8 +52,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -52,8 +52,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -50,8 +50,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -52,8 +52,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -50,8 +50,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -50,8 +50,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -54,8 +54,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -54,8 +54,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -54,8 +54,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -52,8 +52,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -46,8 +46,7 @@
<sound model='sb16'/>
<sound model='es1370'/>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -46,8 +46,7 @@
<sound model='sb16'/>
<sound model='es1370'/>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -45,8 +45,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -45,8 +45,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -44,8 +44,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -44,8 +44,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -44,8 +44,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -16,7 +16,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/some.img'/>
<target dev='xvda' bus='xen'/>
</disk>
@ -31,6 +31,5 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -16,7 +16,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/some.img'/>
<target dev='xvda' bus='xen'/>
</disk>
@ -32,6 +32,5 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -16,7 +16,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/some.img'/>
<target dev='xvda' bus='xen'/>
</disk>
@ -31,6 +31,5 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -21,12 +21,13 @@
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
<disk type='block' device='disk'>
<driver name='phy'/>
<driver name='phy' type='raw'/>
<source dev='/dev/sda8'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver type='raw'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' target='0' unit='0'/>
@ -49,8 +50,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -16,7 +16,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='block' device='disk'>
<driver name='phy'/>
<driver name='phy' type='raw'/>
<source dev='/dev/MainVG/GuestVG'/>
<target dev='xvda' bus='xen'/>
</disk>
@ -26,15 +26,16 @@
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
<hostdev mode='subsystem' type='pci' managed='no'>
<driver name='xen'/>
<source>
<address domain='0x0001' bus='0x0c' slot='0x1b' function='0x2'/>
</source>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='no'>
<driver name='xen'/>
<source>
<address domain='0x0000' bus='0x01' slot='0x13' function='0x0'/>
</source>
</hostdev>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -16,7 +16,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/some.img'/>
<target dev='xvda' bus='xen'/>
</disk>
@ -25,6 +25,5 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -15,7 +15,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/some.img'/>
<target dev='xvda' bus='xen'/>
</disk>
@ -24,6 +24,5 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -16,7 +16,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/some.img'/>
<target dev='xvda' bus='xen'/>
</disk>
@ -25,6 +25,5 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -16,7 +16,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/some.img'/>
<target dev='xvda' bus='xen'/>
</disk>
@ -25,6 +25,5 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -16,7 +16,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/some.img'/>
<target dev='xvda' bus='xen'/>
</disk>
@ -31,6 +31,5 @@
<video>
<model type='xen' vram='4096' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -16,7 +16,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/some.img'/>
<target dev='xvda' bus='xen'/>
</disk>
@ -31,6 +31,5 @@
<video>
<model type='xen' vram='4096' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -15,7 +15,7 @@
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
<disk type='block' device='disk'>
<driver name='phy'/>
<driver name='phy' type='raw'/>
<source dev='/dev/vg_dom0test/test2vm'/>
<target dev='xvda' bus='xen'/>
</disk>
@ -36,6 +36,5 @@
<video>
<model type='xen' vram='4096' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -16,7 +16,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/some.img'/>
<target dev='xvda' bus='xen'/>
</disk>
@ -25,6 +25,5 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -19,13 +19,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/foo.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<driver name='file' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
@ -48,8 +48,7 @@
<listen type='address'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
<memballoon model='xen'/>
</devices>
</domain>

View File

@ -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 { \