[libvirt] [PATCH 00/16] Xen: remove xend config version

Hi All, Ian Campbell recently attempted [1] to fix and issue around MAX_VIRT_VPUS on ARM that required adding a new XEND_CONFIG_VERSION. After some discussion [2] we decided to drop support for all of the old xend config versions and go with the version supported in Xen 4.0, since the xl syntax was originally based on (and intended to be compatible with) xm circa that point in time. This series removes all traces of xend config version from the codebase, essentially removing support for Xen 3.x. Hopefully I succeeding in making the rather large series reviewable. The series is also available on the remove-xend-config-version branch of my libvirt github clone [2]. [1] https://www.redhat.com/archives/libvir-list/2015-November/msg01153.html [2] https://www.redhat.com/archives/libvir-list/2015-December/msg00148.html [3] https://github.com/jfehlig/libvirt/tree/remove-xend-config-version Jim Fehlig (16): Xen: tests: remove old xm config tests Xen: tests: remove net-ioemu xm config test Xen: tests: remove old sexpr2xml tests Xen: tests: remove old xml2sexpr tests Xen: tests: use latest XEND_CONFIG_VERSION in xm/xl tests Xen: xenconfig: remove XEND_CONFIG_VERSION in common code Xen: xenconfig: remove use of XEND_CONFIG_VERSION in xen_xm Xen: xenconfig: remove xendConfigVersion from public functions Xen: tests: use latest XEND_CONFIG_VERSION in sexpr2xml tests Xen: xenconfig: remove disks from '(image)' sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests Xen: xenconfig: remove use of XEND_CONFIG_VERSION in xen_sxpr Xen: xen_driver: remove use of XEND_CONFIG_VERSION Xen: xend: remove use of XEND_CONFIG_VERSION Xen: xenconfig: remove xendConfigVersion from public sexpr functions Xen: remove xendConfigVersion from driver private struct src/libxl/libxl_driver.c | 9 +- src/xen/xen_driver.c | 296 ++++----------- src/xen/xen_driver.h | 2 - src/xen/xend_internal.c | 224 ++--------- src/xen/xm_internal.c | 9 +- src/xenconfig/xen_common.c | 211 ++++------- src/xenconfig/xen_common.h | 7 +- src/xenconfig/xen_sxpr.c | 411 ++++++--------------- src/xenconfig/xen_sxpr.h | 21 +- src/xenconfig/xen_xl.c | 9 +- src/xenconfig/xen_xl.h | 7 +- src/xenconfig/xen_xm.c | 57 +-- src/xenconfig/xen_xm.h | 5 +- src/xenconfig/xenxs_private.h | 8 - tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml | 2 +- .../sexpr2xmldata/sexpr2xml-fv-empty-kernel.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml | 4 +- .../sexpr2xmldata/sexpr2xml-fv-force-nohpet.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml | 2 +- tests/sexpr2xmldata/sexpr2xml-fv-localtime.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.sexpr | 9 - tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml | 48 --- .../sexpr2xmldata/sexpr2xml-fv-net-netfront.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml | 4 +- .../sexpr2xmldata/sexpr2xml-fv-parallel-tcp.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml | 4 +- .../sexpr2xml-fv-serial-dev-2-ports.sexpr | 5 +- .../sexpr2xml-fv-serial-dev-2-ports.xml | 4 +- .../sexpr2xml-fv-serial-dev-2nd-port.sexpr | 4 +- .../sexpr2xml-fv-serial-dev-2nd-port.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-file.sexpr | 7 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-null.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.sexpr | 7 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml | 4 +- .../sexpr2xmldata/sexpr2xml-fv-serial-stdio.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml | 4 +- .../sexpr2xml-fv-serial-tcp-telnet.sexpr | 3 +- .../sexpr2xml-fv-serial-tcp-telnet.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-sound-all.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-sound.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-sound.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-utc.sexpr | 2 + tests/sexpr2xmldata/sexpr2xml-fv-utc.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-v2.xml | 2 +- tests/sexpr2xmldata/sexpr2xml-fv.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml | 2 +- tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr | 9 - tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml | 34 -- tests/sexpr2xmltest.c | 130 ++++--- .../test-fullvirt-direct-kernel-boot.cfg | 3 +- .../test-fullvirt-direct-kernel-boot.xml | 2 +- tests/xlconfigdata/test-fullvirt-multiusb.cfg | 3 +- tests/xlconfigdata/test-fullvirt-multiusb.xml | 2 +- tests/xlconfigdata/test-new-disk.cfg | 3 +- tests/xlconfigdata/test-new-disk.xml | 2 +- tests/xlconfigdata/test-spice-features.cfg | 3 +- tests/xlconfigdata/test-spice-features.xml | 2 +- tests/xlconfigdata/test-spice.cfg | 3 +- tests/xlconfigdata/test-spice.xml | 2 +- tests/xlconfigtest.c | 29 +- tests/xmconfigdata/test-escape-paths.cfg | 5 +- tests/xmconfigdata/test-escape-paths.xml | 2 +- .../xmconfigdata/test-fullvirt-default-feature.cfg | 5 +- .../xmconfigdata/test-fullvirt-default-feature.xml | 2 +- tests/xmconfigdata/test-fullvirt-force-hpet.cfg | 5 +- tests/xmconfigdata/test-fullvirt-force-hpet.xml | 2 +- tests/xmconfigdata/test-fullvirt-force-nohpet.cfg | 5 +- tests/xmconfigdata/test-fullvirt-force-nohpet.xml | 2 +- tests/xmconfigdata/test-fullvirt-localtime.cfg | 5 +- tests/xmconfigdata/test-fullvirt-localtime.xml | 2 +- tests/xmconfigdata/test-fullvirt-net-ioemu.cfg | 25 -- tests/xmconfigdata/test-fullvirt-net-ioemu.xml | 49 --- tests/xmconfigdata/test-fullvirt-net-netfront.cfg | 3 + tests/xmconfigdata/test-fullvirt-net-netfront.xml | 2 +- tests/xmconfigdata/test-fullvirt-new-cdrom.cfg | 5 +- tests/xmconfigdata/test-fullvirt-new-cdrom.xml | 2 +- tests/xmconfigdata/test-fullvirt-old-cdrom.cfg | 26 -- tests/xmconfigdata/test-fullvirt-old-cdrom.xml | 49 --- tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg | 5 +- tests/xmconfigdata/test-fullvirt-parallel-tcp.xml | 2 +- .../test-fullvirt-serial-dev-2-ports.cfg | 5 +- .../test-fullvirt-serial-dev-2-ports.xml | 2 +- .../test-fullvirt-serial-dev-2nd-port.cfg | 5 +- .../test-fullvirt-serial-dev-2nd-port.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-file.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-file.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-null.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-null.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-pipe.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-pipe.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-pty.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-pty.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-stdio.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-stdio.xml | 2 +- .../test-fullvirt-serial-tcp-telnet.cfg | 5 +- .../test-fullvirt-serial-tcp-telnet.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-tcp.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-tcp.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-udp.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-udp.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-unix.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-unix.xml | 2 +- tests/xmconfigdata/test-fullvirt-sound.cfg | 5 +- tests/xmconfigdata/test-fullvirt-sound.xml | 2 +- tests/xmconfigdata/test-fullvirt-usbmouse.cfg | 5 +- tests/xmconfigdata/test-fullvirt-usbmouse.xml | 2 +- tests/xmconfigdata/test-fullvirt-usbtablet.cfg | 5 +- tests/xmconfigdata/test-fullvirt-usbtablet.xml | 2 +- tests/xmconfigdata/test-fullvirt-utc.cfg | 5 +- tests/xmconfigdata/test-fullvirt-utc.xml | 2 +- tests/xmconfigdata/test-no-source-cdrom.cfg | 5 +- tests/xmconfigdata/test-no-source-cdrom.xml | 2 +- .../test-paravirt-old-pvfb-vncdisplay.cfg | 18 - .../test-paravirt-old-pvfb-vncdisplay.xml | 36 -- tests/xmconfigdata/test-paravirt-old-pvfb.cfg | 17 - tests/xmconfigdata/test-paravirt-old-pvfb.xml | 36 -- tests/xmconfigdata/test-pci-devs.cfg | 5 +- tests/xmconfigdata/test-pci-devs.xml | 2 +- tests/xmconfigtest.c | 94 +++-- tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr | 4 +- tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-curmem.sexpr | 2 +- .../xml2sexpr-disk-block-shareable.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-disk-block.sexpr | 2 +- .../xml2sexprdata/xml2sexpr-disk-drv-blkback.sexpr | 2 +- .../xml2sexpr-disk-drv-blktap-qcow.sexpr | 2 +- .../xml2sexpr-disk-drv-blktap-raw.sexpr | 2 +- .../xml2sexprdata/xml2sexpr-disk-drv-blktap.sexpr | 2 +- .../xml2sexpr-disk-drv-blktap2-raw.sexpr | 2 +- .../xml2sexprdata/xml2sexpr-disk-drv-blktap2.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-disk-drv-loop.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-disk-file.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-escape.sexpr | 6 +- tests/xml2sexprdata/xml2sexpr-fv-force-hpet.sexpr | 10 +- .../xml2sexprdata/xml2sexpr-fv-force-nohpet.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-kernel.sexpr | 5 +- tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.sexpr | 9 - tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.xml | 31 -- .../xml2sexprdata/xml2sexpr-fv-net-netfront.sexpr | 5 +- .../xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr | 10 +- .../xml2sexpr-fv-serial-dev-2-ports.sexpr | 13 +- .../xml2sexpr-fv-serial-dev-2nd-port.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr | 13 +- tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr | 13 +- tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr | 10 +- .../xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr | 10 +- .../xml2sexpr-fv-serial-tcp-telnet.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-v2.sexpr | 4 +- tests/xml2sexprdata/xml2sexpr-fv-vncunused.sexpr | 4 +- tests/xml2sexprdata/xml2sexpr-fv.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-net-bridged.sexpr | 3 +- tests/xml2sexprdata/xml2sexpr-net-e1000.sexpr | 3 +- tests/xml2sexprdata/xml2sexpr-net-routed.sexpr | 3 +- .../xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr | 6 +- tests/xml2sexprdata/xml2sexpr-pci-devs.sexpr | 2 +- .../xml2sexpr-pv-bootloader-cmdline.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr | 6 +- tests/xml2sexprdata/xml2sexpr-pv-vcpus.sexpr | 3 +- .../xml2sexprdata/xml2sexpr-pv-vfb-new-auto.sexpr | 3 +- tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr | 3 +- tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr | 10 - tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.xml | 23 -- tests/xml2sexprdata/xml2sexpr-pv.sexpr | 3 +- tests/xml2sexprtest.c | 120 +++--- 193 files changed, 919 insertions(+), 1833 deletions(-) delete mode 100644 tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.sexpr delete mode 100644 tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml delete mode 100644 tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr delete mode 100644 tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml delete mode 100644 tests/xmconfigdata/test-fullvirt-net-ioemu.cfg delete mode 100644 tests/xmconfigdata/test-fullvirt-net-ioemu.xml delete mode 100755 tests/xmconfigdata/test-fullvirt-old-cdrom.cfg delete mode 100644 tests/xmconfigdata/test-fullvirt-old-cdrom.xml delete mode 100644 tests/xmconfigdata/test-paravirt-old-pvfb-vncdisplay.cfg delete mode 100644 tests/xmconfigdata/test-paravirt-old-pvfb-vncdisplay.xml delete mode 100755 tests/xmconfigdata/test-paravirt-old-pvfb.cfg delete mode 100644 tests/xmconfigdata/test-paravirt-old-pvfb.xml delete mode 100644 tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.sexpr delete mode 100644 tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.xml delete mode 100644 tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr delete mode 100644 tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.xml -- 2.1.4

Remove xm config tests for old xend 3.0.2 config format. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- tests/xmconfigdata/test-fullvirt-old-cdrom.cfg | 26 ------------ tests/xmconfigdata/test-fullvirt-old-cdrom.xml | 49 ---------------------- .../test-paravirt-old-pvfb-vncdisplay.cfg | 18 -------- .../test-paravirt-old-pvfb-vncdisplay.xml | 36 ---------------- tests/xmconfigdata/test-paravirt-old-pvfb.cfg | 17 -------- tests/xmconfigdata/test-paravirt-old-pvfb.xml | 36 ---------------- tests/xmconfigtest.c | 3 -- 7 files changed, 185 deletions(-) diff --git a/tests/xmconfigdata/test-fullvirt-old-cdrom.cfg b/tests/xmconfigdata/test-fullvirt-old-cdrom.cfg deleted file mode 100755 index 5c8b47b..0000000 --- a/tests/xmconfigdata/test-fullvirt-old-cdrom.cfg +++ /dev/null @@ -1,26 +0,0 @@ -name = "XenGuest2" -uuid = "c7a5fdb2-cdaf-9455-926a-d65c16db1809" -maxmem = 579 -memory = 394 -vcpus = 1 -pae = 1 -acpi = 1 -apic = 1 -cdrom = "/root/boot.iso" -localtime = 0 -on_poweroff = "destroy" -on_reboot = "restart" -on_crash = "restart" -device_model = "/usr/lib/xen/bin/qemu-dm" -sdl = 0 -vnc = 1 -vncunused = 1 -vnclisten = "127.0.0.1" -vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr0,script=vif-bridge,model=e1000,type=ioemu" ] -parallel = "none" -serial = "none" -builder = "hvm" -kernel = "/usr/lib/xen/boot/hvmloader" -boot = "d" -disk = [ "phy:/dev/HostVG/XenGuest2,ioemu:hda,w" ] diff --git a/tests/xmconfigdata/test-fullvirt-old-cdrom.xml b/tests/xmconfigdata/test-fullvirt-old-cdrom.xml deleted file mode 100644 index dd5fd3f..0000000 --- a/tests/xmconfigdata/test-fullvirt-old-cdrom.xml +++ /dev/null @@ -1,49 +0,0 @@ -<domain type='xen'> - <name>XenGuest2</name> - <uuid>c7a5fdb2-cdaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>592896</memory> - <currentMemory unit='KiB'>403456</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='xenfv'>hvm</type> - <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader> - <boot dev='cdrom'/> - </os> - <features> - <acpi/> - <apic/> - <pae/> - </features> - <clock offset='utc' adjustment='reset'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <devices> - <emulator>/usr/lib/xen/bin/qemu-dm</emulator> - <disk type='block' device='disk'> - <driver name='phy'/> - <source dev='/dev/HostVG/XenGuest2'/> - <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'/> - <source file='/root/boot.iso'/> - <target dev='hdc' bus='ide'/> - <readonly/> - <address type='drive' controller='0' bus='1' target='0' unit='0'/> - </disk> - <interface type='bridge'> - <mac address='00:16:3e:66:92:9c'/> - <source bridge='xenbr0'/> - <script path='vif-bridge'/> - <model type='e1000'/> - </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> - <listen type='address' address='127.0.0.1'/> - </graphics> - <memballoon model='xen'/> - </devices> -</domain> diff --git a/tests/xmconfigdata/test-paravirt-old-pvfb-vncdisplay.cfg b/tests/xmconfigdata/test-paravirt-old-pvfb-vncdisplay.cfg deleted file mode 100644 index 94c01ed..0000000 --- a/tests/xmconfigdata/test-paravirt-old-pvfb-vncdisplay.cfg +++ /dev/null @@ -1,18 +0,0 @@ -name = "XenGuest1" -uuid = "c7a5fdb0-cdaf-9455-926a-d65c16db1809" -maxmem = 579 -memory = 394 -vcpus = 1 -localtime = 0 -on_poweroff = "destroy" -on_reboot = "restart" -on_crash = "restart" -sdl = 0 -vnc = 1 -vncunused = 0 -vncdisplay = 25 -vnclisten = "127.0.0.1" -vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:94:9c,bridge=br0,script=vif-bridge" ] -bootloader = "/usr/bin/pygrub" -disk = [ "phy:/dev/HostVG/XenGuest1,xvda,w" ] diff --git a/tests/xmconfigdata/test-paravirt-old-pvfb-vncdisplay.xml b/tests/xmconfigdata/test-paravirt-old-pvfb-vncdisplay.xml deleted file mode 100644 index ce7bfb9..0000000 --- a/tests/xmconfigdata/test-paravirt-old-pvfb-vncdisplay.xml +++ /dev/null @@ -1,36 +0,0 @@ -<domain type='xen'> - <name>XenGuest1</name> - <uuid>c7a5fdb0-cdaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>592896</memory> - <currentMemory unit='KiB'>403456</currentMemory> - <vcpu placement='static'>1</vcpu> - <bootloader>/usr/bin/pygrub</bootloader> - <os> - <type arch='i686' machine='xenpv'>linux</type> - </os> - <clock offset='utc' adjustment='reset'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <devices> - <disk type='block' device='disk'> - <driver name='phy'/> - <source dev='/dev/HostVG/XenGuest1'/> - <target dev='xvda' bus='xen'/> - </disk> - <interface type='bridge'> - <mac address='00:16:3e:66:94:9c'/> - <source bridge='br0'/> - <script path='vif-bridge'/> - </interface> - <console type='pty'> - <target type='xen' port='0'/> - </console> - <input type='mouse' bus='xen'/> - <input type='keyboard' bus='xen'/> - <graphics type='vnc' port='5925' autoport='no' listen='127.0.0.1' passwd='123poi'> - <listen type='address' address='127.0.0.1'/> - </graphics> - <memballoon model='xen'/> - </devices> -</domain> diff --git a/tests/xmconfigdata/test-paravirt-old-pvfb.cfg b/tests/xmconfigdata/test-paravirt-old-pvfb.cfg deleted file mode 100755 index 9f11f5b..0000000 --- a/tests/xmconfigdata/test-paravirt-old-pvfb.cfg +++ /dev/null @@ -1,17 +0,0 @@ -name = "XenGuest1" -uuid = "c7a5fdb0-cdaf-9455-926a-d65c16db1809" -maxmem = 579 -memory = 394 -vcpus = 1 -localtime = 0 -on_poweroff = "destroy" -on_reboot = "restart" -on_crash = "restart" -sdl = 0 -vnc = 1 -vncunused = 1 -vnclisten = "127.0.0.1" -vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:94:9c,bridge=br0,script=vif-bridge" ] -bootloader = "/usr/bin/pygrub" -disk = [ "phy:/dev/HostVG/XenGuest1,xvda,w" ] diff --git a/tests/xmconfigdata/test-paravirt-old-pvfb.xml b/tests/xmconfigdata/test-paravirt-old-pvfb.xml deleted file mode 100644 index cba6dff..0000000 --- a/tests/xmconfigdata/test-paravirt-old-pvfb.xml +++ /dev/null @@ -1,36 +0,0 @@ -<domain type='xen'> - <name>XenGuest1</name> - <uuid>c7a5fdb0-cdaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>592896</memory> - <currentMemory unit='KiB'>403456</currentMemory> - <vcpu placement='static'>1</vcpu> - <bootloader>/usr/bin/pygrub</bootloader> - <os> - <type arch='i686' machine='xenpv'>linux</type> - </os> - <clock offset='utc' adjustment='reset'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <devices> - <disk type='block' device='disk'> - <driver name='phy'/> - <source dev='/dev/HostVG/XenGuest1'/> - <target dev='xvda' bus='xen'/> - </disk> - <interface type='bridge'> - <mac address='00:16:3e:66:94:9c'/> - <source bridge='br0'/> - <script path='vif-bridge'/> - </interface> - <console type='pty'> - <target type='xen' port='0'/> - </console> - <input type='mouse' bus='xen'/> - <input type='keyboard' bus='xen'/> - <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> - <listen type='address' address='127.0.0.1'/> - </graphics> - <memballoon model='xen'/> - </devices> -</domain> diff --git a/tests/xmconfigtest.c b/tests/xmconfigtest.c index 804f9ee..04535fb 100644 --- a/tests/xmconfigtest.c +++ b/tests/xmconfigtest.c @@ -214,14 +214,11 @@ mymain(void) DO_TEST_FORMAT(name, version); \ } while (0) - DO_TEST("paravirt-old-pvfb", 1); - DO_TEST("paravirt-old-pvfb-vncdisplay", 1); DO_TEST("paravirt-new-pvfb", 3); DO_TEST("paravirt-new-pvfb-vncdisplay", 3); DO_TEST("paravirt-net-e1000", 3); DO_TEST("paravirt-net-vifname", 3); DO_TEST("paravirt-vcpu", 2); - DO_TEST("fullvirt-old-cdrom", 1); DO_TEST("fullvirt-new-cdrom", 2); DO_TEST("fullvirt-utc", 2); DO_TEST("fullvirt-localtime", 2); -- 2.1.4

Remove the fullvirt-net-ioemu test since explicitly specifying 'type=ioemu' has not been needed in xm/xend for a long time. It is not used at all in xl/libxl. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- tests/xmconfigdata/test-fullvirt-net-ioemu.cfg | 25 ------------- tests/xmconfigdata/test-fullvirt-net-ioemu.xml | 49 -------------------------- tests/xmconfigtest.c | 1 - 3 files changed, 75 deletions(-) diff --git a/tests/xmconfigdata/test-fullvirt-net-ioemu.cfg b/tests/xmconfigdata/test-fullvirt-net-ioemu.cfg deleted file mode 100644 index 722f021..0000000 --- a/tests/xmconfigdata/test-fullvirt-net-ioemu.cfg +++ /dev/null @@ -1,25 +0,0 @@ -name = "XenGuest2" -uuid = "c7a5fdb2-cdaf-9455-926a-d65c16db1809" -maxmem = 579 -memory = 394 -vcpus = 1 -pae = 1 -acpi = 1 -apic = 1 -localtime = 0 -on_poweroff = "destroy" -on_reboot = "restart" -on_crash = "restart" -device_model = "/usr/lib/xen/bin/qemu-dm" -sdl = 0 -vnc = 1 -vncunused = 1 -vnclisten = "127.0.0.1" -vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] -parallel = "none" -serial = "none" -builder = "hvm" -kernel = "/usr/lib/xen/boot/hvmloader" -boot = "d" -disk = [ "phy:/dev/HostVG/XenGuest2,hda,w", "file:/root/boot.iso,hdc:cdrom,r" ] diff --git a/tests/xmconfigdata/test-fullvirt-net-ioemu.xml b/tests/xmconfigdata/test-fullvirt-net-ioemu.xml deleted file mode 100644 index ad15dde..0000000 --- a/tests/xmconfigdata/test-fullvirt-net-ioemu.xml +++ /dev/null @@ -1,49 +0,0 @@ -<domain type='xen'> - <name>XenGuest2</name> - <uuid>c7a5fdb2-cdaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>592896</memory> - <currentMemory unit='KiB'>403456</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='xenfv'>hvm</type> - <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader> - <boot dev='cdrom'/> - </os> - <features> - <acpi/> - <apic/> - <pae/> - </features> - <clock offset='utc' adjustment='reset'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <devices> - <emulator>/usr/lib/xen/bin/qemu-dm</emulator> - <disk type='block' device='disk'> - <driver name='phy'/> - <source dev='/dev/HostVG/XenGuest2'/> - <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'/> - <source file='/root/boot.iso'/> - <target dev='hdc' bus='ide'/> - <readonly/> - <address type='drive' controller='0' bus='1' target='0' unit='0'/> - </disk> - <interface type='bridge'> - <mac address='00:16:3e:66:92:9c'/> - <source bridge='xenbr1'/> - <script path='vif-bridge'/> - <model type='e1000'/> - </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> - <listen type='address' address='127.0.0.1'/> - </graphics> - <memballoon model='xen'/> - </devices> -</domain> diff --git a/tests/xmconfigtest.c b/tests/xmconfigtest.c index 04535fb..bfbd9c4 100644 --- a/tests/xmconfigtest.c +++ b/tests/xmconfigtest.c @@ -243,7 +243,6 @@ mymain(void) DO_TEST("fullvirt-sound", 2); - DO_TEST("fullvirt-net-ioemu", 2); DO_TEST("fullvirt-net-netfront", 2); DO_TEST_FORMAT("fullvirt-default-feature", 2); -- 2.1.4

Remove s-expression to XML conversion tests for old xend 3.0.2 config format. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.sexpr | 9 ----- tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml | 48 ------------------------ tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr | 9 ----- tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml | 34 ----------------- tests/sexpr2xmltest.c | 2 - 5 files changed, 102 deletions(-) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.sexpr deleted file mode 100644 index e7031dc..0000000 --- a/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.sexpr +++ /dev/null @@ -1,9 +0,0 @@ -(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\ -(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\ -(on_reboot 'restart')(on_crash 'restart')\ -(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')\ -(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')\ -(acpi 1)(vnc 1)(keymap ja)))(device (vbd (dev 'ioemu:hda')\ -(uname 'file:/root/foo.img')(mode 'w')))\ -(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ -(script 'vif-bridge')(model 'e1000')(type 'ioemu')))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml b/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml deleted file mode 100644 index ec75365..0000000 --- a/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml +++ /dev/null @@ -1,48 +0,0 @@ -<domain type='xen' id='3'> - <name>fvtest</name> - <uuid>b5d70dd2-75cd-aca5-1776-9660b059d8bc</uuid> - <memory unit='KiB'>409600</memory> - <currentMemory unit='KiB'>409600</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type>hvm</type> - <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader> - <boot dev='hd'/> - </os> - <features> - <acpi/> - </features> - <clock offset='utc' adjustment='reset'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <devices> - <emulator>/usr/lib64/xen/bin/qemu-dm</emulator> - <disk type='file' device='disk'> - <driver name='file'/> - <source file='/root/foo.img'/> - <backingStore/> - <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'/> - <source file='/root/boot.iso'/> - <backingStore/> - <target dev='hdc' bus='ide'/> - <readonly/> - <address type='drive' controller='0' bus='1' target='0' unit='0'/> - </disk> - <interface type='bridge'> - <mac address='00:16:3e:1b:b1:47'/> - <source bridge='xenbr0'/> - <script path='vif-bridge'/> - <target dev='vif3.0'/> - <model type='e1000'/> - </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> - <memballoon model='xen'/> - </devices> -</domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr deleted file mode 100644 index c825f32..0000000 --- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr +++ /dev/null @@ -1,9 +0,0 @@ -(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\ -(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')\ -(on_reboot 'destroy')(on_crash 'destroy')\ -(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\ -(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\ -(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ -core/test/5.91/x86_64/os ')(vnc 1)(vncunused 1)(vnclisten 0.0.0.0)\ -(vncpasswd 123456)(keymap ja)))(device (vbd (dev 'xvda')\ -(uname 'file:/root/some.img')(mode 'w')))) diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml deleted file mode 100644 index f5b80c8..0000000 --- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml +++ /dev/null @@ -1,34 +0,0 @@ -<domain type='xen' id='6'> - <name>pvtest</name> - <uuid>596a5d21-71f4-8fb2-e068-e2386a5c413e</uuid> - <memory unit='KiB'>430080</memory> - <currentMemory unit='KiB'>430080</currentMemory> - <vcpu placement='static'>2</vcpu> - <os> - <type>linux</type> - <kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel> - <initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd> - <cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_... </cmdline> - </os> - <clock offset='utc' adjustment='reset'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>destroy</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <disk type='file' device='disk'> - <driver name='file'/> - <source file='/root/some.img'/> - <backingStore/> - <target dev='xvda' bus='xen'/> - </disk> - <console type='pty'> - <target type='xen' port='0'/> - </console> - <input type='mouse' bus='xen'/> - <input type='keyboard' bus='xen'/> - <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' keymap='ja'> - <listen type='address' address='0.0.0.0'/> - </graphics> - <memballoon model='xen'/> - </devices> -</domain> diff --git a/tests/sexpr2xmltest.c b/tests/sexpr2xmltest.c index f7f61cc..c95de9f 100644 --- a/tests/sexpr2xmltest.c +++ b/tests/sexpr2xmltest.c @@ -136,7 +136,6 @@ mymain(void) DO_TEST("fv", "fv", 1); DO_TEST("pv", "pv", 2); DO_TEST("fv-v2", "fv-v2", 2); - DO_TEST("pv-vfb-orig", "pv-vfb-orig", 2); DO_TEST("pv-vfb-new", "pv-vfb-new", 3); DO_TEST("pv-vfb-new-vncdisplay", "pv-vfb-new-vncdisplay", 3); DO_TEST("pv-vfb-type-crash", "pv-vfb-type-crash", 3); @@ -185,7 +184,6 @@ mymain(void) DO_TEST("fv-sound", "fv-sound", 1); DO_TEST("fv-sound-all", "fv-sound-all", 1); - DO_TEST("fv-net-ioemu", "fv-net-ioemu", 1); DO_TEST("fv-net-netfront", "fv-net-netfront", 1); DO_TEST("fv-empty-kernel", "fv-empty-kernel", 1); -- 2.1.4

Remove XML to s-expression converstion tests for old xend 3.0.2 config format. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.sexpr | 9 ------- tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.xml | 31 ------------------------ tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr | 10 -------- tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.xml | 23 ------------------ tests/xml2sexprtest.c | 7 ------ 5 files changed, 80 deletions(-) diff --git a/tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.sexpr deleted file mode 100644 index 20f9228..0000000 --- a/tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.sexpr +++ /dev/null @@ -1,9 +0,0 @@ -(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\ -(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\ -(on_reboot 'restart')(on_crash 'restart')\ -(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(acpi 1)\ -(usb 1)(parallel none)(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')\ -(vnc 1)))(localtime 0)\ -(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')\ -(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ -(script 'vif-bridge')(model 'e1000')(type ioemu))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.xml b/tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.xml deleted file mode 100644 index 42185d5..0000000 --- a/tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.xml +++ /dev/null @@ -1,31 +0,0 @@ -<domain type='xen'> - <name>fvtest</name> - <uuid>b5d70dd275cdaca517769660b059d8bc</uuid> - <os> - <type>hvm</type> - <loader>/usr/lib/xen/boot/hvmloader</loader> - <boot dev='hd'/> - </os> - <memory unit='KiB'>409600</memory> - <vcpu>1</vcpu> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <features> - <acpi/> - </features> - <devices> - <emulator>/usr/lib64/xen/bin/qemu-dm</emulator> - <interface type='bridge'> - <source bridge='xenbr0'/> - <mac address='00:16:3e:1b:b1:47'/> - <script path='vif-bridge'/> - <model type='e1000'/> - </interface> - <disk type='file'> - <source file='/root/foo.img'/> - <target dev='ioemu:hda'/> - </disk> - <graphics type='vnc' port='5917' keymap='ja'/> - </devices> -</domain> diff --git a/tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr b/tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr deleted file mode 100644 index c2c1290..0000000 --- a/tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr +++ /dev/null @@ -1,10 +0,0 @@ -(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\ -(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\ -(on_reboot 'destroy')(on_crash 'destroy')\ -(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\ -(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\ -(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ -core/test/5.91/x86_64/os ')(vnc 1)(vncunused 0)(vncdisplay 6)\ -(vnclisten '127.0.0.1')(vncpasswd '123456')(keymap 'ja')))\ -(localtime 0)\ -(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.xml b/tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.xml deleted file mode 100644 index f5f15a8..0000000 --- a/tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.xml +++ /dev/null @@ -1,23 +0,0 @@ -<domain type='xen' id='6'> - <name>pvtest</name> - <uuid>596a5d2171f48fb2e068e2386a5c413e</uuid> - <os> - <type>linux</type> - <kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel> - <initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd> - <cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_... </cmdline> - </os> - <memory unit='KiB'>430080</memory> - <vcpu>2</vcpu> - <on_poweroff>destroy</on_poweroff> - <on_reboot>destroy</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <disk type='file' device='disk'> - <driver name='file'/> - <source file='/root/some.img'/> - <target dev='xvda'/> - </disk> - <graphics type='vnc' port='5906' listen="127.0.0.1" passwd="123456" keymap="ja"/> - </devices> -</domain> diff --git a/tests/xml2sexprtest.c b/tests/xml2sexprtest.c index 47c9db8..d884a4b 100644 --- a/tests/xml2sexprtest.c +++ b/tests/xml2sexprtest.c @@ -107,12 +107,6 @@ mymain(void) DO_TEST("pv", "pv", "pvtest", 2); DO_TEST("fv", "fv-v2", "fvtest", 2); DO_TEST("fv-vncunused", "fv-vncunused", "fvtest", 2); -#ifdef WITH_RHEL5_API - /* RHEL-5 Xen doesn't support the old style vnc configuration */ - DO_TEST("pv-vfb-orig", "pv-vfb-new", "pvtest", 2); -#else - DO_TEST("pv-vfb-orig", "pv-vfb-orig", "pvtest", 2); -#endif DO_TEST("pv-vfb-new", "pv-vfb-new", "pvtest", 3); DO_TEST("pv-vfb-new-auto", "pv-vfb-new-auto", "pvtest", 3); DO_TEST("pv-bootloader", "pv-bootloader", "pvtest", 1); @@ -162,7 +156,6 @@ mymain(void) DO_TEST("fv-sound", "fv-sound", "fvtest", 1); - DO_TEST("fv-net-ioemu", "fv-net-ioemu", "fvtest", 1); DO_TEST("fv-net-netfront", "fv-net-netfront", "fvtest", 1); DO_TEST("boot-grub", "boot-grub", "fvtest", 1); -- 2.1.4

Change all tests to use the latest XEND_CONFIG_VERSION (XEND_CONFIG_VERSION_3_1_0 = 4). Fix tests that do not conform to the latest version. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- .../test-fullvirt-direct-kernel-boot.cfg | 3 +- .../test-fullvirt-direct-kernel-boot.xml | 2 +- tests/xlconfigdata/test-fullvirt-multiusb.cfg | 3 +- tests/xlconfigdata/test-fullvirt-multiusb.xml | 2 +- tests/xlconfigdata/test-new-disk.cfg | 3 +- tests/xlconfigdata/test-new-disk.xml | 2 +- tests/xlconfigdata/test-spice-features.cfg | 3 +- tests/xlconfigdata/test-spice-features.xml | 2 +- tests/xlconfigdata/test-spice.cfg | 3 +- tests/xlconfigdata/test-spice.xml | 2 +- tests/xlconfigtest.c | 29 ++++--- tests/xmconfigdata/test-escape-paths.cfg | 5 +- tests/xmconfigdata/test-escape-paths.xml | 2 +- .../xmconfigdata/test-fullvirt-default-feature.cfg | 5 +- .../xmconfigdata/test-fullvirt-default-feature.xml | 2 +- tests/xmconfigdata/test-fullvirt-force-hpet.cfg | 5 +- tests/xmconfigdata/test-fullvirt-force-hpet.xml | 2 +- tests/xmconfigdata/test-fullvirt-force-nohpet.cfg | 5 +- tests/xmconfigdata/test-fullvirt-force-nohpet.xml | 2 +- tests/xmconfigdata/test-fullvirt-localtime.cfg | 5 +- tests/xmconfigdata/test-fullvirt-localtime.xml | 2 +- tests/xmconfigdata/test-fullvirt-net-netfront.cfg | 3 + tests/xmconfigdata/test-fullvirt-net-netfront.xml | 2 +- tests/xmconfigdata/test-fullvirt-new-cdrom.cfg | 5 +- tests/xmconfigdata/test-fullvirt-new-cdrom.xml | 2 +- tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg | 5 +- tests/xmconfigdata/test-fullvirt-parallel-tcp.xml | 2 +- .../test-fullvirt-serial-dev-2-ports.cfg | 5 +- .../test-fullvirt-serial-dev-2-ports.xml | 2 +- .../test-fullvirt-serial-dev-2nd-port.cfg | 5 +- .../test-fullvirt-serial-dev-2nd-port.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-file.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-file.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-null.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-null.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-pipe.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-pipe.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-pty.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-pty.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-stdio.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-stdio.xml | 2 +- .../test-fullvirt-serial-tcp-telnet.cfg | 5 +- .../test-fullvirt-serial-tcp-telnet.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-tcp.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-tcp.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-udp.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-udp.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-unix.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-unix.xml | 2 +- tests/xmconfigdata/test-fullvirt-sound.cfg | 5 +- tests/xmconfigdata/test-fullvirt-sound.xml | 2 +- tests/xmconfigdata/test-fullvirt-usbmouse.cfg | 5 +- tests/xmconfigdata/test-fullvirt-usbmouse.xml | 2 +- tests/xmconfigdata/test-fullvirt-usbtablet.cfg | 5 +- tests/xmconfigdata/test-fullvirt-usbtablet.xml | 2 +- tests/xmconfigdata/test-fullvirt-utc.cfg | 5 +- tests/xmconfigdata/test-fullvirt-utc.xml | 2 +- tests/xmconfigdata/test-no-source-cdrom.cfg | 5 +- tests/xmconfigdata/test-no-source-cdrom.xml | 2 +- tests/xmconfigdata/test-pci-devs.cfg | 5 +- tests/xmconfigdata/test-pci-devs.xml | 2 +- tests/xmconfigtest.c | 89 +++++++++++----------- 62 files changed, 197 insertions(+), 119 deletions(-) diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.cfg b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.cfg index 1fac3a5..f452af6 100644 --- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.cfg +++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.cfg @@ -8,6 +8,7 @@ acpi = 1 apic = 1 hap = 0 viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -18,7 +19,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "none" builder = "hvm" diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml index d59aa21..f750e02 100644 --- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml +++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml @@ -17,7 +17,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xlconfigdata/test-fullvirt-multiusb.cfg b/tests/xlconfigdata/test-fullvirt-multiusb.cfg index 68a2614..d0482a8 100755 --- a/tests/xlconfigdata/test-fullvirt-multiusb.cfg +++ b/tests/xlconfigdata/test-fullvirt-multiusb.cfg @@ -8,6 +8,7 @@ acpi = 1 apic = 1 hap = 0 viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -18,7 +19,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "none" builder = "hvm" diff --git a/tests/xlconfigdata/test-fullvirt-multiusb.xml b/tests/xlconfigdata/test-fullvirt-multiusb.xml index 0e6d0b6..9e5cad9 100644 --- a/tests/xlconfigdata/test-fullvirt-multiusb.xml +++ b/tests/xlconfigdata/test-fullvirt-multiusb.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xlconfigdata/test-new-disk.cfg b/tests/xlconfigdata/test-new-disk.cfg index 9e9f106..9b9fb36 100644 --- a/tests/xlconfigdata/test-new-disk.cfg +++ b/tests/xlconfigdata/test-new-disk.cfg @@ -8,6 +8,7 @@ acpi = 1 apic = 1 hap = 0 viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -17,7 +18,7 @@ sdl = 0 vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "none" builder = "hvm" diff --git a/tests/xlconfigdata/test-new-disk.xml b/tests/xlconfigdata/test-new-disk.xml index 718a2da..49f6dbe 100644 --- a/tests/xlconfigdata/test-new-disk.xml +++ b/tests/xlconfigdata/test-new-disk.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xlconfigdata/test-spice-features.cfg b/tests/xlconfigdata/test-spice-features.cfg index c3e7111..152cb27 100644 --- a/tests/xlconfigdata/test-spice-features.cfg +++ b/tests/xlconfigdata/test-spice-features.cfg @@ -8,12 +8,13 @@ acpi = 1 apic = 1 hap = 0 viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" on_crash = "restart" device_model = "/usr/lib/xen/bin/qemu-dm" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "none" builder = "hvm" diff --git a/tests/xlconfigdata/test-spice-features.xml b/tests/xlconfigdata/test-spice-features.xml index 3160c2b..d40a671 100644 --- a/tests/xlconfigdata/test-spice-features.xml +++ b/tests/xlconfigdata/test-spice-features.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xlconfigdata/test-spice.cfg b/tests/xlconfigdata/test-spice.cfg index d89f2ba..1a96114 100644 --- a/tests/xlconfigdata/test-spice.cfg +++ b/tests/xlconfigdata/test-spice.cfg @@ -8,12 +8,13 @@ acpi = 1 apic = 1 hap = 0 viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" on_crash = "restart" device_model = "/usr/lib/xen/bin/qemu-dm" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "none" builder = "hvm" diff --git a/tests/xlconfigdata/test-spice.xml b/tests/xlconfigdata/test-spice.xml index 30415fb..d15557e 100644 --- a/tests/xlconfigdata/test-spice.xml +++ b/tests/xlconfigdata/test-spice.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xlconfigtest.c b/tests/xlconfigtest.c index 21f760d..31865ff 100644 --- a/tests/xlconfigtest.c +++ b/tests/xlconfigtest.c @@ -46,7 +46,7 @@ static virDomainXMLOptionPtr xmlopt; * parses the xml, creates a domain def and compare with equivalent xm config */ static int -testCompareParseXML(const char *xmcfg, const char *xml, int xendConfigVersion) +testCompareParseXML(const char *xmcfg, const char *xml) { char *gotxmcfgData = NULL; virConfPtr conf = NULL; @@ -70,7 +70,7 @@ testCompareParseXML(const char *xmcfg, const char *xml, int xendConfigVersion) goto fail; } - if (!(conf = xenFormatXL(def, conn, xendConfigVersion))) + if (!(conf = xenFormatXL(def, conn, 4))) goto fail; if (virConfWriteMem(gotxmcfgData, &wrote, conf) < 0) @@ -95,7 +95,7 @@ testCompareParseXML(const char *xmcfg, const char *xml, int xendConfigVersion) * parses the xl config, develops domain def and compares with equivalent xm config */ static int -testCompareFormatXML(const char *xmcfg, const char *xml, int xendConfigVersion) +testCompareFormatXML(const char *xmcfg, const char *xml) { char *xmcfgData = NULL; char *gotxml = NULL; @@ -113,7 +113,7 @@ testCompareFormatXML(const char *xmcfg, const char *xml, int xendConfigVersion) if (!(conf = virConfReadMem(xmcfgData, strlen(xmcfgData), 0))) goto fail; - if (!(def = xenParseXL(conf, caps, xmlopt, xendConfigVersion))) + if (!(def = xenParseXL(conf, caps, xmlopt, 4))) goto fail; if (!(gotxml = virDomainDefFormat(def, VIR_DOMAIN_XML_INACTIVE | @@ -139,7 +139,6 @@ testCompareFormatXML(const char *xmcfg, const char *xml, int xendConfigVersion) struct testInfo { const char *name; - int version; int mode; }; @@ -158,9 +157,9 @@ testCompareHelper(const void *data) goto cleanup; if (info->mode == 0) - result = testCompareParseXML(cfg, xml, info->version); + result = testCompareParseXML(cfg, xml); else - result = testCompareFormatXML(cfg, xml, info->version); + result = testCompareFormatXML(cfg, xml); cleanup: VIR_FREE(xml); @@ -181,10 +180,10 @@ mymain(void) if (!(xmlopt = libxlCreateXMLConf())) return EXIT_FAILURE; -#define DO_TEST(name, version) \ +#define DO_TEST(name) \ do { \ - struct testInfo info0 = { name, version, 0 }; \ - struct testInfo info1 = { name, version, 1 }; \ + struct testInfo info0 = { name, 0 }; \ + struct testInfo info1 = { name, 1 }; \ if (virtTestRun("Xen XM-2-XML Parse " name, \ testCompareHelper, &info0) < 0) \ ret = -1; \ @@ -193,15 +192,15 @@ mymain(void) ret = -1; \ } while (0) - DO_TEST("new-disk", 3); - DO_TEST("spice", 3); - DO_TEST("spice-features", 3); + DO_TEST("new-disk"); + DO_TEST("spice"); + DO_TEST("spice-features"); #ifdef LIBXL_HAVE_BUILDINFO_USBDEVICE_LIST - DO_TEST("fullvirt-multiusb", 3); + DO_TEST("fullvirt-multiusb"); #endif #ifdef LIBXL_HAVE_BUILDINFO_KERNEL - DO_TEST("fullvirt-direct-kernel-boot", 3); + DO_TEST("fullvirt-direct-kernel-boot"); #endif virObjectUnref(caps); diff --git a/tests/xmconfigdata/test-escape-paths.cfg b/tests/xmconfigdata/test-escape-paths.cfg index 64c9eed..98570bd 100644 --- a/tests/xmconfigdata/test-escape-paths.cfg +++ b/tests/xmconfigdata/test-escape-paths.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -16,7 +19,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "none" soundhw = "sb16,es1370" diff --git a/tests/xmconfigdata/test-escape-paths.xml b/tests/xmconfigdata/test-escape-paths.xml index d2ec843..db01910 100644 --- a/tests/xmconfigdata/test-escape-paths.xml +++ b/tests/xmconfigdata/test-escape-paths.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xmconfigdata/test-fullvirt-default-feature.cfg b/tests/xmconfigdata/test-fullvirt-default-feature.cfg index 5ce234f..c9d072d 100644 --- a/tests/xmconfigdata/test-fullvirt-default-feature.cfg +++ b/tests/xmconfigdata/test-fullvirt-default-feature.cfg @@ -7,6 +7,9 @@ builder = "hvm" kernel = "/usr/lib/xen/boot/hvmloader" boot = "d" hpet = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -17,7 +20,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "none" disk = [ "phy:/dev/HostVG/XenGuest2,hda,w", "file:/root/boot.iso,hdc:cdrom,r" ] diff --git a/tests/xmconfigdata/test-fullvirt-default-feature.xml b/tests/xmconfigdata/test-fullvirt-default-feature.xml index 06ad44e..231aea6 100644 --- a/tests/xmconfigdata/test-fullvirt-default-feature.xml +++ b/tests/xmconfigdata/test-fullvirt-default-feature.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'> + <clock offset='variable' adjustment='0' basis='utc'> <timer name='hpet' present='yes'/> </clock> <on_poweroff>destroy</on_poweroff> diff --git a/tests/xmconfigdata/test-fullvirt-force-hpet.cfg b/tests/xmconfigdata/test-fullvirt-force-hpet.cfg index 0bd76d3..b89ed42 100644 --- a/tests/xmconfigdata/test-fullvirt-force-hpet.cfg +++ b/tests/xmconfigdata/test-fullvirt-force-hpet.cfg @@ -6,7 +6,10 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 hpet = 1 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -17,7 +20,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "none" builder = "hvm" diff --git a/tests/xmconfigdata/test-fullvirt-force-hpet.xml b/tests/xmconfigdata/test-fullvirt-force-hpet.xml index 06ad44e..231aea6 100644 --- a/tests/xmconfigdata/test-fullvirt-force-hpet.xml +++ b/tests/xmconfigdata/test-fullvirt-force-hpet.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'> + <clock offset='variable' adjustment='0' basis='utc'> <timer name='hpet' present='yes'/> </clock> <on_poweroff>destroy</on_poweroff> diff --git a/tests/xmconfigdata/test-fullvirt-force-nohpet.cfg b/tests/xmconfigdata/test-fullvirt-force-nohpet.cfg index a4c2fa0..99e6d38 100644 --- a/tests/xmconfigdata/test-fullvirt-force-nohpet.cfg +++ b/tests/xmconfigdata/test-fullvirt-force-nohpet.cfg @@ -6,7 +6,10 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 hpet = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -17,7 +20,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "none" builder = "hvm" diff --git a/tests/xmconfigdata/test-fullvirt-force-nohpet.xml b/tests/xmconfigdata/test-fullvirt-force-nohpet.xml index 148c372..ef216c3 100644 --- a/tests/xmconfigdata/test-fullvirt-force-nohpet.xml +++ b/tests/xmconfigdata/test-fullvirt-force-nohpet.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'> + <clock offset='variable' adjustment='0' basis='utc'> <timer name='hpet' present='no'/> </clock> <on_poweroff>destroy</on_poweroff> diff --git a/tests/xmconfigdata/test-fullvirt-localtime.cfg b/tests/xmconfigdata/test-fullvirt-localtime.cfg index 38c558b..5d07423 100755 --- a/tests/xmconfigdata/test-fullvirt-localtime.cfg +++ b/tests/xmconfigdata/test-fullvirt-localtime.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 1 on_poweroff = "destroy" on_reboot = "restart" @@ -16,7 +19,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "none" builder = "hvm" diff --git a/tests/xmconfigdata/test-fullvirt-localtime.xml b/tests/xmconfigdata/test-fullvirt-localtime.xml index 5db392c..0162246 100644 --- a/tests/xmconfigdata/test-fullvirt-localtime.xml +++ b/tests/xmconfigdata/test-fullvirt-localtime.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='localtime' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xmconfigdata/test-fullvirt-net-netfront.cfg b/tests/xmconfigdata/test-fullvirt-net-netfront.cfg index 21d81be..da1d368 100644 --- a/tests/xmconfigdata/test-fullvirt-net-netfront.cfg +++ b/tests/xmconfigdata/test-fullvirt-net-netfront.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" diff --git a/tests/xmconfigdata/test-fullvirt-net-netfront.xml b/tests/xmconfigdata/test-fullvirt-net-netfront.xml index 4d23802..172a530 100644 --- a/tests/xmconfigdata/test-fullvirt-net-netfront.xml +++ b/tests/xmconfigdata/test-fullvirt-net-netfront.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xmconfigdata/test-fullvirt-new-cdrom.cfg b/tests/xmconfigdata/test-fullvirt-new-cdrom.cfg index 722f021..67e2511 100755 --- a/tests/xmconfigdata/test-fullvirt-new-cdrom.cfg +++ b/tests/xmconfigdata/test-fullvirt-new-cdrom.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -16,7 +19,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "none" builder = "hvm" diff --git a/tests/xmconfigdata/test-fullvirt-new-cdrom.xml b/tests/xmconfigdata/test-fullvirt-new-cdrom.xml index ad15dde..6544cb3 100644 --- a/tests/xmconfigdata/test-fullvirt-new-cdrom.xml +++ b/tests/xmconfigdata/test-fullvirt-new-cdrom.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg b/tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg index 0d999ad..1bbce56 100755 --- a/tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg +++ b/tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -16,7 +19,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "tcp:127.0.0.1:7777" serial = "none" builder = "hvm" diff --git a/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml b/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml index a2897f1..5aef2de 100644 --- a/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml +++ b/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.cfg b/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.cfg index f0fb178..c722792 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -16,7 +19,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = [ "/dev/ttyS0", "/dev/ttyS1" ] builder = "hvm" diff --git a/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml b/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml index 5cbca37..a9e68b5 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.cfg b/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.cfg index b2cb1ea..4baffe6 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -16,7 +19,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = [ "none", "/dev/ttyS1" ] builder = "hvm" diff --git a/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml b/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml index 27c29c6..5564fa8 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xmconfigdata/test-fullvirt-serial-file.cfg b/tests/xmconfigdata/test-fullvirt-serial-file.cfg index 65c09e8..3d26e26 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-file.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-file.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -16,7 +19,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "file:/tmp/serial.log" builder = "hvm" diff --git a/tests/xmconfigdata/test-fullvirt-serial-file.xml b/tests/xmconfigdata/test-fullvirt-serial-file.xml index 092c062..f592d44 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-file.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-file.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xmconfigdata/test-fullvirt-serial-null.cfg b/tests/xmconfigdata/test-fullvirt-serial-null.cfg index 4c83216..6b0f2a4 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-null.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-null.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -16,7 +19,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "null" builder = "hvm" diff --git a/tests/xmconfigdata/test-fullvirt-serial-null.xml b/tests/xmconfigdata/test-fullvirt-serial-null.xml index a1394d9..78142a7 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-null.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-null.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xmconfigdata/test-fullvirt-serial-pipe.cfg b/tests/xmconfigdata/test-fullvirt-serial-pipe.cfg index 09bfd3b..2bd8377 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-pipe.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-pipe.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -16,7 +19,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "pipe:/tmp/serial.pipe" builder = "hvm" diff --git a/tests/xmconfigdata/test-fullvirt-serial-pipe.xml b/tests/xmconfigdata/test-fullvirt-serial-pipe.xml index 321d309..d3f0653 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-pipe.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-pipe.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xmconfigdata/test-fullvirt-serial-pty.cfg b/tests/xmconfigdata/test-fullvirt-serial-pty.cfg index e5d7c93..022f975 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-pty.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-pty.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -16,7 +19,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "pty" builder = "hvm" diff --git a/tests/xmconfigdata/test-fullvirt-serial-pty.xml b/tests/xmconfigdata/test-fullvirt-serial-pty.xml index 05c82fe..bc8e182 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-pty.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-pty.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xmconfigdata/test-fullvirt-serial-stdio.cfg b/tests/xmconfigdata/test-fullvirt-serial-stdio.cfg index 5f5628c..c339a94 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-stdio.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-stdio.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -16,7 +19,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "stdio" builder = "hvm" diff --git a/tests/xmconfigdata/test-fullvirt-serial-stdio.xml b/tests/xmconfigdata/test-fullvirt-serial-stdio.xml index c6c702c..9244a7c 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-stdio.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-stdio.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg index e28b97b..56eefac 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -16,7 +19,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "telnet:127.0.0.1:9999,server,nowait" builder = "hvm" diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml index 72c169e..2ffdc8a 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp.cfg b/tests/xmconfigdata/test-fullvirt-serial-tcp.cfg index 64b709d..d569852 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-tcp.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-tcp.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -16,7 +19,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "tcp:127.0.0.1:7777" builder = "hvm" diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp.xml b/tests/xmconfigdata/test-fullvirt-serial-tcp.xml index ab179ec..ff7ec9b 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-tcp.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-tcp.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xmconfigdata/test-fullvirt-serial-udp.cfg b/tests/xmconfigdata/test-fullvirt-serial-udp.cfg index acf594d..b1ef8f5 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-udp.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-udp.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -16,7 +19,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "udp:127.0.0.1:9999@0.0.0.0:99998" builder = "hvm" diff --git a/tests/xmconfigdata/test-fullvirt-serial-udp.xml b/tests/xmconfigdata/test-fullvirt-serial-udp.xml index 8c8d19a..f2f2b1f 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-udp.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-udp.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xmconfigdata/test-fullvirt-serial-unix.cfg b/tests/xmconfigdata/test-fullvirt-serial-unix.cfg index 1b7da43..30f0399 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-unix.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-unix.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -16,7 +19,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "unix:/tmp/serial.sock,server,nowait" builder = "hvm" diff --git a/tests/xmconfigdata/test-fullvirt-serial-unix.xml b/tests/xmconfigdata/test-fullvirt-serial-unix.xml index 0e25cac..eaa484b 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-unix.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-unix.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xmconfigdata/test-fullvirt-sound.cfg b/tests/xmconfigdata/test-fullvirt-sound.cfg index c621fb1..c11336a 100644 --- a/tests/xmconfigdata/test-fullvirt-sound.cfg +++ b/tests/xmconfigdata/test-fullvirt-sound.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -16,7 +19,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "none" soundhw = "sb16,es1370" diff --git a/tests/xmconfigdata/test-fullvirt-sound.xml b/tests/xmconfigdata/test-fullvirt-sound.xml index 25364eb..6ee3dfd 100644 --- a/tests/xmconfigdata/test-fullvirt-sound.xml +++ b/tests/xmconfigdata/test-fullvirt-sound.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xmconfigdata/test-fullvirt-usbmouse.cfg b/tests/xmconfigdata/test-fullvirt-usbmouse.cfg index c8004e7..33738ad 100755 --- a/tests/xmconfigdata/test-fullvirt-usbmouse.cfg +++ b/tests/xmconfigdata/test-fullvirt-usbmouse.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -16,7 +19,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "none" builder = "hvm" diff --git a/tests/xmconfigdata/test-fullvirt-usbmouse.xml b/tests/xmconfigdata/test-fullvirt-usbmouse.xml index c7526ae..5d739f1 100644 --- a/tests/xmconfigdata/test-fullvirt-usbmouse.xml +++ b/tests/xmconfigdata/test-fullvirt-usbmouse.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xmconfigdata/test-fullvirt-usbtablet.cfg b/tests/xmconfigdata/test-fullvirt-usbtablet.cfg index 4f2417b..8e222bb 100755 --- a/tests/xmconfigdata/test-fullvirt-usbtablet.cfg +++ b/tests/xmconfigdata/test-fullvirt-usbtablet.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -16,7 +19,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "none" builder = "hvm" diff --git a/tests/xmconfigdata/test-fullvirt-usbtablet.xml b/tests/xmconfigdata/test-fullvirt-usbtablet.xml index aa16eb1..9933ef7 100644 --- a/tests/xmconfigdata/test-fullvirt-usbtablet.xml +++ b/tests/xmconfigdata/test-fullvirt-usbtablet.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xmconfigdata/test-fullvirt-utc.cfg b/tests/xmconfigdata/test-fullvirt-utc.cfg index 722f021..67e2511 100755 --- a/tests/xmconfigdata/test-fullvirt-utc.cfg +++ b/tests/xmconfigdata/test-fullvirt-utc.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" @@ -16,7 +19,7 @@ vnc = 1 vncunused = 1 vnclisten = "127.0.0.1" vncpasswd = "123poi" -vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] parallel = "none" serial = "none" builder = "hvm" diff --git a/tests/xmconfigdata/test-fullvirt-utc.xml b/tests/xmconfigdata/test-fullvirt-utc.xml index ad15dde..6544cb3 100644 --- a/tests/xmconfigdata/test-fullvirt-utc.xml +++ b/tests/xmconfigdata/test-fullvirt-utc.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/xmconfigdata/test-no-source-cdrom.cfg b/tests/xmconfigdata/test-no-source-cdrom.cfg index 8d00618..7098005 100644 --- a/tests/xmconfigdata/test-no-source-cdrom.cfg +++ b/tests/xmconfigdata/test-no-source-cdrom.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "destroy" @@ -14,7 +17,7 @@ device_model = "/usr/lib/xen/bin/qemu-dm" sdl = 0 vnc = 1 vncunused = 1 -vif = [ "mac=00:16:3e:0a:7b:39,bridge=xenbr0,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:0a:7b:39,bridge=xenbr0,script=vif-bridge,model=e1000" ] parallel = "none" serial = "pty" builder = "hvm" diff --git a/tests/xmconfigdata/test-no-source-cdrom.xml b/tests/xmconfigdata/test-no-source-cdrom.xml index a0952e8..08ee701 100644 --- a/tests/xmconfigdata/test-no-source-cdrom.xml +++ b/tests/xmconfigdata/test-no-source-cdrom.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>destroy</on_reboot> <on_crash>destroy</on_crash> diff --git a/tests/xmconfigdata/test-pci-devs.cfg b/tests/xmconfigdata/test-pci-devs.cfg index a90dd94..777314f 100644 --- a/tests/xmconfigdata/test-pci-devs.cfg +++ b/tests/xmconfigdata/test-pci-devs.cfg @@ -6,6 +6,9 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "destroy" @@ -14,7 +17,7 @@ device_model = "/usr/lib/xen/bin/qemu-dm" sdl = 0 vnc = 1 vncunused = 1 -vif = [ "mac=00:16:3e:0a:7b:39,bridge=xenbr0,script=vif-bridge,model=e1000,type=ioemu" ] +vif = [ "mac=00:16:3e:0a:7b:39,bridge=xenbr0,script=vif-bridge,model=e1000" ] pci = [ "0001:0c:1b.2", "0000:01:13.0" ] parallel = "none" serial = "pty" diff --git a/tests/xmconfigdata/test-pci-devs.xml b/tests/xmconfigdata/test-pci-devs.xml index bdb1e82..31db26f 100644 --- a/tests/xmconfigdata/test-pci-devs.xml +++ b/tests/xmconfigdata/test-pci-devs.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>destroy</on_reboot> <on_crash>destroy</on_crash> diff --git a/tests/xmconfigtest.c b/tests/xmconfigtest.c index bfbd9c4..f2705eb 100644 --- a/tests/xmconfigtest.c +++ b/tests/xmconfigtest.c @@ -43,7 +43,7 @@ static virCapsPtr caps; static virDomainXMLOptionPtr xmlopt; static int -testCompareParseXML(const char *xmcfg, const char *xml, int xendConfigVersion) +testCompareParseXML(const char *xmcfg, const char *xml) { char *gotxmcfgData = NULL; virConfPtr conf = NULL; @@ -60,7 +60,7 @@ testCompareParseXML(const char *xmcfg, const char *xml, int xendConfigVersion) if (!conn) goto fail; /* Many puppies died to bring you this code. */ - priv.xendConfigVersion = xendConfigVersion; + priv.xendConfigVersion = 4; priv.caps = caps; conn->privateData = &priv; @@ -73,7 +73,7 @@ testCompareParseXML(const char *xmcfg, const char *xml, int xendConfigVersion) goto fail; } - if (!(conf = xenFormatXM(conn, def, xendConfigVersion))) + if (!(conf = xenFormatXM(conn, def, 4))) goto fail; if (virConfWriteMem(gotxmcfgData, &wrote, conf) < 0) @@ -96,7 +96,7 @@ testCompareParseXML(const char *xmcfg, const char *xml, int xendConfigVersion) } static int -testCompareFormatXML(const char *xmcfg, const char *xml, int xendConfigVersion) +testCompareFormatXML(const char *xmcfg, const char *xml) { char *xmcfgData = NULL; char *gotxml = NULL; @@ -113,7 +113,7 @@ testCompareFormatXML(const char *xmcfg, const char *xml, int xendConfigVersion) goto fail; /* Many puppies died to bring you this code. */ - priv.xendConfigVersion = xendConfigVersion; + priv.xendConfigVersion = 4; priv.caps = caps; conn->privateData = &priv; @@ -146,7 +146,6 @@ testCompareFormatXML(const char *xmcfg, const char *xml, int xendConfigVersion) struct testInfo { const char *name; - int version; int mode; }; @@ -166,9 +165,9 @@ testCompareHelper(const void *data) goto cleanup; if (info->mode == 0) - result = testCompareParseXML(cfg, xml, info->version); + result = testCompareParseXML(cfg, xml); else - result = testCompareFormatXML(cfg, xml, info->version); + result = testCompareFormatXML(cfg, xml); cleanup: VIR_FREE(xml); @@ -190,66 +189,66 @@ mymain(void) if (!(xmlopt = xenDomainXMLConfInit())) return EXIT_FAILURE; -#define DO_TEST_PARSE(name, version) \ +#define DO_TEST_PARSE(name) \ do { \ - struct testInfo info0 = { name, version, 0 }; \ + struct testInfo info0 = { name, 0 }; \ if (virtTestRun("Xen XM-2-XML Parse " name, \ testCompareHelper, &info0) < 0) \ ret = -1; \ } while (0) -#define DO_TEST_FORMAT(name, version) \ +#define DO_TEST_FORMAT(name) \ do { \ - struct testInfo info1 = { name, version, 1 }; \ + struct testInfo info1 = { name, 1 }; \ if (virtTestRun("Xen XM-2-XML Format " name, \ testCompareHelper, &info1) < 0) \ ret = -1; \ } while (0) -#define DO_TEST(name, version) \ +#define DO_TEST(name) \ do { \ - DO_TEST_PARSE(name, version); \ - DO_TEST_FORMAT(name, version); \ + DO_TEST_PARSE(name); \ + DO_TEST_FORMAT(name); \ } while (0) - DO_TEST("paravirt-new-pvfb", 3); - DO_TEST("paravirt-new-pvfb-vncdisplay", 3); - DO_TEST("paravirt-net-e1000", 3); - DO_TEST("paravirt-net-vifname", 3); - DO_TEST("paravirt-vcpu", 2); - DO_TEST("fullvirt-new-cdrom", 2); - DO_TEST("fullvirt-utc", 2); - DO_TEST("fullvirt-localtime", 2); - DO_TEST("fullvirt-usbtablet", 2); - DO_TEST("fullvirt-usbmouse", 2); - DO_TEST("fullvirt-serial-file", 2); - DO_TEST("fullvirt-serial-dev-2-ports", 2); - DO_TEST("fullvirt-serial-dev-2nd-port", 2); - DO_TEST("fullvirt-serial-null", 2); - DO_TEST("fullvirt-serial-pipe", 2); - DO_TEST("fullvirt-serial-pty", 2); - DO_TEST("fullvirt-serial-stdio", 2); - DO_TEST("fullvirt-serial-tcp", 2); - DO_TEST("fullvirt-serial-tcp-telnet", 2); - DO_TEST("fullvirt-serial-udp", 2); - DO_TEST("fullvirt-serial-unix", 2); + DO_TEST("paravirt-new-pvfb"); + DO_TEST("paravirt-new-pvfb-vncdisplay"); + DO_TEST("paravirt-net-e1000"); + DO_TEST("paravirt-net-vifname"); + DO_TEST("paravirt-vcpu"); + DO_TEST("fullvirt-new-cdrom"); + DO_TEST("fullvirt-utc"); + DO_TEST("fullvirt-localtime"); + DO_TEST("fullvirt-usbtablet"); + DO_TEST("fullvirt-usbmouse"); + DO_TEST("fullvirt-serial-file"); + DO_TEST("fullvirt-serial-dev-2-ports"); + DO_TEST("fullvirt-serial-dev-2nd-port"); + DO_TEST("fullvirt-serial-null"); + DO_TEST("fullvirt-serial-pipe"); + DO_TEST("fullvirt-serial-pty"); + DO_TEST("fullvirt-serial-stdio"); + DO_TEST("fullvirt-serial-tcp"); + DO_TEST("fullvirt-serial-tcp-telnet"); + DO_TEST("fullvirt-serial-udp"); + DO_TEST("fullvirt-serial-unix"); - DO_TEST("fullvirt-force-hpet", 2); - DO_TEST("fullvirt-force-nohpet", 2); + DO_TEST("fullvirt-force-hpet"); + DO_TEST("fullvirt-force-nohpet"); - DO_TEST("fullvirt-parallel-tcp", 2); + DO_TEST("fullvirt-parallel-tcp"); - DO_TEST("fullvirt-sound", 2); + DO_TEST("fullvirt-sound"); - DO_TEST("fullvirt-net-netfront", 2); + DO_TEST("fullvirt-net-netfront"); - DO_TEST_FORMAT("fullvirt-default-feature", 2); + DO_TEST_FORMAT("fullvirt-default-feature"); - DO_TEST("escape-paths", 2); - DO_TEST("no-source-cdrom", 2); - DO_TEST("pci-devs", 2); + DO_TEST("escape-paths"); + DO_TEST("no-source-cdrom"); + DO_TEST("pci-devs"); virObjectUnref(caps); virObjectUnref(xmlopt); -- 2.1.4

Remove use of XEND_CONFIG_VERSION_* from xenconfig/xen_common.c Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- src/xenconfig/xen_common.c | 209 +++++++++++++++------------------------------ 1 file changed, 71 insertions(+), 138 deletions(-) diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index 7e9c7e5..7932b3c 100644 --- a/src/xenconfig/xen_common.c +++ b/src/xenconfig/xen_common.c @@ -323,8 +323,7 @@ xenParseMem(virConfPtr conf, virDomainDefPtr def) static int -xenParseTimeOffset(virConfPtr conf, virDomainDefPtr def, - int xendConfigVersion) +xenParseTimeOffset(virConfPtr conf, virDomainDefPtr def) { int vmlocaltime; @@ -332,24 +331,15 @@ xenParseTimeOffset(virConfPtr conf, virDomainDefPtr def, return -1; if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) { - /* only managed HVM domains since 3.1.0 have persistent rtc_timeoffset */ - if (xendConfigVersion < XEND_CONFIG_VERSION_3_1_0) { - if (vmlocaltime) - def->clock.offset = VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME; - else - def->clock.offset = VIR_DOMAIN_CLOCK_OFFSET_UTC; - def->clock.data.utc_reset = true; - } else { - unsigned long rtc_timeoffset; - def->clock.offset = VIR_DOMAIN_CLOCK_OFFSET_VARIABLE; - if (xenConfigGetULong(conf, "rtc_timeoffset", &rtc_timeoffset, 0) < 0) - return -1; + unsigned long rtc_timeoffset; + def->clock.offset = VIR_DOMAIN_CLOCK_OFFSET_VARIABLE; + if (xenConfigGetULong(conf, "rtc_timeoffset", &rtc_timeoffset, 0) < 0) + return -1; - def->clock.data.variable.adjustment = (int)rtc_timeoffset; - def->clock.data.variable.basis = vmlocaltime ? - VIR_DOMAIN_CLOCK_BASIS_LOCALTIME : - VIR_DOMAIN_CLOCK_BASIS_UTC; - } + def->clock.data.variable.adjustment = (int)rtc_timeoffset; + def->clock.data.variable.basis = vmlocaltime ? + VIR_DOMAIN_CLOCK_BASIS_LOCALTIME : + VIR_DOMAIN_CLOCK_BASIS_UTC; } else { /* PV domains do not have an emulated RTC and the offset is fixed. */ def->clock.offset = vmlocaltime ? @@ -573,7 +563,7 @@ xenParseCPUFeatures(virConfPtr conf, virDomainDefPtr def) #define MAX_VFB 1024 static int -xenParseVfb(virConfPtr conf, virDomainDefPtr def, int xendConfigVersion) +xenParseVfb(virConfPtr conf, virDomainDefPtr def) { int val; char *listenAddr = NULL; @@ -581,7 +571,7 @@ xenParseVfb(virConfPtr conf, virDomainDefPtr def, int xendConfigVersion) virConfValuePtr list; virDomainGraphicsDefPtr graphics = NULL; - if (hvm || xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) { + if (hvm) { if (xenConfigGetBool(conf, "vnc", &val, 0) < 0) goto cleanup; if (val) { @@ -1028,7 +1018,7 @@ int xenParseConfigCommon(virConfPtr conf, virDomainDefPtr def, virCapsPtr caps, - int xendConfigVersion) + int xendConfigVersion ATTRIBUTE_UNUSED) { if (xenParseGeneralMeta(conf, def, caps) < 0) return -1; @@ -1042,7 +1032,7 @@ xenParseConfigCommon(virConfPtr conf, if (xenParseCPUFeatures(conf, def) < 0) return -1; - if (xenParseTimeOffset(conf, def, xendConfigVersion) < 0) + if (xenParseTimeOffset(conf, def) < 0) return -1; if (xenConfigCopyStringOpt(conf, "device_model", &def->emulator) < 0) @@ -1057,7 +1047,7 @@ xenParseConfigCommon(virConfPtr conf, if (xenParseEmulatedDevices(conf, def) < 0) return -1; - if (xenParseVfb(conf, def, xendConfigVersion) < 0) + if (xenParseVfb(conf, def) < 0) return -1; if (xenParseCharDev(conf, def) < 0) @@ -1109,7 +1099,7 @@ static int xenFormatNet(virConnectPtr conn, virConfValuePtr list, virDomainNetDefPtr net, - int hvm, int xendConfigVersion) + int hvm) { virBuffer buf = VIR_BUFFER_INITIALIZER; virConfValuePtr val, tmp; @@ -1185,13 +1175,6 @@ xenFormatNet(virConnectPtr conn, } else { if (net->model != NULL) virBufferAsprintf(&buf, ",model=%s", net->model); - - /* - * apparently type ioemu breaks paravirt drivers on HVM so skip this - * from XEND_CONFIG_MAX_VERS_NET_TYPE_IOEMU - */ - if (xendConfigVersion <= XEND_CONFIG_MAX_VERS_NET_TYPE_IOEMU) - virBufferAddLit(&buf, ",type=ioemu"); } } @@ -1322,18 +1305,36 @@ xenFormatMem(virConfPtr conf, virDomainDefPtr def) static int -xenFormatTimeOffset(virConfPtr conf, virDomainDefPtr def, int xendConfigVersion) +xenFormatTimeOffset(virConfPtr conf, virDomainDefPtr def) { int vmlocaltime; - if (xendConfigVersion < XEND_CONFIG_VERSION_3_1_0) { - /* <3.1: UTC and LOCALTIME */ + if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) { + /* >=3.1 HV: VARIABLE */ + int rtc_timeoffset; + switch (def->clock.offset) { + case VIR_DOMAIN_CLOCK_OFFSET_VARIABLE: + vmlocaltime = (int)def->clock.data.variable.basis; + rtc_timeoffset = def->clock.data.variable.adjustment; + break; case VIR_DOMAIN_CLOCK_OFFSET_UTC: + if (def->clock.data.utc_reset) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("unsupported clock adjustment='reset'")); + return -1; + } vmlocaltime = 0; + rtc_timeoffset = 0; break; case VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME: + if (def->clock.data.utc_reset) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("unsupported clock adjustment='reset'")); + return -1; + } vmlocaltime = 1; + rtc_timeoffset = 0; break; default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, @@ -1341,61 +1342,24 @@ xenFormatTimeOffset(virConfPtr conf, virDomainDefPtr def, int xendConfigVersion) virDomainClockOffsetTypeToString(def->clock.offset)); return -1; } - + if (xenConfigSetInt(conf, "rtc_timeoffset", rtc_timeoffset) < 0) + return -1; } else { - if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) { - /* >=3.1 HV: VARIABLE */ - int rtc_timeoffset; - - switch (def->clock.offset) { - case VIR_DOMAIN_CLOCK_OFFSET_VARIABLE: - vmlocaltime = (int)def->clock.data.variable.basis; - rtc_timeoffset = def->clock.data.variable.adjustment; - break; - case VIR_DOMAIN_CLOCK_OFFSET_UTC: - if (def->clock.data.utc_reset) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("unsupported clock adjustment='reset'")); - return -1; - } - vmlocaltime = 0; - rtc_timeoffset = 0; - break; - case VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME: - if (def->clock.data.utc_reset) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("unsupported clock adjustment='reset'")); - return -1; - } - vmlocaltime = 1; - rtc_timeoffset = 0; - break; - default: - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported clock offset='%s'"), - virDomainClockOffsetTypeToString(def->clock.offset)); - return -1; - } - if (xenConfigSetInt(conf, "rtc_timeoffset", rtc_timeoffset) < 0) - return -1; - - } else { - /* >=3.1 PV: UTC and LOCALTIME */ - switch (def->clock.offset) { - case VIR_DOMAIN_CLOCK_OFFSET_UTC: - vmlocaltime = 0; - break; - case VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME: - vmlocaltime = 1; - break; - default: - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported clock offset='%s'"), - virDomainClockOffsetTypeToString(def->clock.offset)); - return -1; - } - } /* !hvm */ - } + /* PV: UTC and LOCALTIME */ + switch (def->clock.offset) { + case VIR_DOMAIN_CLOCK_OFFSET_UTC: + vmlocaltime = 0; + break; + case VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME: + vmlocaltime = 1; + break; + default: + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unsupported clock offset='%s'"), + virDomainClockOffsetTypeToString(def->clock.offset)); + return -1; + } + } /* !hvm */ if (xenConfigSetInt(conf, "localtime", vmlocaltime) < 0) return -1; @@ -1559,7 +1523,7 @@ xenFormatCPUAllocation(virConfPtr conf, virDomainDefPtr def) static int -xenFormatCPUFeatures(virConfPtr conf, virDomainDefPtr def, int xendConfigVersion) +xenFormatCPUFeatures(virConfPtr conf, virDomainDefPtr def) { size_t i; @@ -1579,17 +1543,15 @@ xenFormatCPUFeatures(virConfPtr conf, virDomainDefPtr def, int xendConfigVersion VIR_TRISTATE_SWITCH_ON) ? 1 : 0) < 0) return -1; - if (xendConfigVersion >= XEND_CONFIG_VERSION_3_0_4) { - if (xenConfigSetInt(conf, "hap", - (def->features[VIR_DOMAIN_FEATURE_HAP] == - VIR_TRISTATE_SWITCH_ON) ? 1 : 0) < 0) - return -1; + if (xenConfigSetInt(conf, "hap", + (def->features[VIR_DOMAIN_FEATURE_HAP] == + VIR_TRISTATE_SWITCH_ON) ? 1 : 0) < 0) + return -1; - if (xenConfigSetInt(conf, "viridian", - (def->features[VIR_DOMAIN_FEATURE_VIRIDIAN] == - VIR_TRISTATE_SWITCH_ON) ? 1 : 0) < 0) - return -1; - } + if (xenConfigSetInt(conf, "viridian", + (def->features[VIR_DOMAIN_FEATURE_VIRIDIAN] == + VIR_TRISTATE_SWITCH_ON) ? 1 : 0) < 0) + return -1; for (i = 0; i < def->clock.ntimers; i++) { if (def->clock.timers[i]->name == VIR_DOMAIN_TIMER_NAME_HPET && @@ -1615,38 +1577,13 @@ xenFormatEmulator(virConfPtr conf, virDomainDefPtr def) static int -xenFormatCDROM(virConfPtr conf, virDomainDefPtr def, int xendConfigVersion) -{ - size_t i; - - if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) { - if (xendConfigVersion == XEND_CONFIG_VERSION_3_0_2) { - for (i = 0; i < def->ndisks; i++) { - if (def->disks[i]->device == VIR_DOMAIN_DISK_DEVICE_CDROM && - def->disks[i]->dst && - STREQ(def->disks[i]->dst, "hdc") && - virDomainDiskGetSource(def->disks[i])) { - if (xenConfigSetString(conf, "cdrom", - virDomainDiskGetSource(def->disks[i])) < 0) - return -1; - break; - } - } - } - } - - return 0; -} - - -static int -xenFormatVfb(virConfPtr conf, virDomainDefPtr def, int xendConfigVersion) +xenFormatVfb(virConfPtr conf, virDomainDefPtr def) { int hvm = def->os.type == VIR_DOMAIN_OSTYPE_HVM ? 1 : 0; if (def->ngraphics == 1 && def->graphics[0]->type != VIR_DOMAIN_GRAPHICS_TYPE_SPICE) { - if (hvm || (xendConfigVersion < XEND_CONFIG_MIN_VERS_PVFB_NEWCONF)) { + if (hvm) { if (def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_SDL) { if (xenConfigSetInt(conf, "sdl", 1) < 0) return -1; @@ -1785,8 +1722,7 @@ xenFormatSound(virConfPtr conf, virDomainDefPtr def) static int xenFormatVif(virConfPtr conf, virConnectPtr conn, - virDomainDefPtr def, - int xendConfigVersion) + virDomainDefPtr def) { virConfValuePtr netVal = NULL; size_t i; @@ -1799,7 +1735,7 @@ xenFormatVif(virConfPtr conf, for (i = 0; i < def->nnets; i++) { if (xenFormatNet(conn, netVal, def->nets[i], - hvm, xendConfigVersion) < 0) + hvm) < 0) goto cleanup; } @@ -1826,7 +1762,7 @@ int xenFormatConfigCommon(virConfPtr conf, virDomainDefPtr def, virConnectPtr conn, - int xendConfigVersion) + int xendConfigVersion ATTRIBUTE_UNUSED) { if (xenFormatGeneralMeta(conf, def) < 0) return -1; @@ -1837,13 +1773,10 @@ xenFormatConfigCommon(virConfPtr conf, if (xenFormatCPUAllocation(conf, def) < 0) return -1; - if (xenFormatCPUFeatures(conf, def, xendConfigVersion) < 0) + if (xenFormatCPUFeatures(conf, def) < 0) return -1; - if (xenFormatCDROM(conf, def, xendConfigVersion) < 0) - return -1; - - if (xenFormatTimeOffset(conf, def, xendConfigVersion) < 0) + if (xenFormatTimeOffset(conf, def) < 0) return -1; if (xenFormatEventActions(conf, def) < 0) @@ -1852,10 +1785,10 @@ xenFormatConfigCommon(virConfPtr conf, if (xenFormatEmulator(conf, def) < 0) return -1; - if (xenFormatVfb(conf, def, xendConfigVersion) < 0) + if (xenFormatVfb(conf, def) < 0) return -1; - if (xenFormatVif(conf, conn, def, xendConfigVersion) < 0) + if (xenFormatVif(conf, conn, def) < 0) return -1; if (xenFormatPCI(conf, def) < 0) -- 2.1.4

Remove use of XEND_CONFIG_VERSION_* in xm parser/formatter. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- src/xenconfig/xen_xm.c | 40 ++++------------------------------------ 1 file changed, 4 insertions(+), 36 deletions(-) diff --git a/src/xenconfig/xen_xm.c b/src/xenconfig/xen_xm.c index 13eedf1..aac274d 100644 --- a/src/xenconfig/xen_xm.c +++ b/src/xenconfig/xen_xm.c @@ -104,9 +104,9 @@ xenParseXMOS(virConfPtr conf, virDomainDefPtr def) static int -xenParseXMDisk(virConfPtr conf, virDomainDefPtr def, int xendConfigVersion) +xenParseXMDisk(virConfPtr conf, virDomainDefPtr def, + int xendConfigVersion ATTRIBUTE_UNUSED) { - const char *str = NULL; virDomainDiskDefPtr disk = NULL; int hvm = def->os.type == VIR_DOMAIN_OSTYPE_HVM; virConfValuePtr list = virConfGetValue(conf, "disk"); @@ -271,29 +271,6 @@ xenParseXMDisk(virConfPtr conf, virDomainDefPtr def, int xendConfigVersion) } } - if (hvm && xendConfigVersion == XEND_CONFIG_VERSION_3_0_2) { - if (xenConfigGetString(conf, "cdrom", &str, NULL) < 0) - goto cleanup; - if (str) { - if (!(disk = virDomainDiskDefNew(NULL))) - goto cleanup; - - virDomainDiskSetType(disk, VIR_STORAGE_TYPE_FILE); - disk->device = VIR_DOMAIN_DISK_DEVICE_CDROM; - if (virDomainDiskSetDriver(disk, "file") < 0) - goto cleanup; - if (virDomainDiskSetSource(disk, str) < 0) - goto cleanup; - if (VIR_STRDUP(disk->dst, "hdc") < 0) - goto cleanup; - disk->bus = VIR_DOMAIN_DISK_BUS_IDE; - disk->src->readonly = true; - - if (VIR_APPEND_ELEMENT(def->disks, def->ndisks, disk) < 0) - goto cleanup; - } - } - return 0; cleanup: @@ -305,8 +282,8 @@ xenParseXMDisk(virConfPtr conf, virDomainDefPtr def, int xendConfigVersion) static int xenFormatXMDisk(virConfValuePtr list, virDomainDiskDefPtr disk, - int hvm, - int xendConfigVersion) + int hvm ATTRIBUTE_UNUSED, + int xendConfigVersion ATTRIBUTE_UNUSED) { virBuffer buf = VIR_BUFFER_INITIALIZER; virConfValuePtr val, tmp; @@ -343,8 +320,6 @@ xenFormatXMDisk(virConfValuePtr list, virBufferAdd(&buf, src, -1); } virBufferAddLit(&buf, ","); - if (hvm && xendConfigVersion == XEND_CONFIG_VERSION_3_0_2) - virBufferAddLit(&buf, "ioemu:"); virBufferAdd(&buf, disk->dst, -1); if (disk->device == VIR_DOMAIN_DISK_DEVICE_CDROM) @@ -400,13 +375,6 @@ xenFormatXMDisks(virConfPtr conf, virDomainDefPtr def, int xendConfigVersion) diskVal->list = NULL; for (i = 0; i < def->ndisks; i++) { - if (xendConfigVersion == XEND_CONFIG_VERSION_3_0_2 && - def->disks[i]->device == VIR_DOMAIN_DISK_DEVICE_CDROM && - def->disks[i]->dst && - STREQ(def->disks[i]->dst, "hdc")) { - continue; - } - if (def->disks[i]->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY) continue; -- 2.1.4

Remove use of xendConfigVersion in the xm and xl config formatter/parsers in src/xenconfig/. Adjust callers in the xen and libxl drivers accordingly. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- src/libxl/libxl_driver.c | 8 +++----- src/xen/xen_driver.c | 5 ++--- src/xen/xm_internal.c | 7 +++---- src/xenconfig/xen_common.c | 6 ++---- src/xenconfig/xen_common.h | 7 +++---- src/xenconfig/xen_xl.c | 9 ++++----- src/xenconfig/xen_xl.h | 7 +++---- src/xenconfig/xen_xm.c | 25 +++++++++---------------- src/xenconfig/xen_xm.h | 5 ++--- tests/xlconfigtest.c | 4 ++-- tests/xmconfigtest.c | 5 ++--- 11 files changed, 35 insertions(+), 53 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index a42647a..fd92fac 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -2595,15 +2595,13 @@ libxlConnectDomainXMLFromNative(virConnectPtr conn, goto cleanup; if (!(def = xenParseXL(conf, cfg->caps, - driver->xmlopt, - cfg->verInfo->xen_version_major))) + driver->xmlopt))) goto cleanup; } else if (STREQ(nativeFormat, LIBXL_CONFIG_FORMAT_XM)) { if (!(conf = virConfReadMem(nativeConfig, strlen(nativeConfig), 0))) goto cleanup; if (!(def = xenParseXM(conf, - cfg->verInfo->xen_version_major, cfg->caps, driver->xmlopt))) goto cleanup; @@ -2659,10 +2657,10 @@ libxlConnectDomainXMLToNative(virConnectPtr conn, const char * nativeFormat, goto cleanup; if (STREQ(nativeFormat, LIBXL_CONFIG_FORMAT_XL)) { - if (!(conf = xenFormatXL(def, conn, cfg->verInfo->xen_version_major))) + if (!(conf = xenFormatXL(def, conn))) goto cleanup; } else if (STREQ(nativeFormat, LIBXL_CONFIG_FORMAT_XM)) { - if (!(conf = xenFormatXM(conn, def, cfg->verInfo->xen_version_major))) + if (!(conf = xenFormatXM(conn, def))) goto cleanup; } else { diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c index 285a553..321a250 100644 --- a/src/xen/xen_driver.c +++ b/src/xen/xen_driver.c @@ -1645,8 +1645,7 @@ xenUnifiedConnectDomainXMLFromNative(virConnectPtr conn, if (!conf) goto cleanup; - def = xenParseXM(conf, priv->xendConfigVersion, - priv->caps, priv->xmlopt); + def = xenParseXM(conf, priv->caps, priv->xmlopt); } else if (STREQ(format, XEN_CONFIG_FORMAT_SEXPR)) { if (xenGetDomIdFromSxprString(config, priv->xendConfigVersion, &id) < 0) goto cleanup; @@ -1700,7 +1699,7 @@ xenUnifiedConnectDomainXMLToNative(virConnectPtr conn, if (STREQ(format, XEN_CONFIG_FORMAT_XM)) { int len = MAX_CONFIG_SIZE; - conf = xenFormatXM(conn, def, priv->xendConfigVersion); + conf = xenFormatXM(conn, def); if (!conf) goto cleanup; diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c index ee78fe9..085b24a 100644 --- a/src/xen/xm_internal.c +++ b/src/xen/xm_internal.c @@ -139,7 +139,7 @@ xenXMConfigReadFile(virConnectPtr conn, const char *filename) if (!(conf = virConfReadFile(filename, 0))) return NULL; - def = xenParseXM(conf, priv->xendConfigVersion, priv->caps, priv->xmlopt); + def = xenParseXM(conf, priv->caps, priv->xmlopt); virConfFree(conf); return def; @@ -151,10 +151,9 @@ xenXMConfigSaveFile(virConnectPtr conn, virDomainDefPtr def) { virConfPtr conf; - xenUnifiedPrivatePtr priv = conn->privateData; int ret; - if (!(conf = xenFormatXM(conn, def, priv->xendConfigVersion))) + if (!(conf = xenFormatXM(conn, def))) return -1; ret = virConfWriteFile(filename, conf); @@ -972,7 +971,7 @@ xenXMDomainDefineXML(virConnectPtr conn, virDomainDefPtr def) return -1; } - if (!(conf = xenFormatXM(conn, def, priv->xendConfigVersion))) + if (!(conf = xenFormatXM(conn, def))) goto error; /* diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index 7932b3c..f3e7e18 100644 --- a/src/xenconfig/xen_common.c +++ b/src/xenconfig/xen_common.c @@ -1017,8 +1017,7 @@ xenParseGeneralMeta(virConfPtr conf, virDomainDefPtr def, virCapsPtr caps) int xenParseConfigCommon(virConfPtr conf, virDomainDefPtr def, - virCapsPtr caps, - int xendConfigVersion ATTRIBUTE_UNUSED) + virCapsPtr caps) { if (xenParseGeneralMeta(conf, def, caps) < 0) return -1; @@ -1761,8 +1760,7 @@ xenFormatVif(virConfPtr conf, int xenFormatConfigCommon(virConfPtr conf, virDomainDefPtr def, - virConnectPtr conn, - int xendConfigVersion ATTRIBUTE_UNUSED) + virConnectPtr conn) { if (xenFormatGeneralMeta(conf, def) < 0) return -1; diff --git a/src/xenconfig/xen_common.h b/src/xenconfig/xen_common.h index 0116703..3d9b03c 100644 --- a/src/xenconfig/xen_common.h +++ b/src/xenconfig/xen_common.h @@ -54,12 +54,11 @@ int xenConfigCopyStringOpt(virConfPtr conf, int xenParseConfigCommon(virConfPtr conf, virDomainDefPtr def, - virCapsPtr caps, - int xendConfigVersion); + virCapsPtr caps); int xenFormatConfigCommon(virConfPtr conf, virDomainDefPtr def, - virConnectPtr conn, - int xendConfigVersion); + virConnectPtr conn); + #endif /* __VIR_XEN_COMMON_H__ */ diff --git a/src/xenconfig/xen_xl.c b/src/xenconfig/xen_xl.c index 98e345c..91cdff6 100644 --- a/src/xenconfig/xen_xl.c +++ b/src/xenconfig/xen_xl.c @@ -446,8 +446,7 @@ xenParseXLInputDevs(virConfPtr conf, virDomainDefPtr def) virDomainDefPtr xenParseXL(virConfPtr conf, virCapsPtr caps, - virDomainXMLOptionPtr xmlopt, - int xendConfigVersion) + virDomainXMLOptionPtr xmlopt) { virDomainDefPtr def = NULL; @@ -457,7 +456,7 @@ xenParseXL(virConfPtr conf, def->virtType = VIR_DOMAIN_VIRT_XEN; def->id = -1; - if (xenParseConfigCommon(conf, def, caps, xendConfigVersion) < 0) + if (xenParseConfigCommon(conf, def, caps) < 0) goto cleanup; if (xenParseXLOS(conf, def, caps) < 0) @@ -828,14 +827,14 @@ xenFormatXLInputDevs(virConfPtr conf, virDomainDefPtr def) virConfPtr -xenFormatXL(virDomainDefPtr def, virConnectPtr conn, int xendConfigVersion) +xenFormatXL(virDomainDefPtr def, virConnectPtr conn) { virConfPtr conf = NULL; if (!(conf = virConfNew())) goto cleanup; - if (xenFormatConfigCommon(conf, def, conn, xendConfigVersion) < 0) + if (xenFormatConfigCommon(conf, def, conn) < 0) goto cleanup; if (xenFormatXLOS(conf, def) < 0) diff --git a/src/xenconfig/xen_xl.h b/src/xenconfig/xen_xl.h index 58dfcb5..dd96326 100644 --- a/src/xenconfig/xen_xl.h +++ b/src/xenconfig/xen_xl.h @@ -29,9 +29,8 @@ virDomainDefPtr xenParseXL(virConfPtr conn, virCapsPtr caps, - virDomainXMLOptionPtr xmlopt, - int xendConfigVersion); -virConfPtr xenFormatXL(virDomainDefPtr def, - virConnectPtr, int xendConfigVersion); + virDomainXMLOptionPtr xmlopt); + +virConfPtr xenFormatXL(virDomainDefPtr def, virConnectPtr); #endif /* __VIR_XEN_XL_H__ */ diff --git a/src/xenconfig/xen_xm.c b/src/xenconfig/xen_xm.c index aac274d..f3e2f71 100644 --- a/src/xenconfig/xen_xm.c +++ b/src/xenconfig/xen_xm.c @@ -104,8 +104,7 @@ xenParseXMOS(virConfPtr conf, virDomainDefPtr def) static int -xenParseXMDisk(virConfPtr conf, virDomainDefPtr def, - int xendConfigVersion ATTRIBUTE_UNUSED) +xenParseXMDisk(virConfPtr conf, virDomainDefPtr def) { virDomainDiskDefPtr disk = NULL; int hvm = def->os.type == VIR_DOMAIN_OSTYPE_HVM; @@ -281,9 +280,7 @@ xenParseXMDisk(virConfPtr conf, virDomainDefPtr def, static int xenFormatXMDisk(virConfValuePtr list, - virDomainDiskDefPtr disk, - int hvm ATTRIBUTE_UNUSED, - int xendConfigVersion ATTRIBUTE_UNUSED) + virDomainDiskDefPtr disk) { virBuffer buf = VIR_BUFFER_INITIALIZER; virConfValuePtr val, tmp; @@ -362,11 +359,10 @@ xenFormatXMDisk(virConfValuePtr list, static int -xenFormatXMDisks(virConfPtr conf, virDomainDefPtr def, int xendConfigVersion) +xenFormatXMDisks(virConfPtr conf, virDomainDefPtr def) { virConfValuePtr diskVal = NULL; size_t i = 0; - int hvm = def->os.type == VIR_DOMAIN_OSTYPE_HVM; if (VIR_ALLOC(diskVal) < 0) goto cleanup; @@ -378,8 +374,7 @@ xenFormatXMDisks(virConfPtr conf, virDomainDefPtr def, int xendConfigVersion) if (def->disks[i]->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY) continue; - if (xenFormatXMDisk(diskVal, def->disks[i], - hvm, xendConfigVersion) < 0) + if (xenFormatXMDisk(diskVal, def->disks[i]) < 0) goto cleanup; } @@ -436,7 +431,6 @@ xenParseXMInputDevs(virConfPtr conf, virDomainDefPtr def) */ virDomainDefPtr xenParseXM(virConfPtr conf, - int xendConfigVersion, virCapsPtr caps, virDomainXMLOptionPtr xmlopt) { @@ -448,13 +442,13 @@ xenParseXM(virConfPtr conf, def->virtType = VIR_DOMAIN_VIRT_XEN; def->id = -1; - if (xenParseConfigCommon(conf, def, caps, xendConfigVersion) < 0) + if (xenParseConfigCommon(conf, def, caps) < 0) goto cleanup; if (xenParseXMOS(conf, def) < 0) goto cleanup; - if (xenParseXMDisk(conf, def, xendConfigVersion) < 0) + if (xenParseXMDisk(conf, def) < 0) goto cleanup; if (xenParseXMInputDevs(conf, def) < 0) @@ -584,21 +578,20 @@ verify(MAX_VIRT_CPUS <= sizeof(1UL) * CHAR_BIT); */ virConfPtr xenFormatXM(virConnectPtr conn, - virDomainDefPtr def, - int xendConfigVersion) + virDomainDefPtr def) { virConfPtr conf = NULL; if (!(conf = virConfNew())) goto cleanup; - if (xenFormatConfigCommon(conf, def, conn, xendConfigVersion) < 0) + if (xenFormatConfigCommon(conf, def, conn) < 0) goto cleanup; if (xenFormatXMOS(conf, def) < 0) goto cleanup; - if (xenFormatXMDisks(conf, def, xendConfigVersion) < 0) + if (xenFormatXMDisks(conf, def) < 0) goto cleanup; if (xenFormatXMInputDevs(conf, def) < 0) diff --git a/src/xenconfig/xen_xm.h b/src/xenconfig/xen_xm.h index 61f94db..db3e345 100644 --- a/src/xenconfig/xen_xm.h +++ b/src/xenconfig/xen_xm.h @@ -30,10 +30,9 @@ # include "virconf.h" # include "domain_conf.h" -virConfPtr xenFormatXM(virConnectPtr conn, virDomainDefPtr def, - int xendConfigVersion); +virConfPtr xenFormatXM(virConnectPtr conn, virDomainDefPtr def); -virDomainDefPtr xenParseXM(virConfPtr conf, int xendConfigVersion, +virDomainDefPtr xenParseXM(virConfPtr conf, virCapsPtr caps, virDomainXMLOptionPtr xmlopt); #endif /* __VIR_XEN_XM_H__ */ diff --git a/tests/xlconfigtest.c b/tests/xlconfigtest.c index 31865ff..de7f871 100644 --- a/tests/xlconfigtest.c +++ b/tests/xlconfigtest.c @@ -70,7 +70,7 @@ testCompareParseXML(const char *xmcfg, const char *xml) goto fail; } - if (!(conf = xenFormatXL(def, conn, 4))) + if (!(conf = xenFormatXL(def, conn))) goto fail; if (virConfWriteMem(gotxmcfgData, &wrote, conf) < 0) @@ -113,7 +113,7 @@ testCompareFormatXML(const char *xmcfg, const char *xml) if (!(conf = virConfReadMem(xmcfgData, strlen(xmcfgData), 0))) goto fail; - if (!(def = xenParseXL(conf, caps, xmlopt, 4))) + if (!(def = xenParseXL(conf, caps, xmlopt))) goto fail; if (!(gotxml = virDomainDefFormat(def, VIR_DOMAIN_XML_INACTIVE | diff --git a/tests/xmconfigtest.c b/tests/xmconfigtest.c index f2705eb..43a6775 100644 --- a/tests/xmconfigtest.c +++ b/tests/xmconfigtest.c @@ -73,7 +73,7 @@ testCompareParseXML(const char *xmcfg, const char *xml) goto fail; } - if (!(conf = xenFormatXM(conn, def, 4))) + if (!(conf = xenFormatXM(conn, def))) goto fail; if (virConfWriteMem(gotxmcfgData, &wrote, conf) < 0) @@ -120,8 +120,7 @@ testCompareFormatXML(const char *xmcfg, const char *xml) if (!(conf = virConfReadMem(xmcfgData, strlen(xmcfgData), 0))) goto fail; - if (!(def = xenParseXM(conf, priv.xendConfigVersion, - caps, xmlopt))) + if (!(def = xenParseXM(conf, caps, xmlopt))) goto fail; if (!(gotxml = virDomainDefFormat(def, VIR_DOMAIN_DEF_FORMAT_SECURE))) -- 2.1.4

Change all sexpr2xml tests to use the latest XEND_CONFIG_VERSION (XEND_CONFIG_VERSION_3_1_0 = 4). Fix tests that do not conform to the latest version. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml | 2 +- .../sexpr2xmldata/sexpr2xml-fv-empty-kernel.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml | 4 +- .../sexpr2xmldata/sexpr2xml-fv-force-nohpet.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml | 2 +- tests/sexpr2xmldata/sexpr2xml-fv-localtime.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml | 4 +- .../sexpr2xmldata/sexpr2xml-fv-net-netfront.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml | 4 +- .../sexpr2xmldata/sexpr2xml-fv-parallel-tcp.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml | 4 +- .../sexpr2xml-fv-serial-dev-2-ports.sexpr | 5 +- .../sexpr2xml-fv-serial-dev-2-ports.xml | 4 +- .../sexpr2xml-fv-serial-dev-2nd-port.sexpr | 4 +- .../sexpr2xml-fv-serial-dev-2nd-port.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-file.sexpr | 7 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-null.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.sexpr | 7 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml | 4 +- .../sexpr2xmldata/sexpr2xml-fv-serial-stdio.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml | 4 +- .../sexpr2xml-fv-serial-tcp-telnet.sexpr | 3 +- .../sexpr2xml-fv-serial-tcp-telnet.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-sound-all.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-sound.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-sound.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-utc.sexpr | 2 + tests/sexpr2xmldata/sexpr2xml-fv-utc.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-v2.xml | 2 +- tests/sexpr2xmldata/sexpr2xml-fv.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml | 2 +- tests/sexpr2xmltest.c | 129 ++++++++++----------- 51 files changed, 176 insertions(+), 139 deletions(-) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml b/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml index 17e723e..d68782d 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml @@ -12,7 +12,7 @@ <features> <pae/> </features> - <clock offset='localtime' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>destroy</on_reboot> <on_crash>destroy</on_crash> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.sexpr index ded668c..777f7e0 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.sexpr @@ -3,7 +3,9 @@ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (loader /usr/lib/xen/boot/hvmloader)(kernel '')\ (device_model '/usr/lib64/xen/bin/qemu-dm')(boot d)(cdrom '/root/boot.iso')\ -(acpi 1)(vnc 1)(keymap ja)))(device (vbd (dev 'ioemu:hda')\ +(acpi 1)(vnc 1)(keymap ja)))(device (vbd (dev 'hda')\ (uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')\ +(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ (script 'vif-bridge')(type ioemu)))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml b/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml index 9494ec2..dbfd603 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> @@ -41,7 +41,7 @@ </interface> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> + <graphics type='vnc' port='-1' autoport='yes' keymap='ja'/> <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.sexpr index d52214f..04cd2ae 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.sexpr @@ -2,8 +2,10 @@ (uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial none)\ +(acpi 1)(usb 1)(parallel none)(serial none)\ (device_model '/usr/lib64/xen/bin/qemu-dm')(hpet 1)(vnc 1)))\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')\ +(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\ (model 'e1000')(type ioemu))))\ diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml index af1303b..8aa3250 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'> + <clock offset='variable' adjustment='0' basis='utc'> <timer name='hpet' present='yes'/> </clock> <on_poweroff>destroy</on_poweroff> @@ -44,7 +44,7 @@ </interface> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5901' autoport='no'/> + <graphics type='vnc' port='-1' autoport='yes'/> <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.sexpr index 75bc8b1..bcb0926 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.sexpr @@ -2,8 +2,10 @@ (uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial none)\ +(acpi 1)(usb 1)(parallel none)(serial none)\ (device_model '/usr/lib64/xen/bin/qemu-dm')(hpet 0)(vnc 1)))\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')\ +(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\ (model 'e1000')(type ioemu))))\ diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml index 406f3ed..fbf155c 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'> + <clock offset='variable' adjustment='0' basis='utc'> <timer name='hpet' present='no'/> </clock> <on_poweroff>destroy</on_poweroff> @@ -44,7 +44,7 @@ </interface> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5901' autoport='no'/> + <graphics type='vnc' port='-1' autoport='yes'/> <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml b/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml index 5723564..fcd08da 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml @@ -11,7 +11,7 @@ <initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd> <cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_... </cmdline> </os> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>destroy</on_reboot> <on_crash>destroy</on_crash> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-localtime.sexpr index 9caf8a0..5616d19 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-localtime.sexpr @@ -2,8 +2,9 @@ (uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')\ -(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')\ +(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)\ (acpi 1)(vnc 1)(keymap ja)(localtime 1)))\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ (script 'vif-bridge')(type ioemu)))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml b/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml index bc2ccec..1d41979 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='localtime' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> @@ -41,7 +41,7 @@ </interface> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> + <graphics type='vnc' port='-1' autoport='yes' keymap='ja'/> <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.sexpr index acfc477..b0a344c 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.sexpr @@ -2,8 +2,10 @@ (uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')\ -(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')\ +(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)\ (acpi 1)(vnc 1)(keymap ja)))(device (vbd (dev 'ioemu:hda')\ (uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')\ +(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ (script 'vif-bridge')(type 'netfront')))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml b/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml index f92ea4b..c0a78e1 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> @@ -42,7 +42,7 @@ </interface> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> + <graphics type='vnc' port='-1' autoport='yes' keymap='ja'/> <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.sexpr index 39a8fbb..8d01726 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.sexpr @@ -2,8 +2,9 @@ (uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel tcp:localhost:9999)\ +(acpi 1)(usb 1)(parallel tcp:localhost:9999)\ (serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ (script 'vif-bridge')(type ioemu)))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml index 3bc6490..1268416 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> @@ -46,7 +46,7 @@ </parallel> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5901' autoport='no'/> + <graphics type='vnc' port='-1' autoport='yes'/> <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.sexpr index 32bf699..8f56518 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.sexpr @@ -5,5 +5,8 @@ (cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\ (serial (/dev/ttyS0 /dev/ttyS1))(device_model '/usr/lib64/xen/bin/qemu-dm')\ (vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')\ -(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ +(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')\ +(uname 'file:/root/boot.iso')(mode 'r')))\ +(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ (script 'vif-bridge')(type ioemu)))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml index d1b5134..4c1c5ce 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> @@ -53,7 +53,7 @@ </console> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5901' autoport='no'/> + <graphics type='vnc' port='-1' autoport='yes'/> <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.sexpr index ddd94fd..f0b9925 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.sexpr @@ -2,8 +2,10 @@ (uuid 'b5d70dd275cdaca517769660b059d8ff')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\ +(acpi 1)(usb 1)(parallel none)\ (serial (none /dev/ttyS1))(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')\ +(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ (script 'vif-bridge')(type ioemu)))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml index 1c5a047..8cd0f69 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> @@ -49,7 +49,7 @@ </console> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5901' autoport='no'/> + <graphics type='vnc' port='-1' autoport='yes'/> <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.sexpr index 40e0200..0eac5a4 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.sexpr @@ -2,8 +2,11 @@ (uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\ +(acpi 1)(usb 1)(parallel none)\ (serial file:/tmp/serial.log)(device_model '/usr/lib64/xen/bin/qemu-dm')\ (vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')\ -(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ +(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')\ +(uname 'file:/root/boot.iso')(mode 'r')))\ +(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ (script 'vif-bridge')(type ioemu)))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml index 680528e..1b7ab29 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> @@ -49,7 +49,7 @@ </console> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5901' autoport='no'/> + <graphics type='vnc' port='-1' autoport='yes'/> <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.sexpr index 4670468..a00410c 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.sexpr @@ -2,8 +2,9 @@ (uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial null)\ +(acpi 1)(usb 1)(parallel none)(serial null)\ (device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ (script 'vif-bridge')(type ioemu)))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml index 1a7f866..73361d6 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> @@ -47,7 +47,7 @@ </console> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5901' autoport='no'/> + <graphics type='vnc' port='-1' autoport='yes'/> <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.sexpr index 2dacb90..2b3a661 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.sexpr @@ -2,8 +2,11 @@ (uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\ +(acpi 1)(usb 1)(parallel none)\ (serial pipe:/tmp/serial.pipe)(device_model '/usr/lib64/xen/bin/qemu-dm')\ (vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')\ -(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ +(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')\ +(uname 'file:/root/boot.iso')(mode 'r')))\ +(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ (script 'vif-bridge')(type ioemu)))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml index b15a1bc..c96df26 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> @@ -49,7 +49,7 @@ </console> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5901' autoport='no'/> + <graphics type='vnc' port='-1' autoport='yes'/> <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.sexpr index 85cf07e..1029c1a 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.sexpr @@ -2,8 +2,10 @@ (uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial pty)\ +(acpi 1)(usb 1)(parallel none)(serial pty)\ (device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')\ +(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ (script 'vif-bridge')(type ioemu)))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml index e827f1d..af788fe 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> @@ -47,7 +47,7 @@ </console> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5901' autoport='no'/> + <graphics type='vnc' port='-1' autoport='yes'/> <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.sexpr index 6a559e7..05a9a1d 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.sexpr @@ -2,8 +2,9 @@ (uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial stdio)\ +(acpi 1)(usb 1)(parallel none)(serial stdio)\ (device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\ (type ioemu)))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml index 3d79428..6a21390 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> @@ -47,7 +47,7 @@ </console> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5901' autoport='no'/> + <graphics type='vnc' port='-1' autoport='yes'/> <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.sexpr index cda45e4..0d80f8a 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.sexpr @@ -2,9 +2,10 @@ (uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\ +(acpi 1)(usb 1)(parallel none)\ (serial telnet:localhost:9999,server,nowait)\ (device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ (script 'vif-bridge')(type ioemu)))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml index 7dec0c8..3033685 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> @@ -51,7 +51,7 @@ </console> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5901' autoport='no'/> + <graphics type='vnc' port='-1' autoport='yes'/> <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.sexpr index 94ae80e..44f2bfe 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.sexpr @@ -2,9 +2,10 @@ (uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\ +(acpi 1)(usb 1)(parallel none)\ (serial tcp:localhost:9999,server,nowait)\ (device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ (script 'vif-bridge')(type ioemu)))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml index 4f4b89b..78fbe97 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> @@ -51,7 +51,7 @@ </console> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5901' autoport='no'/> + <graphics type='vnc' port='-1' autoport='yes'/> <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.sexpr index 8e1aeb8..2efedf2 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.sexpr @@ -2,9 +2,10 @@ (uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\ +(acpi 1)(usb 1)(parallel none)\ (serial udp:localhost:9998@localhost:9999)\ (device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ (script 'vif-bridge')(type ioemu)))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml index cf1fc3b..f7497f6 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> @@ -51,7 +51,7 @@ </console> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5901' autoport='no'/> + <graphics type='vnc' port='-1' autoport='yes'/> <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.sexpr index 2bab722..356677e 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.sexpr @@ -2,9 +2,10 @@ (uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\ +(acpi 1)(usb 1)(parallel none)\ (serial unix:/tmp/serial.sock,server,nowait)\ (device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ (script 'vif-bridge')(type ioemu)))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml index a1d15f5..3728609 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> @@ -49,7 +49,7 @@ </console> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5901' autoport='no'/> + <graphics type='vnc' port='-1' autoport='yes'/> <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.sexpr index 6937813..d99e13a 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.sexpr @@ -2,8 +2,10 @@ (uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')\ -(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')\ +(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)\ (acpi 1)(vnc 1)(keymap ja)(soundhw 'all')))(device (vbd (dev 'ioemu:hda')\ (uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')\ +(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ (script 'vif-bridge')(type ioemu)))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml b/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml index 4311b0c..823e402 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> @@ -41,7 +41,7 @@ </interface> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> + <graphics type='vnc' port='-1' autoport='yes' keymap='ja'/> <sound model='sb16'/> <sound model='es1370'/> <memballoon model='xen'/> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-sound.sexpr index ff22666..50d6715 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-sound.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound.sexpr @@ -2,8 +2,9 @@ (uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')\ -(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')\ +(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)\ (acpi 1)(vnc 1)(keymap ja)(soundhw 'sb16,es1370')))\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ (script 'vif-bridge')(type ioemu)))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml b/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml index 4311b0c..823e402 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> @@ -41,7 +41,7 @@ </interface> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> + <graphics type='vnc' port='-1' autoport='yes' keymap='ja'/> <sound model='sb16'/> <sound model='es1370'/> <memballoon model='xen'/> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.sexpr index dcc6ab2..789082e 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.sexpr @@ -2,8 +2,9 @@ (uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')\ -(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')\ +(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)\ (acpi 1)(usbdevice mouse)(vnc 1)(keymap ja)))\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ (script 'vif-bridge')(type ioemu)))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml b/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml index 103cfbe..446b4ac 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> @@ -42,7 +42,7 @@ <input type='mouse' bus='usb'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> + <graphics type='vnc' port='-1' autoport='yes' keymap='ja'/> <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.sexpr index 39e5a72..e2f77a1 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.sexpr @@ -2,8 +2,9 @@ (uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')\ -(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')\ +(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)\ (acpi 1)(usb 1)(usbdevice tablet)(vnc 1)(keymap ja)))\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ (script 'vif-bridge')(type ioemu)))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml index 728e852..c2671f6 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> @@ -42,7 +42,7 @@ <input type='tablet' bus='usb'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> + <graphics type='vnc' port='-1' autoport='yes' keymap='ja'/> <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-utc.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-utc.sexpr index c34c7da..7bfbfae 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-utc.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv-utc.sexpr @@ -5,5 +5,7 @@ (device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')\ (acpi 1)(vnc 1)(keymap ja)))(device (vbd (dev 'ioemu:hda')\ (uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')\ +(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ (script 'vif-bridge')(type ioemu)))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml b/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml index 7899baa..3073806 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> @@ -41,7 +41,7 @@ </interface> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> + <graphics type='vnc' port='-1' autoport='yes' keymap='ja'/> <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml b/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml index af5fbe1..3073806 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv.sexpr index c34c7da..dc4cbf5 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv.sexpr +++ b/tests/sexpr2xmldata/sexpr2xml-fv.sexpr @@ -2,8 +2,10 @@ (uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')\ -(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')\ +(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)\ (acpi 1)(vnc 1)(keymap ja)))(device (vbd (dev 'ioemu:hda')\ (uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')\ +(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ (script 'vif-bridge')(type ioemu)))) diff --git a/tests/sexpr2xmldata/sexpr2xml-fv.xml b/tests/sexpr2xmldata/sexpr2xml-fv.xml index 7899baa..3073806 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv.xml @@ -12,7 +12,7 @@ <features> <acpi/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> @@ -41,7 +41,7 @@ </interface> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> + <graphics type='vnc' port='-1' autoport='yes' keymap='ja'/> <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml b/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml index 384ff8b..ede6e27 100644 --- a/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml +++ b/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml @@ -14,7 +14,7 @@ <apic/> <pae/> </features> - <clock offset='utc' adjustment='reset'/> + <clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>destroy</on_reboot> <on_crash>destroy</on_crash> diff --git a/tests/sexpr2xmltest.c b/tests/sexpr2xmltest.c index c95de9f..1b42a18 100644 --- a/tests/sexpr2xmltest.c +++ b/tests/sexpr2xmltest.c @@ -20,7 +20,7 @@ static virCapsPtr caps; static virDomainXMLOptionPtr xmlopt; static int -testCompareFiles(const char *xml, const char *sexpr, int xendConfigVersion) +testCompareFiles(const char *xml, const char *sexpr) { char *sexprData = NULL; char *gotxml = NULL; @@ -41,20 +41,20 @@ testCompareFiles(const char *xml, const char *sexpr, int xendConfigVersion) memset(&priv, 0, sizeof(priv)); /* Many puppies died to bring you this code. */ - priv.xendConfigVersion = xendConfigVersion; + priv.xendConfigVersion = 4; priv.caps = caps; conn->privateData = &priv; if (virMutexInit(&priv.lock) < 0) goto fail; - if (xenGetDomIdFromSxprString(sexprData, xendConfigVersion, &id) < 0) + if (xenGetDomIdFromSxprString(sexprData, 4, &id) < 0) goto fail; xenUnifiedLock(&priv); tty = xenStoreDomainGetConsolePath(conn, id); vncport = xenStoreDomainGetVNCPort(conn, id); xenUnifiedUnlock(&priv); - if (!(def = xenParseSxprString(sexprData, xendConfigVersion, + if (!(def = xenParseSxprString(sexprData, 4, tty, vncport, caps, xmlopt))) goto fail; @@ -83,7 +83,6 @@ testCompareFiles(const char *xml, const char *sexpr, int xendConfigVersion) struct testInfo { const char *input; const char *output; - int version; }; static int @@ -101,7 +100,7 @@ testCompareHelper(const void *data) goto cleanup; } - result = testCompareFiles(xml, args, info->version); + result = testCompareFiles(xml, args); cleanup: VIR_FREE(xml); @@ -123,72 +122,72 @@ mymain(void) return EXIT_FAILURE; } -#define DO_TEST(in, out, version) \ +#define DO_TEST(in, out) \ do { \ - struct testInfo info = { in, out, version }; \ + struct testInfo info = { in, out }; \ virResetLastError(); \ if (virtTestRun("Xen SEXPR-2-XML " in " -> " out, \ testCompareHelper, &info) < 0) \ ret = -1; \ } while (0) - DO_TEST("pv", "pv", 1); - DO_TEST("fv", "fv", 1); - DO_TEST("pv", "pv", 2); - DO_TEST("fv-v2", "fv-v2", 2); - DO_TEST("pv-vfb-new", "pv-vfb-new", 3); - DO_TEST("pv-vfb-new-vncdisplay", "pv-vfb-new-vncdisplay", 3); - DO_TEST("pv-vfb-type-crash", "pv-vfb-type-crash", 3); - DO_TEST("fv-autoport", "fv-autoport", 3); - DO_TEST("pv-bootloader", "pv-bootloader", 1); - DO_TEST("pv-bootloader-cmdline", "pv-bootloader-cmdline", 1); - DO_TEST("pv-vcpus", "pv-vcpus", 1); - - DO_TEST("disk-file", "disk-file", 2); - DO_TEST("disk-block", "disk-block", 2); - DO_TEST("disk-block-shareable", "disk-block-shareable", 2); - DO_TEST("disk-drv-blktap-raw", "disk-drv-blktap-raw", 2); - DO_TEST("disk-drv-blktap-qcow", "disk-drv-blktap-qcow", 2); - DO_TEST("disk-drv-blktap2-raw", "disk-drv-blktap2-raw", 2); - - DO_TEST("curmem", "curmem", 2); - DO_TEST("net-routed", "net-routed", 2); - DO_TEST("net-bridged", "net-bridged", 2); - DO_TEST("net-e1000", "net-e1000", 2); - DO_TEST("bridge-ipaddr", "bridge-ipaddr", 3); - DO_TEST("no-source-cdrom", "no-source-cdrom", 2); - DO_TEST("pv-localtime", "pv-localtime", 2); - DO_TEST("pci-devs", "pci-devs", 2); - - DO_TEST("fv-utc", "fv-utc", 1); - DO_TEST("fv-localtime", "fv-localtime", 1); - DO_TEST("fv-usbmouse", "fv-usbmouse", 1); - DO_TEST("fv-usbtablet", "fv-usbtablet", 1); - DO_TEST("fv-kernel", "fv-kernel", 1); - DO_TEST("fv-force-hpet", "fv-force-hpet", 1); - DO_TEST("fv-force-nohpet", "fv-force-nohpet", 1); - - DO_TEST("fv-serial-null", "fv-serial-null", 1); - DO_TEST("fv-serial-file", "fv-serial-file", 1); - DO_TEST("fv-serial-dev-2-ports", "fv-serial-dev-2-ports", 1); - DO_TEST("fv-serial-dev-2nd-port", "fv-serial-dev-2nd-port", 1); - DO_TEST("fv-serial-stdio", "fv-serial-stdio", 1); - DO_TEST("fv-serial-pty", "fv-serial-pty", 1); - DO_TEST("fv-serial-pipe", "fv-serial-pipe", 1); - DO_TEST("fv-serial-tcp", "fv-serial-tcp", 1); - DO_TEST("fv-serial-udp", "fv-serial-udp", 1); - DO_TEST("fv-serial-tcp-telnet", "fv-serial-tcp-telnet", 1); - DO_TEST("fv-serial-unix", "fv-serial-unix", 1); - DO_TEST("fv-parallel-tcp", "fv-parallel-tcp", 1); - - DO_TEST("fv-sound", "fv-sound", 1); - DO_TEST("fv-sound-all", "fv-sound-all", 1); - - DO_TEST("fv-net-netfront", "fv-net-netfront", 1); - - DO_TEST("fv-empty-kernel", "fv-empty-kernel", 1); - - DO_TEST("boot-grub", "boot-grub", 1); + DO_TEST("pv", "pv"); + DO_TEST("fv", "fv"); + DO_TEST("pv", "pv"); + DO_TEST("fv-v2", "fv-v2"); + DO_TEST("pv-vfb-new", "pv-vfb-new"); + DO_TEST("pv-vfb-new-vncdisplay", "pv-vfb-new-vncdisplay"); + DO_TEST("pv-vfb-type-crash", "pv-vfb-type-crash"); + DO_TEST("fv-autoport", "fv-autoport"); + DO_TEST("pv-bootloader", "pv-bootloader"); + DO_TEST("pv-bootloader-cmdline", "pv-bootloader-cmdline"); + DO_TEST("pv-vcpus", "pv-vcpus"); + + DO_TEST("disk-file", "disk-file"); + DO_TEST("disk-block", "disk-block"); + DO_TEST("disk-block-shareable", "disk-block-shareable"); + DO_TEST("disk-drv-blktap-raw", "disk-drv-blktap-raw"); + DO_TEST("disk-drv-blktap-qcow", "disk-drv-blktap-qcow"); + DO_TEST("disk-drv-blktap2-raw", "disk-drv-blktap2-raw"); + + DO_TEST("curmem", "curmem"); + DO_TEST("net-routed", "net-routed"); + DO_TEST("net-bridged", "net-bridged"); + DO_TEST("net-e1000", "net-e1000"); + DO_TEST("bridge-ipaddr", "bridge-ipaddr"); + DO_TEST("no-source-cdrom", "no-source-cdrom"); + DO_TEST("pv-localtime", "pv-localtime"); + DO_TEST("pci-devs", "pci-devs"); + + DO_TEST("fv-utc", "fv-utc"); + DO_TEST("fv-localtime", "fv-localtime"); + DO_TEST("fv-usbmouse", "fv-usbmouse"); + DO_TEST("fv-usbtablet", "fv-usbtablet"); + DO_TEST("fv-kernel", "fv-kernel"); + DO_TEST("fv-force-hpet", "fv-force-hpet"); + DO_TEST("fv-force-nohpet", "fv-force-nohpet"); + + DO_TEST("fv-serial-null", "fv-serial-null"); + DO_TEST("fv-serial-file", "fv-serial-file"); + DO_TEST("fv-serial-dev-2-ports", "fv-serial-dev-2-ports"); + DO_TEST("fv-serial-dev-2nd-port", "fv-serial-dev-2nd-port"); + DO_TEST("fv-serial-stdio", "fv-serial-stdio"); + DO_TEST("fv-serial-pty", "fv-serial-pty"); + DO_TEST("fv-serial-pipe", "fv-serial-pipe"); + DO_TEST("fv-serial-tcp", "fv-serial-tcp"); + DO_TEST("fv-serial-udp", "fv-serial-udp"); + DO_TEST("fv-serial-tcp-telnet", "fv-serial-tcp-telnet"); + DO_TEST("fv-serial-unix", "fv-serial-unix"); + DO_TEST("fv-parallel-tcp", "fv-parallel-tcp"); + + DO_TEST("fv-sound", "fv-sound"); + DO_TEST("fv-sound-all", "fv-sound-all"); + + DO_TEST("fv-net-netfront", "fv-net-netfront"); + + DO_TEST("fv-empty-kernel", "fv-empty-kernel"); + + DO_TEST("boot-grub", "boot-grub"); virObjectUnref(caps); virObjectUnref(xmlopt); -- 2.1.4

It has been quite some time since xend required specifying cdroms and fds in '(image (hvm ...))'. Remove the code from the parsing and formatting functions and fixup the associated tests. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- src/xenconfig/xen_sxpr.c | 94 ---------------------- tests/xml2sexprdata/xml2sexpr-fv-force-hpet.sexpr | 2 +- .../xml2sexprdata/xml2sexpr-fv-force-nohpet.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr | 2 +- .../xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr | 2 +- .../xml2sexpr-fv-serial-dev-2-ports.sexpr | 2 +- .../xml2sexpr-fv-serial-dev-2nd-port.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr | 2 +- .../xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr | 2 +- .../xml2sexpr-fv-serial-tcp-telnet.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-fv.sexpr | 2 +- 20 files changed, 19 insertions(+), 113 deletions(-) diff --git a/src/xenconfig/xen_sxpr.c b/src/xenconfig/xen_sxpr.c index 49f438d..3e3b43f 100644 --- a/src/xenconfig/xen_sxpr.c +++ b/src/xenconfig/xen_sxpr.c @@ -1317,74 +1317,6 @@ xenParseSxpr(const struct sexpr *root, vncport) < 0) goto error; - - /* Old style cdrom config from Xen <= 3.0.2 */ - if (hvm && - xendConfigVersion == XEND_CONFIG_VERSION_3_0_2) { - tmp = sexpr_node(root, "domain/image/hvm/cdrom"); - if ((tmp != NULL) && (tmp[0] != 0)) { - virDomainDiskDefPtr disk; - if (!(disk = virDomainDiskDefNew(NULL))) - goto error; - if (virDomainDiskSetSource(disk, tmp) < 0) { - virDomainDiskDefFree(disk); - goto error; - } - virDomainDiskSetType(disk, VIR_STORAGE_TYPE_FILE); - disk->device = VIR_DOMAIN_DISK_DEVICE_CDROM; - if (VIR_STRDUP(disk->dst, "hdc") < 0) { - virDomainDiskDefFree(disk); - goto error; - } - if (virDomainDiskSetDriver(disk, "file") < 0) { - virDomainDiskDefFree(disk); - goto error; - } - disk->bus = VIR_DOMAIN_DISK_BUS_IDE; - disk->src->readonly = true; - - if (VIR_APPEND_ELEMENT(def->disks, def->ndisks, disk) < 0) { - virDomainDiskDefFree(disk); - goto error; - } - } - } - - - /* Floppy disk config */ - if (hvm) { - const char *const fds[] = { "fda", "fdb" }; - size_t i; - for (i = 0; i < ARRAY_CARDINALITY(fds); i++) { - tmp = sexpr_fmt_node(root, "domain/image/hvm/%s", fds[i]); - if ((tmp != NULL) && (tmp[0] != 0)) { - virDomainDiskDefPtr disk; - if (!(disk = virDomainDiskDefNew(NULL))) - goto error; - if (virDomainDiskSetSource(disk, tmp) < 0) { - virDomainDiskDefFree(disk); - goto error; - } - virDomainDiskSetType(disk, VIR_STORAGE_TYPE_FILE); - disk->device = VIR_DOMAIN_DISK_DEVICE_FLOPPY; - if (VIR_STRDUP(disk->dst, fds[i]) < 0) { - virDomainDiskDefFree(disk); - goto error; - } - if (virDomainDiskSetSource(disk, "file") < 0) { - virDomainDiskDefFree(disk); - goto error; - } - disk->bus = VIR_DOMAIN_DISK_BUS_FDC; - - if (VIR_APPEND_ELEMENT(def->disks, def->ndisks, disk) < 0) { - virDomainDiskDefFree(disk); - goto error; - } - } - } - } - /* in case of HVM we have USB device emulation */ if (hvm && xenParseSxprUSB(def, root) < 0) @@ -2357,32 +2289,6 @@ xenFormatSxpr(virConnectPtr conn, } virBufferAsprintf(&buf, "(boot %s)", bootorder); - /* some disk devices are defined here */ - for (i = 0; i < def->ndisks; i++) { - const char *src = virDomainDiskGetSource(def->disks[i]); - - switch (def->disks[i]->device) { - case VIR_DOMAIN_DISK_DEVICE_CDROM: - /* Only xend <= 3.0.2 wants cdrom config here */ - if (xendConfigVersion != XEND_CONFIG_VERSION_3_0_2) - break; - if (STRNEQ(def->disks[i]->dst, "hdc") || !src) - break; - - virBufferEscapeSexpr(&buf, "(cdrom '%s')", src); - break; - - case VIR_DOMAIN_DISK_DEVICE_FLOPPY: - /* all xend versions define floppies here */ - virBufferEscapeSexpr(&buf, "(%s ", def->disks[i]->dst); - virBufferEscapeSexpr(&buf, "'%s')", src); - break; - - default: - break; - } - } - if (def->features[VIR_DOMAIN_FEATURE_ACPI] == VIR_TRISTATE_SWITCH_ON) virBufferAddLit(&buf, "(acpi 1)"); if (def->features[VIR_DOMAIN_FEATURE_APIC] == VIR_TRISTATE_SWITCH_ON) diff --git a/tests/xml2sexprdata/xml2sexpr-fv-force-hpet.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-force-hpet.sexpr index e1486b5..096229f 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-force-hpet.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-force-hpet.sexpr @@ -2,7 +2,7 @@ (uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial none)\ +(acpi 1)(usb 1)(parallel none)(serial none)\ (device_model '/usr/lib64/xen/bin/qemu-dm')(hpet 1)(vnc 1)))\ (localtime 0)\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-force-nohpet.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-force-nohpet.sexpr index a396cea..f9c5831 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-force-nohpet.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-force-nohpet.sexpr @@ -2,7 +2,7 @@ (uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial none)\ +(acpi 1)(usb 1)(parallel none)(serial none)\ (device_model '/usr/lib64/xen/bin/qemu-dm')(hpet 0)(vnc 1)))\ (localtime 0)\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr index 3ba7e96..e34f27a 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr @@ -2,7 +2,7 @@ (uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial none)\ +(acpi 1)(usb 1)(parallel none)(serial none)\ (device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (localtime 1)\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr index 14c5e5e..ce7cfbe 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr @@ -2,7 +2,7 @@ (uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel tcp:localhost:9999)\ +(acpi 1)(usb 1)(parallel tcp:localhost:9999)\ (serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (localtime 0)\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2-ports.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2-ports.sexpr index 16dcbf2..9d77ae9 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2-ports.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2-ports.sexpr @@ -2,7 +2,7 @@ (uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\ +(acpi 1)(usb 1)(parallel none)\ (serial (/dev/ttyS0 /dev/ttyS1))(device_model '/usr/lib64/xen/bin/qemu-dm')\ (vnc 1)))(localtime 0)\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2nd-port.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2nd-port.sexpr index 45a7585..5549b5f 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2nd-port.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2nd-port.sexpr @@ -2,7 +2,7 @@ (uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\ +(acpi 1)(usb 1)(parallel none)\ (serial (none /dev/ttyS1))(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (localtime 0)\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr index 90bd2b5..ec0d232 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr @@ -2,7 +2,7 @@ (uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\ +(acpi 1)(usb 1)(parallel none)\ (serial file:/tmp/serial.log)(device_model '/usr/lib64/xen/bin/qemu-dm')\ (vnc 1)))(localtime 0)\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr index 09f4a33..eac8291 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr @@ -2,7 +2,7 @@ (uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial null)\ +(acpi 1)(usb 1)(parallel none)(serial null)\ (device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (localtime 0)\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr index a620016..554d4cc 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr @@ -2,7 +2,7 @@ (uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\ +(acpi 1)(usb 1)(parallel none)\ (serial pipe:/tmp/serial.pipe)(device_model '/usr/lib64/xen/bin/qemu-dm')\ (vnc 1)))(localtime 0)\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr index 9ad9d42..f6673ca 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr @@ -2,7 +2,7 @@ (uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial pty)\ +(acpi 1)(usb 1)(parallel none)(serial pty)\ (device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (localtime 0)\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr index 9fc7837..dddd0a2 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr @@ -2,7 +2,7 @@ (uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial stdio)\ +(acpi 1)(usb 1)(parallel none)(serial stdio)\ (device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (localtime 0)\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp-telnet.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp-telnet.sexpr index 337ad51..90ad630 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp-telnet.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp-telnet.sexpr @@ -2,7 +2,7 @@ (uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\ +(acpi 1)(usb 1)(parallel none)\ (serial telnet:localhost:9999,server,nowait)\ (device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (localtime 0)\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr index e77ed9f..a6b6a85 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr @@ -2,7 +2,7 @@ (uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\ +(acpi 1)(usb 1)(parallel none)\ (serial tcp:localhost:9999,server,nowait)\ (device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (localtime 0)\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr index bb7487e..949b809 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr @@ -2,7 +2,7 @@ (uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\ +(acpi 1)(usb 1)(parallel none)\ (serial udp:localhost:9998@localhost:9999)\ (device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (localtime 0)\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr index 3686f42..accc3ce 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr @@ -2,7 +2,7 @@ (uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\ +(acpi 1)(usb 1)(parallel none)\ (serial unix:/tmp/serial.sock,server,nowait)\ (device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (localtime 0)\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr index c00f833..5109736 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr @@ -2,7 +2,7 @@ (uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial none)\ +(acpi 1)(usb 1)(parallel none)(serial none)\ (soundhw 'sb16,es1370')(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (localtime 0)\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr index e8733dc..295c1f6 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr @@ -2,7 +2,7 @@ (uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(usbdevice mouse)(parallel none)\ +(acpi 1)(usb 1)(usbdevice mouse)(parallel none)\ (serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (localtime 0)\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr index b39c832..13fff40 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr @@ -2,7 +2,7 @@ (uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial none)\ +(acpi 1)(usb 1)(parallel none)(serial none)\ (device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (localtime 0)\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv.sexpr b/tests/xml2sexprdata/xml2sexpr-fv.sexpr index b39c832..13fff40 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv.sexpr @@ -2,7 +2,7 @@ (uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ -(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial none)\ +(acpi 1)(usb 1)(parallel none)(serial none)\ (device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ (localtime 0)\ (device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ -- 2.1.4

Change all xml2sexpr tests to use the latest XEND_CONFIG_VERSION (XEND_CONFIG_VERSION_3_1_0 = 4). Fix tests that do not conform to the latest version. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr | 4 +- tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-curmem.sexpr | 2 +- .../xml2sexpr-disk-block-shareable.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-disk-block.sexpr | 2 +- .../xml2sexprdata/xml2sexpr-disk-drv-blkback.sexpr | 2 +- .../xml2sexpr-disk-drv-blktap-qcow.sexpr | 2 +- .../xml2sexpr-disk-drv-blktap-raw.sexpr | 2 +- .../xml2sexprdata/xml2sexpr-disk-drv-blktap.sexpr | 2 +- .../xml2sexpr-disk-drv-blktap2-raw.sexpr | 2 +- .../xml2sexprdata/xml2sexpr-disk-drv-blktap2.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-disk-drv-loop.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-disk-file.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-escape.sexpr | 6 +- tests/xml2sexprdata/xml2sexpr-fv-force-hpet.sexpr | 8 +- .../xml2sexprdata/xml2sexpr-fv-force-nohpet.sexpr | 8 +- tests/xml2sexprdata/xml2sexpr-fv-kernel.sexpr | 5 +- tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr | 8 +- .../xml2sexprdata/xml2sexpr-fv-net-netfront.sexpr | 5 +- .../xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr | 8 +- .../xml2sexpr-fv-serial-dev-2-ports.sexpr | 11 +- .../xml2sexpr-fv-serial-dev-2nd-port.sexpr | 8 +- tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr | 11 +- tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr | 8 +- tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr | 11 +- tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr | 8 +- .../xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr | 8 +- .../xml2sexpr-fv-serial-tcp-telnet.sexpr | 8 +- tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr | 8 +- tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr | 8 +- tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr | 8 +- tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr | 8 +- tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr | 8 +- tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr | 8 +- tests/xml2sexprdata/xml2sexpr-fv-v2.sexpr | 4 +- tests/xml2sexprdata/xml2sexpr-fv-vncunused.sexpr | 4 +- tests/xml2sexprdata/xml2sexpr-fv.sexpr | 8 +- tests/xml2sexprdata/xml2sexpr-net-bridged.sexpr | 3 +- tests/xml2sexprdata/xml2sexpr-net-e1000.sexpr | 3 +- tests/xml2sexprdata/xml2sexpr-net-routed.sexpr | 3 +- .../xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr | 6 +- tests/xml2sexprdata/xml2sexpr-pci-devs.sexpr | 2 +- .../xml2sexpr-pv-bootloader-cmdline.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr | 6 +- tests/xml2sexprdata/xml2sexpr-pv-vcpus.sexpr | 3 +- .../xml2sexprdata/xml2sexpr-pv-vfb-new-auto.sexpr | 3 +- tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr | 3 +- tests/xml2sexprdata/xml2sexpr-pv.sexpr | 3 +- tests/xml2sexprtest.c | 113 ++++++++++----------- 50 files changed, 208 insertions(+), 157 deletions(-) diff --git a/tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr b/tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr index 4850bc0..923d282 100644 --- a/tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr @@ -1,6 +1,6 @@ (vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\ (uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\ (on_reboot 'destroy')(on_crash 'destroy')(image (linux \ -(kernel '/usr/lib/xen/boot/pv-grub-x86_64.gz')(args '(hd0,0)/grub/menu.lst')))\ -(localtime 0)\ +(kernel '/usr/lib/xen/boot/pv-grub-x86_64.gz')(args '(hd0,0)/grub/menu.lst')\ +(localtime 0)))(localtime 0)\ (device (vbd (dev 'xvda')(uname 'phy:/dev/MainVG/GuestLV')(mode 'w'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.sexpr b/tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.sexpr index 47c4a3e..6830507 100644 --- a/tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.sexpr @@ -4,7 +4,7 @@ (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\ (ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\ (args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ -core/test/5.91/x86_64/os ')))\ +core/test/5.91/x86_64/os ')(localtime 0)))\ (localtime 0)\ (device (vbd (dev 'xvda')\ (uname 'file:/root/some.img')(mode 'w')))\ diff --git a/tests/xml2sexprdata/xml2sexpr-curmem.sexpr b/tests/xml2sexprdata/xml2sexpr-curmem.sexpr index 89d48b2..4b9fbb3 100644 --- a/tests/xml2sexprdata/xml2sexpr-curmem.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-curmem.sexpr @@ -1,7 +1,7 @@ (vm (name 'rhel5')(memory 175)(maxmem 385)(vcpus 1)\ (uuid '4f77abd2-3019-58e8-3bab-6fbf2118f880')(bootloader '/usr/bin/pygrub')\ (on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')\ -(localtime 0)\ +(image (linux (localtime 0)))(localtime 0)\ (device (tap (dev 'xvda')(uname 'tap:aio:/xen/rhel5.img')(mode 'w')))\ (device (vif (mac '00:16:3e:1d:06:15')(bridge 'xenbr0')\ (script 'vif-bridge'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-disk-block-shareable.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-block-shareable.sexpr index dd03f7b..e013136 100644 --- a/tests/xml2sexprdata/xml2sexpr-disk-block-shareable.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-disk-block-shareable.sexpr @@ -1,7 +1,7 @@ (vm (name 'pvtest')(memory 384)(maxmem 512)(vcpus 1)\ (uuid '49a0c6ff-c066-5392-6498-3632d093c2e7')(bootloader '/usr/bin/pygrub')\ (on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')\ -(image (linux (args 'ro root=/dev/VolGroup00/LogVol00')))\ +(image (linux (args 'ro root=/dev/VolGroup00/LogVol00')(localtime 0)))\ (localtime 0)\ (device (tap (dev 'xvda')(uname 'tap:aio:/var/lib/xen/images/rhel5pv.img')\ (mode 'w!')))\ diff --git a/tests/xml2sexprdata/xml2sexpr-disk-block.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-block.sexpr index b04c618..ce1fd23 100644 --- a/tests/xml2sexprdata/xml2sexpr-disk-block.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-disk-block.sexpr @@ -4,7 +4,7 @@ (image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\ (ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\ (args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ -core/test/5.91/x86_64/os ')))\ +core/test/5.91/x86_64/os ')(localtime 0)))\ (localtime 0)\ (device (vbd (dev 'xvda')\ (uname 'phy:/dev/MainVG/GuestLV')(mode 'w'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blkback.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-drv-blkback.sexpr index b04c618..ce1fd23 100644 --- a/tests/xml2sexprdata/xml2sexpr-disk-drv-blkback.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blkback.sexpr @@ -4,7 +4,7 @@ (image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\ (ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\ (args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ -core/test/5.91/x86_64/os ')))\ +core/test/5.91/x86_64/os ')(localtime 0)))\ (localtime 0)\ (device (vbd (dev 'xvda')\ (uname 'phy:/dev/MainVG/GuestLV')(mode 'w'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-qcow.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-qcow.sexpr index 6341d04..d44de4f 100644 --- a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-qcow.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-qcow.sexpr @@ -4,7 +4,7 @@ (image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\ (ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\ (args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ -core/test/5.91/x86_64/os ')))\ +core/test/5.91/x86_64/os ')(localtime 0)))\ (localtime 0)\ (device (tap (dev 'xvda')\ (uname 'tap:qcow:/root/some.img')(mode 'w'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-raw.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-raw.sexpr index 6a6a43a..47e0036 100644 --- a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-raw.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-raw.sexpr @@ -4,7 +4,7 @@ (image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\ (ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\ (args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ -core/test/5.91/x86_64/os ')))\ +core/test/5.91/x86_64/os ')(localtime 0)))\ (localtime 0)\ (device (tap (dev 'xvda')\ (uname 'tap:aio:/root/some.img')(mode 'w'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap.sexpr index 6a6a43a..47e0036 100644 --- a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap.sexpr @@ -4,7 +4,7 @@ (image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\ (ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\ (args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ -core/test/5.91/x86_64/os ')))\ +core/test/5.91/x86_64/os ')(localtime 0)))\ (localtime 0)\ (device (tap (dev 'xvda')\ (uname 'tap:aio:/root/some.img')(mode 'w'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2-raw.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2-raw.sexpr index b1caabb..bc6c923 100644 --- a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2-raw.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2-raw.sexpr @@ -4,7 +4,7 @@ (image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\ (ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\ (args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ -core/test/5.91/x86_64/os ')))\ +core/test/5.91/x86_64/os ')(localtime 0)))\ (localtime 0)\ (device (tap2 (dev 'xvda')\ (uname 'tap2:aio:/root/some.img')(mode 'w'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.sexpr index b1caabb..bc6c923 100644 --- a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.sexpr @@ -4,7 +4,7 @@ (image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\ (ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\ (args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ -core/test/5.91/x86_64/os ')))\ +core/test/5.91/x86_64/os ')(localtime 0)))\ (localtime 0)\ (device (tap2 (dev 'xvda')\ (uname 'tap2:aio:/root/some.img')(mode 'w'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-loop.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-drv-loop.sexpr index 8bf6d7a..be7ce1a 100644 --- a/tests/xml2sexprdata/xml2sexpr-disk-drv-loop.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-loop.sexpr @@ -4,7 +4,7 @@ (image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\ (ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\ (args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ -core/test/5.91/x86_64/os ')))\ +core/test/5.91/x86_64/os ')(localtime 0)))\ (localtime 0)\ (device (vbd (dev 'xvda')\ (uname 'file:/root/some.img')(mode 'w'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-disk-file.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-file.sexpr index 8bf6d7a..be7ce1a 100644 --- a/tests/xml2sexprdata/xml2sexpr-disk-file.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-disk-file.sexpr @@ -4,7 +4,7 @@ (image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\ (ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\ (args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ -core/test/5.91/x86_64/os ')))\ +core/test/5.91/x86_64/os ')(localtime 0)))\ (localtime 0)\ (device (vbd (dev 'xvda')\ (uname 'file:/root/some.img')(mode 'w'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-escape.sexpr b/tests/xml2sexprdata/xml2sexpr-escape.sexpr index 7f70adb..3c2ab8c 100644 --- a/tests/xml2sexprdata/xml2sexpr-escape.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-escape.sexpr @@ -6,6 +6,6 @@ (args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ core/test/5.91/x86_64/os&version="devel" ')\ (loader '/usr/lib/xen/boot/hvmloader')(vcpus 2)(boot c)(usb 1)(parallel none)\ -(serial pty)(device_model '/usr/lib/xen/bin/qemu-dm')))\ -(localtime 0)\ -(device (vbd (dev 'ioemu:xvda')(uname 'file:/root/\'\\some.img')(mode 'w'))))\ +(serial pty)(device_model '/usr/lib/xen/bin/qemu-dm')(rtc_timeoffset 0)\ +(localtime 0)))(localtime 0)\ +(device (vbd (dev 'xvda:disk')(uname 'file:/root/\'\\some.img')(mode 'w')))) diff --git a/tests/xml2sexprdata/xml2sexpr-fv-force-hpet.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-force-hpet.sexpr index 096229f..a6dcf1d 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-force-hpet.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-force-hpet.sexpr @@ -3,8 +3,10 @@ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ (acpi 1)(usb 1)(parallel none)(serial none)\ -(device_model '/usr/lib64/xen/bin/qemu-dm')(hpet 1)(vnc 1)))\ +(device_model '/usr/lib64/xen/bin/qemu-dm')(hpet 1)(vnc 1)\ +(vncunused 0)(vncdisplay 17)(keymap 'ja')(rtc_timeoffset 0)(localtime 0)))\ (localtime 0)\ -(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\ -(model 'e1000')(type ioemu))))\ +(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-force-nohpet.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-force-nohpet.sexpr index f9c5831..ffa3361 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-force-nohpet.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-force-nohpet.sexpr @@ -3,8 +3,10 @@ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ (acpi 1)(usb 1)(parallel none)(serial none)\ -(device_model '/usr/lib64/xen/bin/qemu-dm')(hpet 0)(vnc 1)))\ +(device_model '/usr/lib64/xen/bin/qemu-dm')(hpet 0)(vnc 1)\ +(vncunused 0)(vncdisplay 17)(keymap 'ja')(rtc_timeoffset 0)(localtime 0)))\ (localtime 0)\ -(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\ -(model 'e1000')(type ioemu))))\ +(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-kernel.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-kernel.sexpr index edaa775..e2c1595 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-kernel.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-kernel.sexpr @@ -6,6 +6,7 @@ (args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ core/test/5.91/x86_64/os ')(loader '/usr/lib/xen/boot/hvmloader')(vcpus 2)\ (boot c)(usb 1)(parallel none)(serial pty)\ -(device_model '/usr/lib/xen/bin/qemu-dm')))\ +(device_model '/usr/lib/xen/bin/qemu-dm')\ +(rtc_timeoffset 0)(localtime 0)))\ (localtime 0)\ -(device (vbd (dev 'ioemu:xvda')(uname 'file:/root/some.img')(mode 'w'))))\ +(device (vbd (dev 'xvda:disk')(uname 'file:/root/some.img')(mode 'w'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr index e34f27a..609fddd 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr @@ -3,8 +3,10 @@ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ (acpi 1)(usb 1)(parallel none)(serial none)\ -(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ +(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)\ +(vncunused 0)(vncdisplay 17)(keymap 'ja')(rtc_timeoffset 0)(localtime 1)))\ (localtime 1)\ -(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\ -(model 'e1000')(type ioemu))))\ +(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-net-netfront.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-net-netfront.sexpr index cab2d96..4e78d58 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-net-netfront.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-net-netfront.sexpr @@ -3,7 +3,8 @@ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(acpi 1)\ (usb 1)(parallel none)(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')\ -(vnc 1)))(localtime 0)\ -(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')\ +(vnc 1)(vncunused 0)(vncdisplay 17)(keymap 'ja')(rtc_timeoffset 0)(localtime 0)))\ +(localtime 0)\ +(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')\ (mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ (script 'vif-bridge')(type netfront))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr index ce7cfbe..549ada3 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr @@ -3,8 +3,10 @@ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ (acpi 1)(usb 1)(parallel tcp:localhost:9999)\ -(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ +(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)\ +(vncunused 0)(vncdisplay 17)(keymap 'ja')(rtc_timeoffset 0)(localtime 0)))\ (localtime 0)\ -(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\ -(model 'e1000')(type ioemu))))\ +(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2-ports.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2-ports.sexpr index 9d77ae9..603108a 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2-ports.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2-ports.sexpr @@ -4,7 +4,10 @@ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ (acpi 1)(usb 1)(parallel none)\ (serial (/dev/ttyS0 /dev/ttyS1))(device_model '/usr/lib64/xen/bin/qemu-dm')\ -(vnc 1)))(localtime 0)\ -(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')\ -(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ -(script 'vif-bridge')(model 'e1000')(type ioemu))))\ +(vnc 1)\ +(vncunused 0)(vncdisplay 17)(keymap 'ja')(rtc_timeoffset 0)(localtime 0)))\ +(localtime 0)\ +(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ +(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ +(script 'vif-bridge')(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2nd-port.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2nd-port.sexpr index 5549b5f..461c505 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2nd-port.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2nd-port.sexpr @@ -3,8 +3,10 @@ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ (acpi 1)(usb 1)(parallel none)\ -(serial (none /dev/ttyS1))(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ +(serial (none /dev/ttyS1))(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)\ +(vncunused 0)(vncdisplay 17)(keymap 'ja')(rtc_timeoffset 0)(localtime 0)))\ (localtime 0)\ -(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\ -(model 'e1000')(type ioemu))))\ +(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr index ec0d232..04e21f0 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr @@ -4,7 +4,10 @@ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ (acpi 1)(usb 1)(parallel none)\ (serial file:/tmp/serial.log)(device_model '/usr/lib64/xen/bin/qemu-dm')\ -(vnc 1)))(localtime 0)\ -(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')\ -(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ -(script 'vif-bridge')(model 'e1000')(type ioemu))))\ +(vnc 1)\ +(vncunused 0)(vncdisplay 17)(keymap 'ja')(rtc_timeoffset 0)(localtime 0)))\ +(localtime 0)\ +(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ +(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ +(script 'vif-bridge')(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr index eac8291..82d3211 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr @@ -3,8 +3,10 @@ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ (acpi 1)(usb 1)(parallel none)(serial null)\ -(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ +(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)\ +(vncunused 0)(vncdisplay 17)(keymap 'ja')(rtc_timeoffset 0)(localtime 0)))\ (localtime 0)\ -(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\ -(model 'e1000')(type ioemu))))\ +(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr index 554d4cc..1c060e9 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr @@ -4,7 +4,10 @@ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ (acpi 1)(usb 1)(parallel none)\ (serial pipe:/tmp/serial.pipe)(device_model '/usr/lib64/xen/bin/qemu-dm')\ -(vnc 1)))(localtime 0)\ -(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')\ -(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ -(script 'vif-bridge')(model 'e1000')(type ioemu))))\ +(vnc 1)\ +(vncunused 0)(vncdisplay 17)(keymap 'ja')(rtc_timeoffset 0)(localtime 0)))\ +(localtime 0)\ +(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ +(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\ +(script 'vif-bridge')(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr index f6673ca..67b4554 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr @@ -3,8 +3,10 @@ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ (acpi 1)(usb 1)(parallel none)(serial pty)\ -(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ +(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)\ +(vncunused 0)(vncdisplay 17)(keymap 'ja')(rtc_timeoffset 0)(localtime 0)))\ (localtime 0)\ -(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\ -(model 'e1000')(type ioemu))))\ +(model 'e1000')))) diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr index dddd0a2..2b00e77 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr @@ -3,8 +3,10 @@ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ (acpi 1)(usb 1)(parallel none)(serial stdio)\ -(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ +(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)\ +(vncunused 0)(vncdisplay 17)(keymap 'ja')(rtc_timeoffset 0)(localtime 0)))\ (localtime 0)\ -(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\ -(model 'e1000')(type ioemu))))\ +(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp-telnet.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp-telnet.sexpr index 90ad630..79dd27f 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp-telnet.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp-telnet.sexpr @@ -4,8 +4,10 @@ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ (acpi 1)(usb 1)(parallel none)\ (serial telnet:localhost:9999,server,nowait)\ -(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ +(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)\ +(vncunused 0)(vncdisplay 17)(keymap 'ja')(rtc_timeoffset 0)(localtime 0)))\ (localtime 0)\ -(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\ -(model 'e1000')(type ioemu))))\ +(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr index a6b6a85..cfc457f 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr @@ -4,8 +4,10 @@ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ (acpi 1)(usb 1)(parallel none)\ (serial tcp:localhost:9999,server,nowait)\ -(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ +(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)\ +(vncunused 0)(vncdisplay 17)(keymap 'ja')(rtc_timeoffset 0)(localtime 0)))\ (localtime 0)\ -(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\ -(model 'e1000')(type ioemu))))\ +(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr index 949b809..1d68353 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr @@ -4,8 +4,10 @@ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ (acpi 1)(usb 1)(parallel none)\ (serial udp:localhost:9998@localhost:9999)\ -(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ +(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)\ +(vncunused 0)(vncdisplay 17)(keymap 'ja')(rtc_timeoffset 0)(localtime 0)))\ (localtime 0)\ -(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\ -(model 'e1000')(type ioemu))))\ +(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr index accc3ce..e2b4234 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr @@ -4,8 +4,10 @@ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ (acpi 1)(usb 1)(parallel none)\ (serial unix:/tmp/serial.sock,server,nowait)\ -(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ +(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)\ +(vncunused 0)(vncdisplay 17)(keymap 'ja')(rtc_timeoffset 0)(localtime 0)))\ (localtime 0)\ -(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\ -(model 'e1000')(type ioemu))))\ +(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr index 5109736..cba6c9a 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr @@ -3,8 +3,10 @@ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ (acpi 1)(usb 1)(parallel none)(serial none)\ -(soundhw 'sb16,es1370')(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ +(soundhw 'sb16,es1370')(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)\ +(vncunused 0)(vncdisplay 17)(keymap 'ja')(rtc_timeoffset 0)(localtime 0)))\ (localtime 0)\ -(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\ -(model 'e1000')(type ioemu))))\ +(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr index 295c1f6..4ee94b4 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr @@ -3,8 +3,10 @@ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ (acpi 1)(usb 1)(usbdevice mouse)(parallel none)\ -(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ +(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)\ +(vncunused 0)(vncdisplay 17)(keymap 'ja')(rtc_timeoffset 0)(localtime 0)))\ (localtime 0)\ -(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\ -(model 'e1000')(type ioemu))))\ +(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr index 13fff40..efd5e40 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr @@ -3,8 +3,10 @@ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ (acpi 1)(usb 1)(parallel none)(serial none)\ -(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ +(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)\ +(vncunused 0)(vncdisplay 17)(keymap 'ja')(rtc_timeoffset 0)(localtime 0)))\ (localtime 0)\ -(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\ -(model 'e1000')(type ioemu))))\ +(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-v2.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-v2.sexpr index 78ecfb5..5256f08 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-v2.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-v2.sexpr @@ -3,9 +3,9 @@ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(acpi 1)\ (usb 1)(parallel none)(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')\ -(vnc 1)(vncunused 0)(vncdisplay 17)(keymap 'ja')))\ +(vnc 1)(vncunused 0)(vncdisplay 17)(keymap 'ja')(rtc_timeoffset 0)(localtime 0)))\ (localtime 0)\ (device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))\ (device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\ -(model 'e1000')(type ioemu))))\ +(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv-vncunused.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-vncunused.sexpr index 74c4174..25efd9a 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv-vncunused.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv-vncunused.sexpr @@ -3,9 +3,9 @@ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(acpi 1)\ (usb 1)(parallel none)(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')\ -(vnc 1)(vncunused 1)(keymap 'ja')))\ +(vnc 1)(vncunused 1)(keymap 'ja')(rtc_timeoffset 0)(localtime 0)))\ (localtime 0)(device (vbd (dev 'hda:disk')\ (uname 'file:/root/foo.img')(mode 'w')))(device (vbd (dev 'hdc:cdrom')\ (uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\ -(model 'e1000')(type ioemu))))\ +(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-fv.sexpr b/tests/xml2sexprdata/xml2sexpr-fv.sexpr index 13fff40..efd5e40 100644 --- a/tests/xml2sexprdata/xml2sexpr-fv.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-fv.sexpr @@ -3,8 +3,10 @@ (on_reboot 'restart')(on_crash 'restart')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\ (acpi 1)(usb 1)(parallel none)(serial none)\ -(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\ +(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)\ +(vncunused 0)(vncdisplay 17)(keymap 'ja')(rtc_timeoffset 0)(localtime 0)))\ (localtime 0)\ -(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))\ +(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\ (device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\ -(model 'e1000')(type ioemu))))\ +(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-net-bridged.sexpr b/tests/xml2sexprdata/xml2sexpr-net-bridged.sexpr index f595f80..a581fa0 100644 --- a/tests/xml2sexprdata/xml2sexpr-net-bridged.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-net-bridged.sexpr @@ -4,7 +4,8 @@ (image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\ (ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\ (args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ -core/test/5.91/x86_64/os ')))(localtime 0)(device (vbd (dev 'xvda')\ +core/test/5.91/x86_64/os ')(localtime 0)))\ +(localtime 0)(device (vbd (dev 'xvda')\ (uname 'file:/root/some.img')(mode 'w')))\ (device (vif (mac '00:11:22:33:44:55')(bridge 'xenbr2')\ (script 'vif-bridge'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-net-e1000.sexpr b/tests/xml2sexprdata/xml2sexpr-net-e1000.sexpr index d7367e6..4e650d4 100644 --- a/tests/xml2sexprdata/xml2sexpr-net-e1000.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-net-e1000.sexpr @@ -4,7 +4,8 @@ (image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\ (ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\ (args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ -core/test/5.91/x86_64/os ')))(localtime 0)(device (vbd (dev 'xvda')\ +core/test/5.91/x86_64/os ')(localtime 0)))\ +(localtime 0)(device (vbd (dev 'xvda')\ (uname 'file:/root/some.img')(mode 'w')))\ (device (vif (mac '00:11:22:33:44:55')(bridge 'xenbr2')\ (script 'vif-bridge')(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-net-routed.sexpr b/tests/xml2sexprdata/xml2sexpr-net-routed.sexpr index d502d4b..adc2dd0 100644 --- a/tests/xml2sexprdata/xml2sexpr-net-routed.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-net-routed.sexpr @@ -4,7 +4,8 @@ (image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\ (ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\ (args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ -core/test/5.91/x86_64/os ')))(localtime 0)(device (vbd (dev 'xvda')\ +core/test/5.91/x86_64/os ')(localtime 0)))\ +(localtime 0)(device (vbd (dev 'xvda')\ (uname 'file:/root/some.img')(mode 'w')))\ (device (vif (mac '00:11:22:33:44:55')(script 'vif-routed')\ (ip '172.14.5.6'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr b/tests/xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr index d5c05e9..cff05a8 100644 --- a/tests/xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr @@ -3,8 +3,8 @@ (on_reboot 'destroy')(on_crash 'destroy')\ (image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(acpi 1)\ (apic 1)(pae 1)(usb 1)(parallel none)(serial none)\ -(device_model '/usr/lib/xen/bin/qemu-dm')(vnc 1)(vncunused 0)(vncdisplay 6)))\ -(localtime 0)\ +(device_model '/usr/lib/xen/bin/qemu-dm')(vnc 1)(vncunused 0)(vncdisplay 6)\ +(rtc_timeoffset 0)(localtime 0)))(localtime 0)\ (device (vbd (dev 'hda:disk')(uname 'phy:/dev/sda8')(mode 'w')))\ (device (vbd (dev 'hdc:cdrom')(mode 'r')))\ -(device (vif (mac '00:16:3e:0a:7b:39')(model 'e1000')(type ioemu))))\ +(device (vif (mac '00:16:3e:0a:7b:39')(model 'e1000'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-pci-devs.sexpr b/tests/xml2sexprdata/xml2sexpr-pci-devs.sexpr index 5ab5d31..1ce3c1c 100644 --- a/tests/xml2sexprdata/xml2sexpr-pci-devs.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-pci-devs.sexpr @@ -4,7 +4,7 @@ (image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\ (ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\ (args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ -core/test/5.91/x86_64/os ')))(localtime 0)(device (vbd (dev 'xvda')\ +core/test/5.91/x86_64/os ')(localtime 0)))(localtime 0)(device (vbd (dev 'xvda')\ (uname 'phy:/dev/MainVG/GuestLV')(mode 'w')))\ (device (pci (dev (domain 0x0001)(bus 0x0c)(slot 0x1b)(func 0x2))\ (dev (domain 0x0000)(bus 0x01)(slot 0x13)(func 0x0)))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-pv-bootloader-cmdline.sexpr b/tests/xml2sexprdata/xml2sexpr-pv-bootloader-cmdline.sexpr index 7a3811e..7a592a4 100644 --- a/tests/xml2sexprdata/xml2sexpr-pv-bootloader-cmdline.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-pv-bootloader-cmdline.sexpr @@ -1,6 +1,6 @@ (vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\ (uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(bootloader '/usr/bin/pygrub')\ (bootloader_args '-q')(on_poweroff 'destroy')(on_reboot 'destroy')\ -(on_crash 'destroy')(image (linux (args 'xenfb.video=8,1280,1024')))\ +(on_crash 'destroy')(image (linux (args 'xenfb.video=8,1280,1024')(localtime 0)))\ (localtime 0)\ (device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr b/tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr index 981f105..7ecf6d2 100644 --- a/tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr @@ -2,6 +2,6 @@ (uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(bootloader '/usr/bin/pypxeboot')\ (bootloader_args 'mac=AA:00:86:e2:35:72')(on_poweroff 'destroy')\ (on_reboot 'destroy')(on_crash 'destroy')\ -(localtime 0)\ +(image (linux (localtime 0)))(localtime 0)\ (device (vbd (dev 'xvda')\ (uname 'file:/root/some.img')(mode 'w'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr b/tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr index 589bbdf..4effc92 100644 --- a/tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr @@ -1,6 +1,8 @@ (vm (name 'rhel5')(memory 175)(maxmem 385)(vcpus 1)\ (uuid '4f77abd2-3019-58e8-3bab-6fbf2118f880')(bootloader '/usr/bin/pygrub')\ -(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(localtime 1)\ +(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')\ +(image (linux (localtime 1)))(localtime 1)\ (device (tap (dev 'xvda')(uname 'tap:aio:/xen/rhel5.img')(mode 'w')))\ (device (vif (mac '00:16:3e:1d:06:15')(bridge 'xenbr0')\ -(script 'vif-bridge'))))\ +(script 'vif-bridge')))\ +(device (vkbd))(device (vfb (type vnc)(vncunused 0)(vncdisplay 5)))) diff --git a/tests/xml2sexprdata/xml2sexpr-pv-vcpus.sexpr b/tests/xml2sexprdata/xml2sexpr-pv-vcpus.sexpr index 809a7e5..7dba660 100644 --- a/tests/xml2sexprdata/xml2sexpr-pv-vcpus.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-pv-vcpus.sexpr @@ -4,5 +4,6 @@ (image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\ (ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\ (args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ -core/test/5.91/x86_64/os ')))(localtime 0)(device (vbd (dev 'xvda')\ +core/test/5.91/x86_64/os ')(localtime 0)))\ +(localtime 0)(device (vbd (dev 'xvda')\ (uname 'file:/root/some.img')(mode 'w'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-pv-vfb-new-auto.sexpr b/tests/xml2sexprdata/xml2sexpr-pv-vfb-new-auto.sexpr index 70d2edf..5d74e94 100644 --- a/tests/xml2sexprdata/xml2sexpr-pv-vfb-new-auto.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-pv-vfb-new-auto.sexpr @@ -4,7 +4,8 @@ (image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\ (ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\ (args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ -core/test/5.91/x86_64/os ')))(localtime 0)(device (vbd (dev 'xvda')\ +core/test/5.91/x86_64/os ')(localtime 0)))\ +(localtime 0)(device (vbd (dev 'xvda')\ (uname 'file:/root/some.img')(mode 'w')))(device (vkbd))\ (device (vfb (type vnc)(vncunused 1)(vnclisten '127.0.0.1')\ (vncpasswd '123456')(keymap 'ja'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr b/tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr index 9bace13..2ba35da 100644 --- a/tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr @@ -4,7 +4,8 @@ (image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\ (ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\ (args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ -core/test/5.91/x86_64/os ')))(localtime 0)(device (vbd (dev 'xvda')\ +core/test/5.91/x86_64/os ')(localtime 0)))\ +(localtime 0)(device (vbd (dev 'xvda')\ (uname 'file:/root/some.img')(mode 'w')))(device (vkbd))\ (device (vfb (type vnc)(vncunused 0)(vncdisplay 6)(vnclisten '127.0.0.1')\ (vncpasswd '123456')(keymap 'ja'))))\ diff --git a/tests/xml2sexprdata/xml2sexpr-pv.sexpr b/tests/xml2sexprdata/xml2sexpr-pv.sexpr index 90efcd7..ea26f8c 100644 --- a/tests/xml2sexprdata/xml2sexpr-pv.sexpr +++ b/tests/xml2sexprdata/xml2sexpr-pv.sexpr @@ -4,5 +4,6 @@ (image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\ (ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\ (args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\ -core/test/5.91/x86_64/os ')))(localtime 0)(device (vbd (dev 'xvda')\ +core/test/5.91/x86_64/os ')(localtime 0)))\ +(localtime 0)(device (vbd (dev 'xvda')\ (uname 'file:/root/some.img')(mode 'w'))))\ diff --git a/tests/xml2sexprtest.c b/tests/xml2sexprtest.c index d884a4b..246fae0 100644 --- a/tests/xml2sexprtest.c +++ b/tests/xml2sexprtest.c @@ -21,7 +21,7 @@ static virCapsPtr caps; static virDomainXMLOptionPtr xmlopt; static int -testCompareFiles(const char *xml, const char *sexpr, int xendConfigVersion) +testCompareFiles(const char *xml, const char *sexpr) { char *gotsexpr = NULL; int ret = -1; @@ -36,7 +36,7 @@ testCompareFiles(const char *xml, const char *sexpr, int xendConfigVersion) goto fail; } - if (!(gotsexpr = xenFormatSxpr(NULL, def, xendConfigVersion))) + if (!(gotsexpr = xenFormatSxpr(NULL, def, 4))) goto fail; if (virtTestCompareToFile(gotsexpr, sexpr) < 0) @@ -55,7 +55,6 @@ struct testInfo { const char *input; const char *output; const char *name; - int version; }; static int @@ -73,7 +72,7 @@ testCompareHelper(const void *data) goto cleanup; } - result = testCompareFiles(xml, args, info->version); + result = testCompareFiles(xml, args); cleanup: VIR_FREE(xml); @@ -87,9 +86,9 @@ mymain(void) { int ret = 0; -#define DO_TEST(in, out, name, version) \ +#define DO_TEST(in, out, name) \ do { \ - struct testInfo info = { in, out, name, version }; \ + struct testInfo info = { in, out, name }; \ virResetLastError(); \ if (virtTestRun("Xen XML-2-SEXPR " in " -> " out, \ testCompareHelper, &info) < 0) \ @@ -102,64 +101,64 @@ mymain(void) if (!(xmlopt = xenDomainXMLConfInit())) return EXIT_FAILURE; - DO_TEST("pv", "pv", "pvtest", 1); - DO_TEST("fv", "fv", "fvtest", 1); - DO_TEST("pv", "pv", "pvtest", 2); - DO_TEST("fv", "fv-v2", "fvtest", 2); - DO_TEST("fv-vncunused", "fv-vncunused", "fvtest", 2); - DO_TEST("pv-vfb-new", "pv-vfb-new", "pvtest", 3); - DO_TEST("pv-vfb-new-auto", "pv-vfb-new-auto", "pvtest", 3); - DO_TEST("pv-bootloader", "pv-bootloader", "pvtest", 1); - DO_TEST("pv-bootloader-cmdline", "pv-bootloader-cmdline", "pvtest", 1); - DO_TEST("pv-vcpus", "pv-vcpus", "pvtest", 1); + DO_TEST("pv", "pv", "pvtest"); + DO_TEST("fv", "fv", "fvtest"); + DO_TEST("pv", "pv", "pvtest"); + DO_TEST("fv", "fv-v2", "fvtest"); + DO_TEST("fv-vncunused", "fv-vncunused", "fvtest"); + DO_TEST("pv-vfb-new", "pv-vfb-new", "pvtest"); + DO_TEST("pv-vfb-new-auto", "pv-vfb-new-auto", "pvtest"); + DO_TEST("pv-bootloader", "pv-bootloader", "pvtest"); + DO_TEST("pv-bootloader-cmdline", "pv-bootloader-cmdline", "pvtest"); + DO_TEST("pv-vcpus", "pv-vcpus", "pvtest"); - DO_TEST("disk-file", "disk-file", "pvtest", 2); - DO_TEST("disk-block", "disk-block", "pvtest", 2); - DO_TEST("disk-block-shareable", "disk-block-shareable", "pvtest", 2); - DO_TEST("disk-drv-loop", "disk-drv-loop", "pvtest", 2); - DO_TEST("disk-drv-blkback", "disk-drv-blkback", "pvtest", 2); - DO_TEST("disk-drv-blktap", "disk-drv-blktap", "pvtest", 2); - DO_TEST("disk-drv-blktap-raw", "disk-drv-blktap-raw", "pvtest", 2); - DO_TEST("disk-drv-blktap-qcow", "disk-drv-blktap-qcow", "pvtest", 2); - DO_TEST("disk-drv-blktap2", "disk-drv-blktap2", "pvtest", 2); - DO_TEST("disk-drv-blktap2-raw", "disk-drv-blktap2-raw", "pvtest", 2); + DO_TEST("disk-file", "disk-file", "pvtest"); + DO_TEST("disk-block", "disk-block", "pvtest"); + DO_TEST("disk-block-shareable", "disk-block-shareable", "pvtest"); + DO_TEST("disk-drv-loop", "disk-drv-loop", "pvtest"); + DO_TEST("disk-drv-blkback", "disk-drv-blkback", "pvtest"); + DO_TEST("disk-drv-blktap", "disk-drv-blktap", "pvtest"); + DO_TEST("disk-drv-blktap-raw", "disk-drv-blktap-raw", "pvtest"); + DO_TEST("disk-drv-blktap-qcow", "disk-drv-blktap-qcow", "pvtest"); + DO_TEST("disk-drv-blktap2", "disk-drv-blktap2", "pvtest"); + DO_TEST("disk-drv-blktap2-raw", "disk-drv-blktap2-raw", "pvtest"); - DO_TEST("curmem", "curmem", "rhel5", 2); - DO_TEST("net-routed", "net-routed", "pvtest", 2); - DO_TEST("net-bridged", "net-bridged", "pvtest", 2); - DO_TEST("net-e1000", "net-e1000", "pvtest", 2); - DO_TEST("bridge-ipaddr", "bridge-ipaddr", "pvtest", 2); - DO_TEST("no-source-cdrom", "no-source-cdrom", "test", 2); - DO_TEST("pv-localtime", "pv-localtime", "pvtest", 1); - DO_TEST("pci-devs", "pci-devs", "pvtest", 2); + DO_TEST("curmem", "curmem", "rhel5"); + DO_TEST("net-routed", "net-routed", "pvtest"); + DO_TEST("net-bridged", "net-bridged", "pvtest"); + DO_TEST("net-e1000", "net-e1000", "pvtest"); + DO_TEST("bridge-ipaddr", "bridge-ipaddr", "pvtest"); + DO_TEST("no-source-cdrom", "no-source-cdrom", "test"); + DO_TEST("pv-localtime", "pv-localtime", "pvtest"); + DO_TEST("pci-devs", "pci-devs", "pvtest"); - DO_TEST("fv-utc", "fv-utc", "fvtest", 1); - DO_TEST("fv-localtime", "fv-localtime", "fvtest", 1); - DO_TEST("fv-usbmouse", "fv-usbmouse", "fvtest", 1); - DO_TEST("fv-usbmouse", "fv-usbmouse", "fvtest", 1); - DO_TEST("fv-kernel", "fv-kernel", "fvtest", 1); - DO_TEST("fv-force-hpet", "fv-force-hpet", "fvtest", 1); - DO_TEST("fv-force-nohpet", "fv-force-nohpet", "fvtest", 1); + DO_TEST("fv-utc", "fv-utc", "fvtest"); + DO_TEST("fv-localtime", "fv-localtime", "fvtest"); + DO_TEST("fv-usbmouse", "fv-usbmouse", "fvtest"); + DO_TEST("fv-usbmouse", "fv-usbmouse", "fvtest"); + DO_TEST("fv-kernel", "fv-kernel", "fvtest"); + DO_TEST("fv-force-hpet", "fv-force-hpet", "fvtest"); + DO_TEST("fv-force-nohpet", "fv-force-nohpet", "fvtest"); - DO_TEST("fv-serial-null", "fv-serial-null", "fvtest", 1); - DO_TEST("fv-serial-file", "fv-serial-file", "fvtest", 1); - DO_TEST("fv-serial-dev-2-ports", "fv-serial-dev-2-ports", "fvtest", 1); - DO_TEST("fv-serial-dev-2nd-port", "fv-serial-dev-2nd-port", "fvtest", 1); - DO_TEST("fv-serial-stdio", "fv-serial-stdio", "fvtest", 1); - DO_TEST("fv-serial-pty", "fv-serial-pty", "fvtest", 1); - DO_TEST("fv-serial-pipe", "fv-serial-pipe", "fvtest", 1); - DO_TEST("fv-serial-tcp", "fv-serial-tcp", "fvtest", 1); - DO_TEST("fv-serial-udp", "fv-serial-udp", "fvtest", 1); - DO_TEST("fv-serial-tcp-telnet", "fv-serial-tcp-telnet", "fvtest", 1); - DO_TEST("fv-serial-unix", "fv-serial-unix", "fvtest", 1); - DO_TEST("fv-parallel-tcp", "fv-parallel-tcp", "fvtest", 1); + DO_TEST("fv-serial-null", "fv-serial-null", "fvtest"); + DO_TEST("fv-serial-file", "fv-serial-file", "fvtest"); + DO_TEST("fv-serial-dev-2-ports", "fv-serial-dev-2-ports", "fvtest"); + DO_TEST("fv-serial-dev-2nd-port", "fv-serial-dev-2nd-port", "fvtest"); + DO_TEST("fv-serial-stdio", "fv-serial-stdio", "fvtest"); + DO_TEST("fv-serial-pty", "fv-serial-pty", "fvtest"); + DO_TEST("fv-serial-pipe", "fv-serial-pipe", "fvtest"); + DO_TEST("fv-serial-tcp", "fv-serial-tcp", "fvtest"); + DO_TEST("fv-serial-udp", "fv-serial-udp", "fvtest"); + DO_TEST("fv-serial-tcp-telnet", "fv-serial-tcp-telnet", "fvtest"); + DO_TEST("fv-serial-unix", "fv-serial-unix", "fvtest"); + DO_TEST("fv-parallel-tcp", "fv-parallel-tcp", "fvtest"); - DO_TEST("fv-sound", "fv-sound", "fvtest", 1); + DO_TEST("fv-sound", "fv-sound", "fvtest"); - DO_TEST("fv-net-netfront", "fv-net-netfront", "fvtest", 1); + DO_TEST("fv-net-netfront", "fv-net-netfront", "fvtest"); - DO_TEST("boot-grub", "boot-grub", "fvtest", 1); - DO_TEST("escape", "escape", "fvtest", 1); + DO_TEST("boot-grub", "boot-grub", "fvtest"); + DO_TEST("escape", "escape", "fvtest"); virObjectUnref(caps); virObjectUnref(xmlopt); -- 2.1.4

Remove use of XEND_CONFIG_VERSION_* in s-expression parser/formatter. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- src/xenconfig/xen_sxpr.c | 285 ++++++++++++++++++----------------------------- 1 file changed, 107 insertions(+), 178 deletions(-) diff --git a/src/xenconfig/xen_sxpr.c b/src/xenconfig/xen_sxpr.c index 3e3b43f..defff23 100644 --- a/src/xenconfig/xen_sxpr.c +++ b/src/xenconfig/xen_sxpr.c @@ -58,17 +58,14 @@ int xenGetDomIdFromSxprString(const char *sexpr, int xendConfigVersion, int *id) } /* Get a domain id from a S-expression */ -int xenGetDomIdFromSxpr(const struct sexpr *root, int xendConfigVersion, int *id) +int xenGetDomIdFromSxpr(const struct sexpr *root, + int xendConfigVersion ATTRIBUTE_UNUSED, + int *id) { const char * tmp = sexpr_node(root, "domain/domid"); - if (tmp == NULL && xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) { /* domid was mandatory */ - virReportError(VIR_ERR_INTERNAL_ERROR, - "%s", _("domain information incomplete, missing id")); - return -1; - } else { - *id = tmp ? sexpr_int(root, "domain/domid") : -1; - return 0; - } + + *id = tmp ? sexpr_int(root, "domain/domid") : -1; + return 0; } /***************************************************************** @@ -335,7 +332,7 @@ static int xenParseSxprDisks(virDomainDefPtr def, const struct sexpr *root, int hvm, - int xendConfigVersion) + int xendConfigVersion ATTRIBUTE_UNUSED) { const struct sexpr *cur, *node; virDomainDiskDefPtr disk = NULL; @@ -466,19 +463,16 @@ xenParseSxprDisks(virDomainDefPtr def, dst += 6; disk->device = VIR_DOMAIN_DISK_DEVICE_DISK; - /* New style disk config from Xen >= 3.0.3 */ - if (xendConfigVersion >= XEND_CONFIG_VERSION_3_0_3) { - offset = strrchr(dst, ':'); - if (offset) { - if (STREQ(offset, ":cdrom")) { - disk->device = VIR_DOMAIN_DISK_DEVICE_CDROM; - } else if (STREQ(offset, ":disk")) { - /* The default anyway */ - } else { - /* Unknown, lets pretend its a disk too */ - } - offset[0] = '\0'; + offset = strrchr(dst, ':'); + if (offset) { + if (STREQ(offset, ":cdrom")) { + disk->device = VIR_DOMAIN_DISK_DEVICE_CDROM; + } else if (STREQ(offset, ":disk")) { + /* The default anyway */ + } else { + /* Unknown, lets pretend its a disk too */ } + offset[0] = '\0'; } if (VIR_STRDUP(disk->dst, dst) < 0) @@ -771,7 +765,8 @@ static int xenParseSxprGraphicsOld(virDomainDefPtr def, const struct sexpr *root, int hvm, - int xendConfigVersion, int vncport) + int xendConfigVersion ATTRIBUTE_UNUSED, + int vncport) { const char *tmp; virDomainGraphicsDefPtr graphics = NULL; @@ -791,15 +786,6 @@ xenParseSxprGraphicsOld(virDomainDefPtr def, goto error; graphics->type = VIR_DOMAIN_GRAPHICS_TYPE_VNC; - /* For Xen >= 3.0.3, don't generate a fixed port mapping - * because it will almost certainly be wrong ! Just leave - * it as -1 which lets caller see that the VNC server isn't - * present yet. Subsequent dumps of the XML will eventually - * find the port in XenStore once VNC server has started - */ - if (port == -1 && xendConfigVersion < XEND_CONFIG_VERSION_3_0_3) - port = 5900 + def->id; - if ((unused && STREQ(unused, "1")) || port == -1) graphics->data.vnc.autoport = true; graphics->data.vnc.port = port; @@ -1098,11 +1084,6 @@ xenParseSxpr(const struct sexpr *root, goto error; tmp = sexpr_node(root, "domain/domid"); - if (tmp == NULL && xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) { /* domid was mandatory */ - virReportError(VIR_ERR_INTERNAL_ERROR, - "%s", _("domain information incomplete, missing id")); - goto error; - } def->virtType = VIR_DOMAIN_VIRT_XEN; if (tmp) def->id = sexpr_int(root, "domain/domid"); @@ -1234,6 +1215,8 @@ xenParseSxpr(const struct sexpr *root, vmlocaltime = sexpr_int(root, "domain/localtime"); if (hvm) { const char *value = sexpr_node(root, "domain/image/hvm/localtime"); + int rtc_offset; + if (value) { if (virStrToLong_i(value, NULL, 0, &vmlocaltime) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, @@ -1241,22 +1224,12 @@ xenParseSxpr(const struct sexpr *root, goto error; } } - /* only managed HVM domains since 3.1.0 have persistent rtc_timeoffset */ - if (xendConfigVersion < XEND_CONFIG_VERSION_3_1_0) { - if (vmlocaltime) - def->clock.offset = VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME; - else - def->clock.offset = VIR_DOMAIN_CLOCK_OFFSET_UTC; - def->clock.data.utc_reset = true; - } else { - int rtc_offset; - def->clock.offset = VIR_DOMAIN_CLOCK_OFFSET_VARIABLE; - rtc_offset = sexpr_int(root, "domain/image/hvm/rtc_timeoffset"); - def->clock.data.variable.adjustment = rtc_offset; - def->clock.data.variable.basis = vmlocaltime ? - VIR_DOMAIN_CLOCK_BASIS_LOCALTIME : - VIR_DOMAIN_CLOCK_BASIS_UTC; - } + def->clock.offset = VIR_DOMAIN_CLOCK_OFFSET_VARIABLE; + rtc_offset = sexpr_int(root, "domain/image/hvm/rtc_timeoffset"); + def->clock.data.variable.adjustment = rtc_offset; + def->clock.data.variable.basis = vmlocaltime ? + VIR_DOMAIN_CLOCK_BASIS_LOCALTIME : + VIR_DOMAIN_CLOCK_BASIS_UTC; if (sexpr_lookup(root, "domain/image/hvm/hpet")) { virDomainTimerDefPtr timer; @@ -1536,7 +1509,7 @@ xenFormatSxprGraphicsNew(virDomainGraphicsDefPtr def, static int xenFormatSxprGraphicsOld(virDomainGraphicsDefPtr def, virBufferPtr buf, - int xendConfigVersion) + int xendConfigVersion ATTRIBUTE_UNUSED) { const char *listenAddr; @@ -1556,23 +1529,20 @@ xenFormatSxprGraphicsOld(virDomainGraphicsDefPtr def, virBufferAsprintf(buf, "(xauthority '%s')", def->data.sdl.xauth); } else if (def->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC) { virBufferAddLit(buf, "(vnc 1)"); - if (xendConfigVersion >= XEND_CONFIG_VERSION_3_0_3) { - if (def->data.vnc.autoport) { - virBufferAddLit(buf, "(vncunused 1)"); - } else { - virBufferAddLit(buf, "(vncunused 0)"); - virBufferAsprintf(buf, "(vncdisplay %d)", def->data.vnc.port-5900); - } - - listenAddr = virDomainGraphicsListenGetAddress(def, 0); - if (listenAddr) - virBufferAsprintf(buf, "(vnclisten '%s')", listenAddr); - if (def->data.vnc.auth.passwd) - virBufferAsprintf(buf, "(vncpasswd '%s')", def->data.vnc.auth.passwd); - if (def->data.vnc.keymap) - virBufferAsprintf(buf, "(keymap '%s')", def->data.vnc.keymap); - + if (def->data.vnc.autoport) { + virBufferAddLit(buf, "(vncunused 1)"); + } else { + virBufferAddLit(buf, "(vncunused 0)"); + virBufferAsprintf(buf, "(vncdisplay %d)", def->data.vnc.port-5900); } + + listenAddr = virDomainGraphicsListenGetAddress(def, 0); + if (listenAddr) + virBufferAsprintf(buf, "(vnclisten '%s')", listenAddr); + if (def->data.vnc.auth.passwd) + virBufferAsprintf(buf, "(vncpasswd '%s')", def->data.vnc.auth.passwd); + if (def->data.vnc.keymap) + virBufferAsprintf(buf, "(keymap '%s')", def->data.vnc.keymap); } return 0; @@ -1680,7 +1650,7 @@ int xenFormatSxprDisk(virDomainDiskDefPtr def, virBufferPtr buf, int hvm, - int xendConfigVersion, + int xendConfigVersion ATTRIBUTE_UNUSED, int isAttach) { const char *src = virDomainDiskGetSource(def); @@ -1699,18 +1669,6 @@ xenFormatSxprDisk(virDomainDiskDefPtr def, return 0; } - /* Xend <= 3.0.2 doesn't include cdrom config here */ - if (hvm && - def->device == VIR_DOMAIN_DISK_DEVICE_CDROM && - xendConfigVersion == XEND_CONFIG_VERSION_3_0_2) { - if (isAttach) { - virReportError(VIR_ERR_INVALID_ARG, - _("Cannot directly attach CDROM %s"), src); - return -1; - } - return 0; - } - if (!isAttach) virBufferAddLit(buf, "(device "); @@ -1726,16 +1684,10 @@ xenFormatSxprDisk(virDomainDiskDefPtr def, } if (hvm) { - /* Xend <= 3.0.2 wants a ioemu: prefix on devices for HVM */ - if (xendConfigVersion == XEND_CONFIG_VERSION_3_0_2) { - virBufferEscapeSexpr(buf, "(dev 'ioemu:%s')", def->dst); - } else { - /* But newer does not */ - virBufferEscapeSexpr(buf, "(dev '%s:", def->dst); - virBufferAsprintf(buf, "%s')", - def->device == VIR_DOMAIN_DISK_DEVICE_CDROM ? - "cdrom" : "disk"); - } + virBufferEscapeSexpr(buf, "(dev '%s:", def->dst); + virBufferAsprintf(buf, "%s')", + def->device == VIR_DOMAIN_DISK_DEVICE_CDROM ? + "cdrom" : "disk"); } else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) { virBufferEscapeSexpr(buf, "(dev '%s:cdrom')", def->dst); } else { @@ -1821,7 +1773,7 @@ xenFormatSxprNet(virConnectPtr conn, virDomainNetDefPtr def, virBufferPtr buf, int hvm, - int xendConfigVersion, + int xendConfigVersion ATTRIBUTE_UNUSED, int isAttach) { const char *script = DEFAULT_VIF_SCRIPT; @@ -1935,12 +1887,6 @@ xenFormatSxprNet(virConnectPtr conn, } else { if (def->model != NULL) virBufferEscapeSexpr(buf, "(model '%s')", def->model); - /* - * apparently (type ioemu) breaks paravirt drivers on HVM so skip - * this from XEND_CONFIG_MAX_VERS_NET_TYPE_IOEMU - */ - if (xendConfigVersion <= XEND_CONFIG_MAX_VERS_NET_TYPE_IOEMU) - virBufferAddLit(buf, "(type ioemu)"); } } @@ -2362,7 +2308,7 @@ xenFormatSxpr(virConnectPtr conn, } /* hvm */ /* get the device emulation model */ - if (def->emulator && (hvm || xendConfigVersion >= XEND_CONFIG_VERSION_3_0_4)) + if (def->emulator && hvm) virBufferEscapeSexpr(&buf, "(device_model '%s')", def->emulator); /* look for HPET in order to override the hypervisor/xend default */ @@ -2376,7 +2322,7 @@ xenFormatSxpr(virConnectPtr conn, } /* PV graphics for xen <= 3.0.4, or HVM graphics */ - if (hvm || (xendConfigVersion < XEND_CONFIG_MIN_VERS_PVFB_NEWCONF)) { + if (hvm) { if ((def->ngraphics == 1) && xenFormatSxprGraphicsOld(def->graphics[0], &buf, xendConfigVersion) < 0) @@ -2390,82 +2336,65 @@ xenFormatSxpr(virConnectPtr conn, } } /* os.bootloader */ - - if (xendConfigVersion < XEND_CONFIG_VERSION_3_1_0) { - /* <3.1: UTC and LOCALTIME */ - switch (def->clock.offset) { - case VIR_DOMAIN_CLOCK_OFFSET_UTC: - vmlocaltime = 0; - break; - case VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME: - vmlocaltime = 1; - break; - default: - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported clock offset='%s'"), - virDomainClockOffsetTypeToString(def->clock.offset)); - goto error; - } - } else { - if (!in_image) { - if (hvm) - virBufferAddLit(&buf, "(image (hvm "); - else - virBufferAddLit(&buf, "(image (linux "); - in_image = true; - } - if (hvm) { - /* >=3.1 HV: VARIABLE */ - int rtc_timeoffset; - switch (def->clock.offset) { - case VIR_DOMAIN_CLOCK_OFFSET_VARIABLE: - vmlocaltime = (int)def->clock.data.variable.basis; - rtc_timeoffset = def->clock.data.variable.adjustment; - break; - case VIR_DOMAIN_CLOCK_OFFSET_UTC: - if (def->clock.data.utc_reset) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("unsupported clock adjustment='reset'")); - goto error; - } - vmlocaltime = 0; - rtc_timeoffset = 0; - break; - case VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME: - if (def->clock.data.utc_reset) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("unsupported clock adjustment='reset'")); - goto error; - } - vmlocaltime = 1; - rtc_timeoffset = 0; - break; - default: - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported clock offset='%s'"), - virDomainClockOffsetTypeToString(def->clock.offset)); - goto error; - } - virBufferAsprintf(&buf, "(rtc_timeoffset %d)", rtc_timeoffset); - } else { - /* >=3.1 PV: UTC and LOCALTIME */ - switch (def->clock.offset) { - case VIR_DOMAIN_CLOCK_OFFSET_UTC: - vmlocaltime = 0; - break; - case VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME: - vmlocaltime = 1; - break; - default: - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported clock offset='%s'"), - virDomainClockOffsetTypeToString(def->clock.offset)); - goto error; - } - } /* !hvm */ - /* default post-XenD-3.1 location: */ - virBufferAsprintf(&buf, "(localtime %d)", vmlocaltime); + if (!in_image) { + if (hvm) + virBufferAddLit(&buf, "(image (hvm "); + else + virBufferAddLit(&buf, "(image (linux "); + in_image = true; } + if (hvm) { + /* >=3.1 HV: VARIABLE */ + int rtc_timeoffset; + switch (def->clock.offset) { + case VIR_DOMAIN_CLOCK_OFFSET_VARIABLE: + vmlocaltime = (int)def->clock.data.variable.basis; + rtc_timeoffset = def->clock.data.variable.adjustment; + break; + case VIR_DOMAIN_CLOCK_OFFSET_UTC: + if (def->clock.data.utc_reset) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("unsupported clock adjustment='reset'")); + goto error; + } + vmlocaltime = 0; + rtc_timeoffset = 0; + break; + case VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME: + if (def->clock.data.utc_reset) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("unsupported clock adjustment='reset'")); + goto error; + } + vmlocaltime = 1; + rtc_timeoffset = 0; + break; + default: + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unsupported clock offset='%s'"), + virDomainClockOffsetTypeToString(def->clock.offset)); + goto error; + } + virBufferAsprintf(&buf, "(rtc_timeoffset %d)", rtc_timeoffset); + } else { + /* >=3.1 PV: UTC and LOCALTIME */ + switch (def->clock.offset) { + case VIR_DOMAIN_CLOCK_OFFSET_UTC: + vmlocaltime = 0; + break; + case VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME: + vmlocaltime = 1; + break; + default: + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unsupported clock offset='%s'"), + virDomainClockOffsetTypeToString(def->clock.offset)); + goto error; + } + } /* !hvm */ + /* default post-XenD-3.1 location: */ + virBufferAsprintf(&buf, "(localtime %d)", vmlocaltime); + if (in_image) { /* closes (image(hvm|linux */ virBufferAddLit(&buf, "))"); @@ -2489,7 +2418,7 @@ xenFormatSxpr(virConnectPtr conn, goto error; /* New style PV graphics config xen >= 3.0.4 */ - if (!hvm && (xendConfigVersion >= XEND_CONFIG_MIN_VERS_PVFB_NEWCONF)) { + if (!hvm) { if ((def->ngraphics == 1) && xenFormatSxprGraphicsNew(def->graphics[0], &buf) < 0) goto error; -- 2.1.4

Remove use of XEND_CONFIG_VERSION_* in the Xen unified driver. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- src/xen/xen_driver.c | 284 +++++++++++---------------------------------------- 1 file changed, 61 insertions(+), 223 deletions(-) diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c index 321a250..27da520 100644 --- a/src/xen/xen_driver.c +++ b/src/xen/xen_driver.c @@ -109,16 +109,10 @@ static virDomainDefPtr xenGetDomainDefForID(virConnectPtr conn, int id) static virDomainDefPtr xenGetDomainDefForName(virConnectPtr conn, const char *name) { - xenUnifiedPrivatePtr priv = conn->privateData; virDomainDefPtr ret; ret = xenDaemonLookupByName(conn, name); - /* Try XM for inactive domains. */ - if (!ret && - priv->xendConfigVersion <= XEND_CONFIG_VERSION_3_0_3) - ret = xenXMDomainLookupByName(conn, name); - if (!ret && virGetLastError() == NULL) virReportError(VIR_ERR_NO_DOMAIN, __FUNCTION__); @@ -128,18 +122,13 @@ static virDomainDefPtr xenGetDomainDefForName(virConnectPtr conn, const char *na static virDomainDefPtr xenGetDomainDefForUUID(virConnectPtr conn, const unsigned char *uuid) { - xenUnifiedPrivatePtr priv = conn->privateData; virDomainDefPtr ret; ret = xenHypervisorLookupDomainByUUID(conn, uuid); - /* Try XM for inactive domains. */ - if (!ret) { - if (priv->xendConfigVersion <= XEND_CONFIG_VERSION_3_0_3) - ret = xenXMDomainLookupByUUID(conn, uuid); - else - ret = xenDaemonLookupByUUID(conn, uuid); - } + /* Try xend for inactive domains. */ + if (!ret) + ret = xenDaemonLookupByUUID(conn, uuid); if (!ret && virGetLastError() == NULL) virReportError(VIR_ERR_NO_DOMAIN, __FUNCTION__); @@ -516,15 +505,6 @@ xenUnifiedConnectOpen(virConnectPtr conn, virConnectAuthPtr auth, unsigned int f VIR_DEBUG("Activated XenD sub-driver"); priv->opened[XEN_UNIFIED_XEND_OFFSET] = 1; - /* For old XenD, the XM driver is required to succeed */ - if (priv->xendConfigVersion <= XEND_CONFIG_VERSION_3_0_3) { - VIR_DEBUG("Trying XM sub-driver"); - if (xenXMOpen(conn, auth, flags) < 0) - goto error; - VIR_DEBUG("Activated XM sub-driver"); - priv->opened[XEN_UNIFIED_XM_OFFSET] = 1; - } - VIR_DEBUG("Trying XS sub-driver"); if (xenStoreOpen(conn, auth, flags) < 0) goto error; @@ -1055,7 +1035,6 @@ xenUnifiedDomainDestroy(virDomainPtr dom) static char * xenUnifiedDomainGetOSType(virDomainPtr dom) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; char *ret = NULL; virDomainDefPtr def; @@ -1065,17 +1044,10 @@ xenUnifiedDomainGetOSType(virDomainPtr dom) if (virDomainGetOSTypeEnsureACL(dom->conn, def) < 0) goto cleanup; - if (def->id < 0) { - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("Unable to query OS type for inactive domain")); - return NULL; - } else { - ret = xenDaemonDomainGetOSType(dom->conn, def); - } - } else { + if (def->id < 0) + ret = xenDaemonDomainGetOSType(dom->conn, def); + else ret = xenHypervisorDomainGetOSType(dom->conn, def); - } cleanup: virDomainDefFree(def); @@ -1086,7 +1058,6 @@ xenUnifiedDomainGetOSType(virDomainPtr dom) static unsigned long long xenUnifiedDomainGetMaxMemory(virDomainPtr dom) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; unsigned long long ret = 0; virDomainDefPtr def; @@ -1096,14 +1067,10 @@ xenUnifiedDomainGetMaxMemory(virDomainPtr dom) if (virDomainGetMaxMemoryEnsureACL(dom->conn, def) < 0) goto cleanup; - if (def->id < 0) { - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) - ret = xenXMDomainGetMaxMemory(dom->conn, def); - else - ret = xenDaemonDomainGetMaxMemory(dom->conn, def); - } else { + if (def->id < 0) + ret = xenDaemonDomainGetMaxMemory(dom->conn, def); + else ret = xenHypervisorGetMaxMemory(dom->conn, def); - } cleanup: virDomainDefFree(def); @@ -1113,7 +1080,6 @@ xenUnifiedDomainGetMaxMemory(virDomainPtr dom) static int xenUnifiedDomainSetMaxMemory(virDomainPtr dom, unsigned long memory) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; int ret = -1; virDomainDefPtr def; @@ -1123,14 +1089,10 @@ xenUnifiedDomainSetMaxMemory(virDomainPtr dom, unsigned long memory) if (virDomainSetMaxMemoryEnsureACL(dom->conn, def) < 0) goto cleanup; - if (def->id < 0) { - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) - ret = xenXMDomainSetMaxMemory(dom->conn, def, memory); - else - ret = xenDaemonDomainSetMaxMemory(dom->conn, def, memory); - } else { + if (def->id < 0) + ret = xenDaemonDomainSetMaxMemory(dom->conn, def, memory); + else ret = xenHypervisorSetMaxMemory(dom->conn, def, memory); - } cleanup: virDomainDefFree(def); @@ -1140,7 +1102,6 @@ xenUnifiedDomainSetMaxMemory(virDomainPtr dom, unsigned long memory) static int xenUnifiedDomainSetMemory(virDomainPtr dom, unsigned long memory) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; int ret = -1; virDomainDefPtr def; @@ -1150,10 +1111,7 @@ xenUnifiedDomainSetMemory(virDomainPtr dom, unsigned long memory) if (virDomainSetMemoryEnsureACL(dom->conn, def) < 0) goto cleanup; - if (def->id < 0 && priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) - ret = xenXMDomainSetMemory(dom->conn, def, memory); - else - ret = xenDaemonDomainSetMemory(dom->conn, def, memory); + ret = xenDaemonDomainSetMemory(dom->conn, def, memory); cleanup: virDomainDefFree(def); @@ -1163,7 +1121,6 @@ xenUnifiedDomainSetMemory(virDomainPtr dom, unsigned long memory) static int xenUnifiedDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; int ret = -1; virDomainDefPtr def; @@ -1173,14 +1130,10 @@ xenUnifiedDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info) if (virDomainGetInfoEnsureACL(dom->conn, def) < 0) goto cleanup; - if (def->id < 0) { - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) - ret = xenXMDomainGetInfo(dom->conn, def, info); - else - ret = xenDaemonDomainGetInfo(dom->conn, def, info); - } else { + if (def->id < 0) + ret = xenDaemonDomainGetInfo(dom->conn, def, info); + else ret = xenHypervisorGetDomainInfo(dom->conn, def, info); - } cleanup: virDomainDefFree(def); @@ -1193,7 +1146,7 @@ xenUnifiedDomainGetState(virDomainPtr dom, int *reason, unsigned int flags) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; + int ret = -1; virDomainDefPtr def; @@ -1205,14 +1158,10 @@ xenUnifiedDomainGetState(virDomainPtr dom, if (virDomainGetStateEnsureACL(dom->conn, def) < 0) goto cleanup; - if (def->id < 0) { - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) - ret = xenXMDomainGetState(dom->conn, def, state, reason); - else - ret = xenDaemonDomainGetState(dom->conn, def, state, reason); - } else { + if (def->id < 0) + ret = xenDaemonDomainGetState(dom->conn, def, state, reason); + else ret = xenHypervisorGetDomainState(dom->conn, def, state, reason); - } cleanup: virDomainDefFree(def); @@ -1391,7 +1340,6 @@ static int xenUnifiedDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus, unsigned int flags) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; virDomainDefPtr def = NULL; int ret = -1; @@ -1420,13 +1368,7 @@ xenUnifiedDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus, if (virDomainSetVcpusFlagsEnsureACL(dom->conn, def, flags) < 0) goto cleanup; - /* Try non-hypervisor methods first, then hypervisor direct method - * as a last resort. - */ - if (dom->id < 0 && priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) - ret = xenXMDomainSetVcpusFlags(dom->conn, def, nvcpus, flags); - else - ret = xenDaemonDomainSetVcpusFlags(dom->conn, def, nvcpus, flags); + ret = xenDaemonDomainSetVcpusFlags(dom->conn, def, nvcpus, flags); cleanup: virDomainDefFree(def); @@ -1436,14 +1378,12 @@ xenUnifiedDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus, static int xenUnifiedDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; - unsigned int flags = VIR_DOMAIN_VCPU_LIVE; + unsigned int flags; /* Per the documented API, it is hypervisor-dependent whether this - * affects just _LIVE or _LIVE|_CONFIG; in xen's case, that - * depends on xendConfigVersion. */ - if (priv->xendConfigVersion >= XEND_CONFIG_VERSION_3_0_4) - flags |= VIR_DOMAIN_VCPU_CONFIG; + * affects just _LIVE or _LIVE|_CONFIG; in xen's case, both are + * affected. */ + flags = VIR_DOMAIN_VCPU_LIVE | VIR_DOMAIN_VCPU_CONFIG; return xenUnifiedDomainSetVcpusFlags(dom, nvcpus, flags); } @@ -1452,7 +1392,6 @@ static int xenUnifiedDomainPinVcpu(virDomainPtr dom, unsigned int vcpu, unsigned char *cpumap, int maplen) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; virDomainDefPtr def = NULL; int ret = -1; @@ -1462,14 +1401,10 @@ xenUnifiedDomainPinVcpu(virDomainPtr dom, unsigned int vcpu, if (virDomainPinVcpuEnsureACL(dom->conn, def) < 0) goto cleanup; - if (dom->id < 0) { - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) - ret = xenXMDomainPinVcpu(dom->conn, def, vcpu, cpumap, maplen); - else - ret = xenDaemonDomainPinVcpu(dom->conn, def, vcpu, cpumap, maplen); - } else { + if (dom->id < 0) + ret = xenDaemonDomainPinVcpu(dom->conn, def, vcpu, cpumap, maplen); + else ret = xenHypervisorPinVcpu(dom->conn, def, vcpu, cpumap, maplen); - } cleanup: virDomainDefFree(def); @@ -1484,17 +1419,11 @@ xenUnifiedDomainGetVcpusInternal(virDomainPtr dom, unsigned char *cpumaps, int maplen) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; int ret = -1; if (dom->id < 0) { - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("Cannot get VCPUs of inactive domain")); - } else { - ret = xenDaemonDomainGetVcpus(dom->conn, def, info, maxinfo, - cpumaps, maplen); - } + ret = xenDaemonDomainGetVcpus(dom->conn, def, info, maxinfo, + cpumaps, maplen); } else { ret = xenHypervisorGetVcpus(dom->conn, def, info, maxinfo, cpumaps, maplen); @@ -1530,14 +1459,10 @@ xenUnifiedDomainGetVcpusFlagsInternal(virDomainPtr dom, virDomainDefPtr def, unsigned int flags) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; int ret = -1; if (dom->id < 0) { - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) - ret = xenXMDomainGetVcpusFlags(dom->conn, def, flags); - else - ret = xenDaemonDomainGetVcpusFlags(dom->conn, def, flags); + ret = xenDaemonDomainGetVcpusFlags(dom->conn, def, flags); } else { if (flags == (VIR_DOMAIN_VCPU_CONFIG | VIR_DOMAIN_VCPU_MAXIMUM)) ret = xenHypervisorGetVcpuMax(dom->conn, def); @@ -1585,6 +1510,7 @@ xenUnifiedDomainGetXMLDesc(virDomainPtr dom, unsigned int flags) virDomainDefPtr minidef = NULL; virDomainDefPtr def = NULL; char *ret = NULL; + char *cpus = NULL; if (!(minidef = xenGetDomainDefForDom(dom))) goto cleanup; @@ -1592,22 +1518,17 @@ xenUnifiedDomainGetXMLDesc(virDomainPtr dom, unsigned int flags) if (virDomainGetXMLDescEnsureACL(dom->conn, minidef, flags) < 0) goto cleanup; - if (dom->id < 0 && priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) { - def = xenXMDomainGetXMLDesc(dom->conn, minidef); - } else { - char *cpus; - xenUnifiedLock(priv); - cpus = xenDomainUsedCpus(dom, minidef); - xenUnifiedUnlock(priv); - def = xenDaemonDomainGetXMLDesc(dom->conn, minidef, cpus); - VIR_FREE(cpus); - } + xenUnifiedLock(priv); + cpus = xenDomainUsedCpus(dom, minidef); + xenUnifiedUnlock(priv); + def = xenDaemonDomainGetXMLDesc(dom->conn, minidef, cpus); if (def) ret = virDomainDefFormat(def, virDomainDefFormatConvertXMLFlags(flags)); cleanup: + VIR_FREE(cpus); virDomainDefFree(def); virDomainDefFree(minidef); return ret; @@ -1776,7 +1697,6 @@ xenUnifiedDomainMigrateFinish(virConnectPtr dconn, const char *uri ATTRIBUTE_UNUSED, unsigned long flags) { - xenUnifiedPrivatePtr priv = dconn->privateData; virDomainPtr ret = NULL; virDomainDefPtr minidef = NULL; virDomainDefPtr def = NULL; @@ -1793,13 +1713,8 @@ xenUnifiedDomainMigrateFinish(virConnectPtr dconn, if (!(def = xenDaemonDomainGetXMLDesc(dconn, minidef, NULL))) goto cleanup; - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) { - if (xenXMDomainDefineXML(dconn, def) < 0) - goto cleanup; - } else { - if (xenDaemonDomainDefineXML(dconn, def) < 0) - goto cleanup; - } + if (xenDaemonDomainDefineXML(dconn, def) < 0) + goto cleanup; } ret = virGetDomain(dconn, minidef->name, minidef->uuid); @@ -1816,31 +1731,19 @@ static int xenUnifiedConnectListDefinedDomains(virConnectPtr conn, char **const names, int maxnames) { - xenUnifiedPrivatePtr priv = conn->privateData; - if (virConnectListDefinedDomainsEnsureACL(conn) < 0) return -1; - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) { - return xenXMListDefinedDomains(conn, names, maxnames); - } else { - return xenDaemonListDefinedDomains(conn, names, maxnames); - } + return xenDaemonListDefinedDomains(conn, names, maxnames); } static int xenUnifiedConnectNumOfDefinedDomains(virConnectPtr conn) { - xenUnifiedPrivatePtr priv = conn->privateData; - if (virConnectNumOfDefinedDomainsEnsureACL(conn) < 0) return -1; - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) { - return xenXMNumOfDefinedDomains(conn); - } else { - return xenDaemonNumOfDefinedDomains(conn); - } + return xenDaemonNumOfDefinedDomains(conn); } static int @@ -1869,10 +1772,7 @@ xenUnifiedDomainCreateWithFlags(virDomainPtr dom, unsigned int flags) goto cleanup; } - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) - ret = xenXMDomainCreate(dom->conn, def); - else - ret = xenDaemonDomainCreate(dom->conn, def); + ret = xenDaemonDomainCreate(dom->conn, def); if (ret >= 0) dom->id = def->id; @@ -1909,16 +1809,9 @@ xenUnifiedDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int if (virDomainDefineXMLFlagsEnsureACL(conn, def) < 0) goto cleanup; - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) { - if (xenXMDomainDefineXML(conn, def) < 0) - goto cleanup; - ret = virGetDomain(conn, def->name, def->uuid); - def = NULL; /* XM driver owns it now */ - } else { - if (xenDaemonDomainDefineXML(conn, def) < 0) - goto cleanup; - ret = virGetDomain(conn, def->name, def->uuid); - } + if (xenDaemonDomainDefineXML(conn, def) < 0) + goto cleanup; + ret = virGetDomain(conn, def->name, def->uuid); if (ret) ret->id = -1; @@ -1937,7 +1830,6 @@ xenUnifiedDomainDefineXML(virConnectPtr conn, const char *xml) static int xenUnifiedDomainUndefineFlags(virDomainPtr dom, unsigned int flags) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; virDomainDefPtr def = NULL; int ret = -1; @@ -1949,10 +1841,7 @@ xenUnifiedDomainUndefineFlags(virDomainPtr dom, unsigned int flags) if (virDomainUndefineFlagsEnsureACL(dom->conn, def) < 0) goto cleanup; - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) - ret = xenXMDomainUndefine(dom->conn, def); - else - ret = xenDaemonDomainUndefine(dom->conn, def); + ret = xenDaemonDomainUndefine(dom->conn, def); cleanup: virDomainDefFree(def); @@ -1968,7 +1857,6 @@ xenUnifiedDomainUndefine(virDomainPtr dom) static int xenUnifiedDomainAttachDevice(virDomainPtr dom, const char *xml) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; unsigned int flags = VIR_DOMAIN_DEVICE_MODIFY_LIVE; virDomainDefPtr def = NULL; int ret = -1; @@ -1978,8 +1866,7 @@ xenUnifiedDomainAttachDevice(virDomainPtr dom, const char *xml) * config without touching persistent config, we add the extra flag here * to make this API work */ - if (priv->xendConfigVersion >= XEND_CONFIG_VERSION_3_0_4) - flags |= VIR_DOMAIN_DEVICE_MODIFY_CONFIG; + flags |= VIR_DOMAIN_DEVICE_MODIFY_CONFIG; if (!(def = xenGetDomainDefForDom(dom))) goto cleanup; @@ -1987,10 +1874,7 @@ xenUnifiedDomainAttachDevice(virDomainPtr dom, const char *xml) if (virDomainAttachDeviceEnsureACL(dom->conn, def) < 0) goto cleanup; - if (dom->id < 0 && priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) - ret = xenXMDomainAttachDeviceFlags(dom->conn, def, xml, flags); - else - ret = xenDaemonAttachDeviceFlags(dom->conn, def, xml, flags); + ret = xenDaemonAttachDeviceFlags(dom->conn, def, xml, flags); cleanup: virDomainDefFree(def); @@ -2001,7 +1885,6 @@ static int xenUnifiedDomainAttachDeviceFlags(virDomainPtr dom, const char *xml, unsigned int flags) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; virDomainDefPtr def = NULL; int ret = -1; @@ -2011,10 +1894,7 @@ xenUnifiedDomainAttachDeviceFlags(virDomainPtr dom, const char *xml, if (virDomainAttachDeviceFlagsEnsureACL(dom->conn, def, flags) < 0) goto cleanup; - if (dom->id < 0 && priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) - ret = xenXMDomainAttachDeviceFlags(dom->conn, def, xml, flags); - else - ret = xenDaemonAttachDeviceFlags(dom->conn, def, xml, flags); + ret = xenDaemonAttachDeviceFlags(dom->conn, def, xml, flags); cleanup: virDomainDefFree(def); @@ -2024,7 +1904,6 @@ xenUnifiedDomainAttachDeviceFlags(virDomainPtr dom, const char *xml, static int xenUnifiedDomainDetachDevice(virDomainPtr dom, const char *xml) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; unsigned int flags = VIR_DOMAIN_DEVICE_MODIFY_LIVE; virDomainDefPtr def = NULL; int ret = -1; @@ -2034,8 +1913,7 @@ xenUnifiedDomainDetachDevice(virDomainPtr dom, const char *xml) * config without touching persistent config, we add the extra flag here * to make this API work */ - if (priv->xendConfigVersion >= XEND_CONFIG_VERSION_3_0_4) - flags |= VIR_DOMAIN_DEVICE_MODIFY_CONFIG; + flags |= VIR_DOMAIN_DEVICE_MODIFY_CONFIG; if (!(def = xenGetDomainDefForDom(dom))) goto cleanup; @@ -2043,10 +1921,7 @@ xenUnifiedDomainDetachDevice(virDomainPtr dom, const char *xml) if (virDomainDetachDeviceEnsureACL(dom->conn, def) < 0) goto cleanup; - if (dom->id < 0 && priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) - ret = xenXMDomainDetachDeviceFlags(dom->conn, def, xml, flags); - else - ret = xenDaemonDetachDeviceFlags(dom->conn, def, xml, flags); + ret = xenDaemonDetachDeviceFlags(dom->conn, def, xml, flags); cleanup: virDomainDefFree(def); @@ -2057,7 +1932,6 @@ static int xenUnifiedDomainDetachDeviceFlags(virDomainPtr dom, const char *xml, unsigned int flags) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; virDomainDefPtr def = NULL; int ret = -1; @@ -2067,10 +1941,7 @@ xenUnifiedDomainDetachDeviceFlags(virDomainPtr dom, const char *xml, if (virDomainDetachDeviceFlagsEnsureACL(dom->conn, def, flags) < 0) goto cleanup; - if (dom->id < 0 && priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) - ret = xenXMDomainDetachDeviceFlags(dom->conn, def, xml, flags); - else - ret = xenDaemonDetachDeviceFlags(dom->conn, def, xml, flags); + ret = xenDaemonDetachDeviceFlags(dom->conn, def, xml, flags); cleanup: virDomainDefFree(def); @@ -2100,7 +1971,6 @@ xenUnifiedDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml, static int xenUnifiedDomainGetAutostart(virDomainPtr dom, int *autostart) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; virDomainDefPtr def = NULL; int ret = -1; @@ -2110,10 +1980,7 @@ xenUnifiedDomainGetAutostart(virDomainPtr dom, int *autostart) if (virDomainGetAutostartEnsureACL(dom->conn, def) < 0) goto cleanup; - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) - ret = xenXMDomainGetAutostart(def, autostart); - else - ret = xenDaemonDomainGetAutostart(dom->conn, def, autostart); + ret = xenDaemonDomainGetAutostart(dom->conn, def, autostart); cleanup: virDomainDefFree(def); @@ -2123,7 +1990,6 @@ xenUnifiedDomainGetAutostart(virDomainPtr dom, int *autostart) static int xenUnifiedDomainSetAutostart(virDomainPtr dom, int autostart) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; virDomainDefPtr def = NULL; int ret = -1; @@ -2133,10 +1999,7 @@ xenUnifiedDomainSetAutostart(virDomainPtr dom, int autostart) if (virDomainSetAutostartEnsureACL(dom->conn, def) < 0) goto cleanup; - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) - ret = xenXMDomainSetAutostart(def, autostart); - else - ret = xenDaemonDomainSetAutostart(dom->conn, def, autostart); + ret = xenDaemonDomainSetAutostart(dom->conn, def, autostart); cleanup: virDomainDefFree(def); @@ -2146,7 +2009,6 @@ xenUnifiedDomainSetAutostart(virDomainPtr dom, int autostart) static char * xenUnifiedDomainGetSchedulerType(virDomainPtr dom, int *nparams) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; virDomainDefPtr def = NULL; char *ret = NULL; @@ -2156,16 +2018,10 @@ xenUnifiedDomainGetSchedulerType(virDomainPtr dom, int *nparams) if (virDomainGetSchedulerTypeEnsureACL(dom->conn, def) < 0) goto cleanup; - if (dom->id < 0) { - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("Cannot change scheduler parameters")); - goto cleanup; - } + if (dom->id < 0) ret = xenDaemonGetSchedulerType(dom->conn, nparams); - } else { + else ret = xenHypervisorGetSchedulerType(dom->conn, nparams); - } cleanup: virDomainDefFree(def); @@ -2178,7 +2034,6 @@ xenUnifiedDomainGetSchedulerParametersFlags(virDomainPtr dom, int *nparams, unsigned int flags) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; virDomainDefPtr def = NULL; int ret = -1; @@ -2190,16 +2045,10 @@ xenUnifiedDomainGetSchedulerParametersFlags(virDomainPtr dom, if (virDomainGetSchedulerParametersFlagsEnsureACL(dom->conn, def) < 0) goto cleanup; - if (dom->id < 0) { - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("Cannot change scheduler parameters")); - goto cleanup; - } + if (dom->id < 0) ret = xenDaemonGetSchedulerParameters(dom->conn, def, params, nparams); - } else { + else ret = xenHypervisorGetSchedulerParameters(dom->conn, def, params, nparams); - } cleanup: virDomainDefFree(def); @@ -2221,7 +2070,6 @@ xenUnifiedDomainSetSchedulerParametersFlags(virDomainPtr dom, int nparams, unsigned int flags) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; virDomainDefPtr def = NULL; int ret = -1; @@ -2233,16 +2081,10 @@ xenUnifiedDomainSetSchedulerParametersFlags(virDomainPtr dom, if (virDomainSetSchedulerParametersFlagsEnsureACL(dom->conn, def, flags) < 0) goto cleanup; - if (dom->id < 0) { - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("Cannot change scheduler parameters")); - goto cleanup; - } + if (dom->id < 0) ret = xenDaemonSetSchedulerParameters(dom->conn, def, params, nparams); - } else { + else ret = xenHypervisorSetSchedulerParameters(dom->conn, def, params, nparams); - } cleanup: virDomainDefFree(def); @@ -2303,7 +2145,6 @@ xenUnifiedDomainBlockPeek(virDomainPtr dom, const char *path, unsigned long long offset, size_t size, void *buffer, unsigned int flags) { - xenUnifiedPrivatePtr priv = dom->conn->privateData; virDomainDefPtr def = NULL; int ret = -1; @@ -2315,10 +2156,7 @@ xenUnifiedDomainBlockPeek(virDomainPtr dom, const char *path, if (virDomainBlockPeekEnsureACL(dom->conn, def) < 0) goto cleanup; - if (dom->id < 0 && priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) - ret = xenXMDomainBlockPeek(dom->conn, def, path, offset, size, buffer); - else - ret = xenDaemonDomainBlockPeek(dom->conn, def, path, offset, size, buffer); + ret = xenDaemonDomainBlockPeek(dom->conn, def, path, offset, size, buffer); cleanup: virDomainDefFree(def); -- 2.1.4

Remove use of XEND_CONFIG_VERSION_* in xend_internal.c Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- src/xen/xend_internal.c | 167 ++++++++---------------------------------------- 1 file changed, 27 insertions(+), 140 deletions(-) diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c index 21d99e3..72a1259 100644 --- a/src/xen/xend_internal.c +++ b/src/xen/xend_internal.c @@ -881,10 +881,6 @@ xend_detect_config_version(virConnectPtr conn) if (value) { if (virStrToLong_i(value, NULL, 10, &priv->xendConfigVersion) < 0) goto cleanup; - } else { - /* Xen prior to 3.0.3 did not have the xend_config_format - field, and is implicitly version 1. */ - priv->xendConfigVersion = XEND_CONFIG_VERSION_3_0_2; } ret = 0; cleanup: @@ -1124,14 +1120,12 @@ sexpr_to_xend_topology(const struct sexpr *root, virCapsPtr caps) * Returns the domain def pointer or NULL in case of error. */ static virDomainDefPtr -sexpr_to_domain(virConnectPtr conn, const struct sexpr *root) +sexpr_to_domain(virConnectPtr conn ATTRIBUTE_UNUSED, const struct sexpr *root) { virDomainDefPtr ret = NULL; unsigned char uuid[VIR_UUID_BUFLEN]; const char *name; - const char *tmp; int id = -1; - xenUnifiedPrivatePtr priv = conn->privateData; if (sexpr_uuid(uuid, root, "domain/uuid") < 0) goto error; @@ -1139,14 +1133,7 @@ sexpr_to_domain(virConnectPtr conn, const struct sexpr *root) if (name == NULL) goto error; - tmp = sexpr_node(root, "domain/domid"); - /* New 3.0.4 XenD will not report a domid for inactive domains, - * so only error out for old XenD - */ - if (!tmp && priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) - goto error; - - if (tmp) + if (sexpr_node(root, "domain/domid")) id = sexpr_int(root, "domain/domid"); return virDomainDefNewFull(name, uuid, id); @@ -1853,30 +1840,20 @@ xenDaemonDomainPinVcpu(virConnectPtr conn, { char buf[VIR_UUID_BUFLEN], mapstr[sizeof(cpumap_t) * 64]; size_t i, j; - xenUnifiedPrivatePtr priv = conn->privateData; if (maplen > (int)sizeof(cpumap_t)) { virReportError(VIR_ERR_INVALID_ARG, __FUNCTION__); return -1; } - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) { - mapstr[0] = '['; - mapstr[1] = 0; - } else { - mapstr[0] = 0; - } - + mapstr[0] = 0; /* from bit map, build character string of mapped CPU numbers */ for (i = 0; i < maplen; i++) for (j = 0; j < 8; j++) if (cpumap[i] & (1 << j)) { snprintf(buf, sizeof(buf), "%zu,", (8 * i) + j); strcat(mapstr, buf); } - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) - mapstr[strlen(mapstr) - 1] = ']'; - else - mapstr[strlen(mapstr) - 1] = 0; + mapstr[strlen(mapstr) - 1] = 0; snprintf(buf, sizeof(buf), "%d", vcpu); @@ -2033,53 +2010,23 @@ xenDaemonLookupByUUID(virConnectPtr conn, const unsigned char *uuid) virDomainDefPtr ret; char *name = NULL; int id = -1; - xenUnifiedPrivatePtr priv = conn->privateData; + char *domname = NULL; + char uuidstr[VIR_UUID_STRING_BUFLEN]; + struct sexpr *root = NULL; - /* Old approach for xen <= 3.0.3 */ - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) { - char **names, **tmp; - unsigned char ident[VIR_UUID_BUFLEN]; - names = xenDaemonListDomainsOld(conn); - tmp = names; + virUUIDFormat(uuid, uuidstr); + root = sexpr_get(conn, "/xend/domain/%s?detail=1", uuidstr); + if (root == NULL) + return NULL; + domname = (char*)sexpr_node(root, "domain/name"); + if (sexpr_node(root, "domain/domid")) /* only active domains have domid */ + id = sexpr_int(root, "domain/domid"); + else + id = -1; - if (names == NULL) - return NULL; - while (*tmp != NULL) { - id = xenDaemonDomainLookupByName_ids(conn, *tmp, &ident[0]); - if (id >= 0) { - if (!memcmp(uuid, ident, VIR_UUID_BUFLEN)) { - name = *tmp; - break; - } - } - tmp++; - } - tmp = names; - while (*tmp) { - if (*tmp != name) - VIR_FREE(*tmp); - tmp++; - } - VIR_FREE(names); - } else { /* New approach for xen >= 3.0.4 */ - char *domname = NULL; - char uuidstr[VIR_UUID_STRING_BUFLEN]; - struct sexpr *root = NULL; + ignore_value(VIR_STRDUP(name, domname)); - virUUIDFormat(uuid, uuidstr); - root = sexpr_get(conn, "/xend/domain/%s?detail=1", uuidstr); - if (root == NULL) - return NULL; - domname = (char*)sexpr_node(root, "domain/name"); - if (sexpr_node(root, "domain/domid")) /* only active domains have domid */ - id = sexpr_int(root, "domain/domid"); - else - id = -1; - - ignore_value(VIR_STRDUP(name, domname)); - - sexpr_free(root); - } + sexpr_free(root); if (name == NULL) return NULL; @@ -2194,21 +2141,9 @@ xenDaemonAttachDeviceFlags(virConnectPtr conn, return -1; } } else { - /* Only live config can be changed if xendConfigVersion < 3 */ - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4 && - (flags != VIR_DOMAIN_DEVICE_MODIFY_CURRENT && - flags != VIR_DOMAIN_DEVICE_MODIFY_LIVE)) { - virReportError(VIR_ERR_OPERATION_INVALID, "%s", - _("Xend version does not support modifying " - "persistent config")); - return -1; - } - /* Xen only supports modifying both live and persistent config if - * xendConfigVersion >= 3 - */ - if (priv->xendConfigVersion >= XEND_CONFIG_VERSION_3_0_4 && - (flags != (VIR_DOMAIN_DEVICE_MODIFY_LIVE | - VIR_DOMAIN_DEVICE_MODIFY_CONFIG))) { + /* Xen only supports modifying both live and persistent config */ + if (flags != (VIR_DOMAIN_DEVICE_MODIFY_LIVE | + VIR_DOMAIN_DEVICE_MODIFY_CONFIG)) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("Xend only supports modifying both live and " "persistent config")); @@ -2342,21 +2277,9 @@ xenDaemonUpdateDeviceFlags(virConnectPtr conn, return -1; } } else { - /* Only live config can be changed if xendConfigVersion < 3 */ - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4 && - (flags != VIR_DOMAIN_DEVICE_MODIFY_CURRENT && - flags != VIR_DOMAIN_DEVICE_MODIFY_LIVE)) { - virReportError(VIR_ERR_OPERATION_INVALID, "%s", - _("Xend version does not support modifying " - "persistent config")); - return -1; - } - /* Xen only supports modifying both live and persistent config if - * xendConfigVersion >= 3 - */ - if (priv->xendConfigVersion >= XEND_CONFIG_VERSION_3_0_4 && - (flags != (VIR_DOMAIN_DEVICE_MODIFY_LIVE | - VIR_DOMAIN_DEVICE_MODIFY_CONFIG))) { + /* Xen only supports modifying both live and persistent config */ + if (flags != (VIR_DOMAIN_DEVICE_MODIFY_LIVE | + VIR_DOMAIN_DEVICE_MODIFY_CONFIG)) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("Xend only supports modifying both live and " "persistent config")); @@ -2444,21 +2367,9 @@ xenDaemonDetachDeviceFlags(virConnectPtr conn, return -1; } } else { - /* Only live config can be changed if xendConfigVersion < 3 */ - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4 && - (flags != VIR_DOMAIN_DEVICE_MODIFY_CURRENT && - flags != VIR_DOMAIN_DEVICE_MODIFY_LIVE)) { - virReportError(VIR_ERR_OPERATION_INVALID, "%s", - _("Xend version does not support modifying " - "persistent config")); - return -1; - } - /* Xen only supports modifying both live and persistent config if - * xendConfigVersion >= 3 - */ - if (priv->xendConfigVersion >= XEND_CONFIG_VERSION_3_0_4 && - (flags != (VIR_DOMAIN_DEVICE_MODIFY_LIVE | - VIR_DOMAIN_DEVICE_MODIFY_CONFIG))) { + /* Xen only supports modifying both live and persistent config */ + if (flags != (VIR_DOMAIN_DEVICE_MODIFY_LIVE | + VIR_DOMAIN_DEVICE_MODIFY_CONFIG)) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("Xend only supports modifying both live and " "persistent config")); @@ -2916,18 +2827,10 @@ char * xenDaemonGetSchedulerType(virConnectPtr conn, int *nparams) { - xenUnifiedPrivatePtr priv = conn->privateData; struct sexpr *root; const char *ret = NULL; char *schedulertype = NULL; - /* Support only xendConfigVersion >=4 */ - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_1_0) { - virReportError(VIR_ERR_OPERATION_INVALID, - "%s", _("unsupported in xendConfigVersion < 4")); - return NULL; - } - root = sexpr_get(conn, "/xend/node/"); if (root == NULL) return NULL; @@ -2979,19 +2882,11 @@ xenDaemonGetSchedulerParameters(virConnectPtr conn, virTypedParameterPtr params, int *nparams) { - xenUnifiedPrivatePtr priv = conn->privateData; struct sexpr *root; char *sched_type = NULL; int sched_nparam = 0; int ret = -1; - /* Support only xendConfigVersion >=4 */ - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_1_0) { - virReportError(VIR_ERR_OPERATION_INVALID, - "%s", _("unsupported in xendConfigVersion < 4")); - return -1; - } - /* look up the information by domain name */ root = sexpr_get(conn, "/xend/domain/%s?detail=1", def->name); if (root == NULL) @@ -3083,20 +2978,12 @@ xenDaemonSetSchedulerParameters(virConnectPtr conn, virTypedParameterPtr params, int nparams) { - xenUnifiedPrivatePtr priv = conn->privateData; struct sexpr *root; char *sched_type = NULL; size_t i; int sched_nparam = 0; int ret = -1; - /* Support only xendConfigVersion >=4 and active domains */ - if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_1_0) { - virReportError(VIR_ERR_OPERATION_INVALID, - "%s", _("unsupported in xendConfigVersion < 4")); - return -1; - } - /* look up the information by domain name */ root = sexpr_get(conn, "/xend/domain/%s?detail=1", def->name); if (root == NULL) -- 2.1.4

Remove use of xendConfigVersion in the s-expresion config formatter/parser in src/xenconfig/. Adjust callers in the xen and libxl drivers accordingly. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- src/libxl/libxl_driver.c | 1 - src/xen/xen_driver.c | 6 +++--- src/xen/xend_internal.c | 20 ++++++++---------- src/xen/xm_internal.c | 2 +- src/xenconfig/xen_sxpr.c | 48 +++++++++++-------------------------------- src/xenconfig/xen_sxpr.h | 21 ++++++------------- src/xenconfig/xenxs_private.h | 8 -------- tests/sexpr2xmltest.c | 5 ++--- tests/xmconfigtest.c | 2 -- tests/xml2sexprtest.c | 2 +- 10 files changed, 33 insertions(+), 82 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index fd92fac..02ef4f5 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -2608,7 +2608,6 @@ libxlConnectDomainXMLFromNative(virConnectPtr conn, } else if (STREQ(nativeFormat, LIBXL_CONFIG_FORMAT_SEXPR)) { /* only support latest xend config format */ if (!(def = xenParseSxprString(nativeConfig, - XEND_CONFIG_VERSION_3_1_0, NULL, -1, cfg->caps, diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c index 27da520..6f25625 100644 --- a/src/xen/xen_driver.c +++ b/src/xen/xen_driver.c @@ -1568,13 +1568,13 @@ xenUnifiedConnectDomainXMLFromNative(virConnectPtr conn, def = xenParseXM(conf, priv->caps, priv->xmlopt); } else if (STREQ(format, XEN_CONFIG_FORMAT_SEXPR)) { - if (xenGetDomIdFromSxprString(config, priv->xendConfigVersion, &id) < 0) + if (xenGetDomIdFromSxprString(config, &id) < 0) goto cleanup; xenUnifiedLock(priv); tty = xenStoreDomainGetConsolePath(conn, id); vncport = xenStoreDomainGetVNCPort(conn, id); xenUnifiedUnlock(priv); - def = xenParseSxprString(config, priv->xendConfigVersion, tty, + def = xenParseSxprString(config, tty, vncport, priv->caps, priv->xmlopt); } if (!def) @@ -1632,7 +1632,7 @@ xenUnifiedConnectDomainXMLToNative(virConnectPtr conn, goto cleanup; } } else if (STREQ(format, XEN_CONFIG_FORMAT_SEXPR)) { - ret = xenFormatSxpr(conn, def, priv->xendConfigVersion); + ret = xenFormatSxpr(conn, def); } cleanup: diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c index 72a1259..cd783a1 100644 --- a/src/xen/xend_internal.c +++ b/src/xen/xend_internal.c @@ -1569,7 +1569,7 @@ xenDaemonDomainFetch(virConnectPtr conn, int domid, const char *name, if (root == NULL) return NULL; - if (xenGetDomIdFromSxpr(root, priv->xendConfigVersion, &id) < 0) + if (xenGetDomIdFromSxpr(root, &id) < 0) goto cleanup; xenUnifiedLock(priv); if (sexpr_lookup(root, "domain/image/hvm")) @@ -1579,7 +1579,6 @@ xenDaemonDomainFetch(virConnectPtr conn, int domid, const char *name, vncport = xenStoreDomainGetVNCPort(conn, id); xenUnifiedUnlock(priv); if (!(def = xenParseSxpr(root, - priv->xendConfigVersion, cpus, tty, vncport))) @@ -2056,7 +2055,6 @@ xenDaemonCreateXML(virConnectPtr conn, virDomainDefPtr def) char *sexpr; const char *tmp; struct sexpr *root; - xenUnifiedPrivatePtr priv = conn->privateData; if (def->id != -1) { virReportError(VIR_ERR_OPERATION_INVALID, @@ -2065,7 +2063,7 @@ xenDaemonCreateXML(virConnectPtr conn, virDomainDefPtr def) return -1; } - if (!(sexpr = xenFormatSxpr(conn, def, priv->xendConfigVersion))) + if (!(sexpr = xenFormatSxpr(conn, def))) return -1; ret = xenDaemonDomainCreateXML(conn, sexpr); @@ -2167,7 +2165,7 @@ xenDaemonAttachDeviceFlags(virConnectPtr conn, if (xenFormatSxprDisk(dev->data.disk, &buf, def->os.type == VIR_DOMAIN_OSTYPE_HVM ? 1 : 0, - priv->xendConfigVersion, 1) < 0) + 1) < 0) goto cleanup; if (dev->data.disk->device != VIR_DOMAIN_DISK_DEVICE_CDROM && @@ -2180,7 +2178,7 @@ xenDaemonAttachDeviceFlags(virConnectPtr conn, dev->data.net, &buf, def->os.type == VIR_DOMAIN_OSTYPE_HVM ? 1 : 0, - priv->xendConfigVersion, 1) < 0) + 1) < 0) goto cleanup; char macStr[VIR_MAC_STRING_BUFLEN]; @@ -2303,7 +2301,7 @@ xenDaemonUpdateDeviceFlags(virConnectPtr conn, if (xenFormatSxprDisk(dev->data.disk, &buf, def->os.type == VIR_DOMAIN_OSTYPE_HVM ? 1 : 0, - priv->xendConfigVersion, 1) < 0) + 1) < 0) goto cleanup; break; @@ -2691,9 +2689,8 @@ xenDaemonDomainDefineXML(virConnectPtr conn, virDomainDefPtr def) { int ret = -1; char *sexpr; - xenUnifiedPrivatePtr priv = conn->privateData; - if (!(sexpr = xenFormatSxpr(conn, def, priv->xendConfigVersion))) { + if (!(sexpr = xenFormatSxpr(conn, def))) { virReportError(VIR_ERR_XML_ERROR, "%s", _("failed to build sexpr")); goto cleanup; @@ -3107,15 +3104,14 @@ xenDaemonDomainBlockPeek(virConnectPtr conn, return -1; } - if (xenGetDomIdFromSxpr(root, priv->xendConfigVersion, &id) < 0) + if (xenGetDomIdFromSxpr(root, &id) < 0) goto cleanup; xenUnifiedLock(priv); tty = xenStoreDomainGetConsolePath(conn, id); vncport = xenStoreDomainGetVNCPort(conn, id); xenUnifiedUnlock(priv); - if (!(def = xenParseSxpr(root, priv->xendConfigVersion, NULL, tty, - vncport))) + if (!(def = xenParseSxpr(root, NULL, tty, vncport))) goto cleanup; if (!(actual = virDomainDiskPathByName(def, path))) { diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c index 085b24a..a0d6f74 100644 --- a/src/xen/xm_internal.c +++ b/src/xen/xm_internal.c @@ -920,7 +920,7 @@ xenXMDomainCreate(virConnectPtr conn, if (!(entry = virHashLookup(priv->configCache, filename))) goto error; - if (!(sexpr = xenFormatSxpr(conn, entry->def, priv->xendConfigVersion))) + if (!(sexpr = xenFormatSxpr(conn, entry->def))) goto error; ret = xenDaemonDomainCreateXML(conn, sexpr); diff --git a/src/xenconfig/xen_sxpr.c b/src/xenconfig/xen_sxpr.c index defff23..d99bac0 100644 --- a/src/xenconfig/xen_sxpr.c +++ b/src/xenconfig/xen_sxpr.c @@ -42,7 +42,7 @@ VIR_LOG_INIT("xenconfig.xen_sxpr"); /* Get a domain id from a S-expression string */ -int xenGetDomIdFromSxprString(const char *sexpr, int xendConfigVersion, int *id) +int xenGetDomIdFromSxprString(const char *sexpr, int *id) { struct sexpr *root = string2sexpr(sexpr); int ret; @@ -52,15 +52,13 @@ int xenGetDomIdFromSxprString(const char *sexpr, int xendConfigVersion, int *id) if (!root) return -1; - ret = xenGetDomIdFromSxpr(root, xendConfigVersion, id); + ret = xenGetDomIdFromSxpr(root, id); sexpr_free(root); return ret; } /* Get a domain id from a S-expression */ -int xenGetDomIdFromSxpr(const struct sexpr *root, - int xendConfigVersion ATTRIBUTE_UNUSED, - int *id) +int xenGetDomIdFromSxpr(const struct sexpr *root, int *id) { const char * tmp = sexpr_node(root, "domain/domid"); @@ -322,7 +320,6 @@ xenParseSxprChar(const char *value, * @def: the domain config * @root: root S-expression * @hvm: true or 1 if node contains HVM S-Expression - * @xendConfigVersion: version of xend * * This parses out block devices from the domain S-expression * @@ -331,8 +328,7 @@ xenParseSxprChar(const char *value, static int xenParseSxprDisks(virDomainDefPtr def, const struct sexpr *root, - int hvm, - int xendConfigVersion ATTRIBUTE_UNUSED) + int hvm) { const struct sexpr *cur, *node; virDomainDiskDefPtr disk = NULL; @@ -754,7 +750,6 @@ xenParseSxprUSB(virDomainDefPtr def, * @def: the domain config * @root: root S-expression * @hvm: true or 1 if root contains HVM S-Expression - * @xendConfigVersion: version of xend * @vncport: VNC port number * * This parses out VNC devices from the domain S-expression @@ -765,7 +760,6 @@ static int xenParseSxprGraphicsOld(virDomainDefPtr def, const struct sexpr *root, int hvm, - int xendConfigVersion ATTRIBUTE_UNUSED, int vncport) { const char *tmp; @@ -1059,7 +1053,6 @@ xenParseSxprPCI(virDomainDefPtr def, /** * xenParseSxpr: * @root: the root of the parsed S-Expression - * @xendConfigVersion: version of xend * @cpus: set of cpus the domain may be pinned to * @tty: the console pty path * @vncport: VNC port number @@ -1072,7 +1065,6 @@ xenParseSxprPCI(virDomainDefPtr def, */ virDomainDefPtr xenParseSxpr(const struct sexpr *root, - int xendConfigVersion, const char *cpus, char *tty, int vncport) { const char *tmp; @@ -1271,7 +1263,7 @@ xenParseSxpr(const struct sexpr *root, goto error; /* append block devices */ - if (xenParseSxprDisks(def, root, hvm, xendConfigVersion) < 0) + if (xenParseSxprDisks(def, root, hvm) < 0) goto error; if (xenParseSxprNets(def, root) < 0) @@ -1286,8 +1278,7 @@ xenParseSxpr(const struct sexpr *root, /* Graphics device (HVM <= 3.0.4, or PV <= 3.0.3) vnc config */ if ((def->ngraphics == 0) && - xenParseSxprGraphicsOld(def, root, hvm, xendConfigVersion, - vncport) < 0) + xenParseSxprGraphicsOld(def, root, hvm, vncport) < 0) goto error; /* in case of HVM we have USB device emulation */ @@ -1392,7 +1383,6 @@ xenParseSxpr(const struct sexpr *root, /** * xenParseSxprString: * @sexpr: the root of the parsed S-Expression - * @xendConfigVersion: version of xend * @tty: the console pty path * @vncport: VNC port number * @@ -1404,7 +1394,6 @@ xenParseSxpr(const struct sexpr *root, */ virDomainDefPtr xenParseSxprString(const char *sexpr, - int xendConfigVersion, char *tty, int vncport, virCapsPtr caps, @@ -1416,7 +1405,7 @@ xenParseSxprString(const char *sexpr, if (!root) return NULL; - if (!(def = xenParseSxpr(root, xendConfigVersion, NULL, tty, vncport))) + if (!(def = xenParseSxpr(root, NULL, tty, vncport))) goto cleanup; if (virDomainDefPostParse(def, caps, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE, @@ -1499,7 +1488,6 @@ xenFormatSxprGraphicsNew(virDomainGraphicsDefPtr def, * xenFormatSxprGraphicsOld: * @def: the domain config * @buf: a buffer for the result S-expression - * @xendConfigVersion: version of xend * * Convert the graphics part of the domain description into a S-expression * in buf. (HVM <= 3.0.4 or PV <= 3.0.3) @@ -1507,9 +1495,7 @@ xenFormatSxprGraphicsNew(virDomainGraphicsDefPtr def, * Returns 0 in case of success, -1 in case of error */ static int -xenFormatSxprGraphicsOld(virDomainGraphicsDefPtr def, - virBufferPtr buf, - int xendConfigVersion ATTRIBUTE_UNUSED) +xenFormatSxprGraphicsOld(virDomainGraphicsDefPtr def, virBufferPtr buf) { const char *listenAddr; @@ -1639,7 +1625,6 @@ xenFormatSxprChr(virDomainChrDefPtr def, * @node: node containing the disk description * @buf: a buffer for the result S-expression * @hvm: true or 1 if domain is HVM - * @xendConfigVersion: xend configuration file format * @isAttach: create expression for device attach (1). * * Convert the disk device part of the domain config into a S-expresssion in buf. @@ -1650,7 +1635,6 @@ int xenFormatSxprDisk(virDomainDiskDefPtr def, virBufferPtr buf, int hvm, - int xendConfigVersion ATTRIBUTE_UNUSED, int isAttach) { const char *src = virDomainDiskGetSource(def); @@ -1758,7 +1742,6 @@ xenFormatSxprDisk(virDomainDiskDefPtr def, * @def: the domain config * @buf: a buffer for the result S-expression * @hvm: true or 1 if domain is HVM - * @xendConfigVersion: xend configuration file format * @isAttach: create expression for device attach (1). * * Convert the interface description of the domain config into a S-expression in buf. @@ -1773,7 +1756,6 @@ xenFormatSxprNet(virConnectPtr conn, virDomainNetDefPtr def, virBufferPtr buf, int hvm, - int xendConfigVersion ATTRIBUTE_UNUSED, int isAttach) { const char *script = DEFAULT_VIF_SCRIPT; @@ -2093,7 +2075,6 @@ verify(MAX_VIRT_CPUS <= sizeof(1UL) * CHAR_BIT); * xenFormatSxpr: * @conn: pointer to the hypervisor connection * @def: domain config definition - * @xendConfigVersion: xend configuration file format * * Generate an S-expression representing the domain configuration. * @@ -2101,9 +2082,7 @@ verify(MAX_VIRT_CPUS <= sizeof(1UL) * CHAR_BIT); * the caller must free() the returned value. */ char * -xenFormatSxpr(virConnectPtr conn, - virDomainDefPtr def, - int xendConfigVersion) +xenFormatSxpr(virConnectPtr conn, virDomainDefPtr def) { virBuffer buf = VIR_BUFFER_INITIALIZER; char uuidstr[VIR_UUID_STRING_BUFLEN]; @@ -2324,8 +2303,7 @@ xenFormatSxpr(virConnectPtr conn, /* PV graphics for xen <= 3.0.4, or HVM graphics */ if (hvm) { if ((def->ngraphics == 1) && - xenFormatSxprGraphicsOld(def->graphics[0], - &buf, xendConfigVersion) < 0) + xenFormatSxprGraphicsOld(def->graphics[0], &buf) < 0) goto error; } } else { @@ -2405,13 +2383,11 @@ xenFormatSxpr(virConnectPtr conn, for (i = 0; i < def->ndisks; i++) - if (xenFormatSxprDisk(def->disks[i], - &buf, hvm, xendConfigVersion, 0) < 0) + if (xenFormatSxprDisk(def->disks[i], &buf, hvm, 0) < 0) goto error; for (i = 0; i < def->nnets; i++) - if (xenFormatSxprNet(conn, def->nets[i], - &buf, hvm, xendConfigVersion, 0) < 0) + if (xenFormatSxprNet(conn, def->nets[i], &buf, hvm, 0) < 0) goto error; if (xenFormatSxprAllPCI(def, &buf) < 0) diff --git a/src/xenconfig/xen_sxpr.h b/src/xenconfig/xen_sxpr.h index e42a931..a4f4c44 100644 --- a/src/xenconfig/xen_sxpr.h +++ b/src/xenconfig/xen_sxpr.h @@ -32,25 +32,17 @@ # include "domain_conf.h" # include "virsexpr.h" -typedef enum { - XEND_CONFIG_VERSION_3_0_2 = 1, - XEND_CONFIG_VERSION_3_0_3 = 2, - XEND_CONFIG_VERSION_3_0_4 = 3, - XEND_CONFIG_VERSION_3_1_0 = 4, -} xenConfigVersionEnum; - /* helper functions to get the dom id from a sexpr */ -int xenGetDomIdFromSxprString(const char *sexpr, int xendConfigVersion, int *id); -int xenGetDomIdFromSxpr(const struct sexpr *root, int xendConfigVersion, int *id); +int xenGetDomIdFromSxprString(const char *sexpr, int *id); +int xenGetDomIdFromSxpr(const struct sexpr *root, int *id); virDomainDefPtr xenParseSxprString(const char *sexpr, - int xendConfigVersion, char *tty, int vncport, virCapsPtr caps, virDomainXMLOptionPtr xmlopt); -virDomainDefPtr xenParseSxpr(const struct sexpr *root, int xendConfigVersion, +virDomainDefPtr xenParseSxpr(const struct sexpr *root, const char *cpus, char *tty, int vncport); int xenParseSxprSound(virDomainDefPtr def, const char *str); @@ -58,11 +50,11 @@ int xenParseSxprSound(virDomainDefPtr def, const char *str); virDomainChrDefPtr xenParseSxprChar(const char *value, const char *tty); int xenFormatSxprDisk(virDomainDiskDefPtr def, virBufferPtr buf, int hvm, - int xendConfigVersion, int isAttach); + int isAttach); int xenFormatSxprNet(virConnectPtr conn, virDomainNetDefPtr def, virBufferPtr buf, int hvm, - int xendConfigVersion, int isAttach); + int isAttach); int xenFormatSxprOnePCI(virDomainHostdevDefPtr def, virBufferPtr buf, int detach); @@ -70,7 +62,6 @@ int xenFormatSxprOnePCI(virDomainHostdevDefPtr def, virBufferPtr buf, int xenFormatSxprChr(virDomainChrDefPtr def, virBufferPtr buf); int xenFormatSxprSound(virDomainDefPtr def, virBufferPtr buf); -char * xenFormatSxpr(virConnectPtr conn, virDomainDefPtr def, - int xendConfigVersion); +char * xenFormatSxpr(virConnectPtr conn, virDomainDefPtr def); #endif /* __VIR_XEN_SXPR_H__ */ diff --git a/src/xenconfig/xenxs_private.h b/src/xenconfig/xenxs_private.h index 293e986..4f529d6 100644 --- a/src/xenconfig/xenxs_private.h +++ b/src/xenconfig/xenxs_private.h @@ -38,14 +38,6 @@ # define MAX_VIRT_CPUS XEN_LEGACY_MAX_VCPUS # endif -# ifdef WITH_RHEL5_API -# define XEND_CONFIG_MAX_VERS_NET_TYPE_IOEMU 0 -# define XEND_CONFIG_MIN_VERS_PVFB_NEWCONF XEND_CONFIG_VERSION_3_0_3 -# else -# define XEND_CONFIG_MAX_VERS_NET_TYPE_IOEMU XEND_CONFIG_VERSION_3_0_4 -# define XEND_CONFIG_MIN_VERS_PVFB_NEWCONF XEND_CONFIG_VERSION_3_0_4 -# endif - # define MIN_XEN_GUEST_SIZE 64 /* 64 megabytes */ # ifdef __sun diff --git a/tests/sexpr2xmltest.c b/tests/sexpr2xmltest.c index 1b42a18..26fadaa 100644 --- a/tests/sexpr2xmltest.c +++ b/tests/sexpr2xmltest.c @@ -41,20 +41,19 @@ testCompareFiles(const char *xml, const char *sexpr) memset(&priv, 0, sizeof(priv)); /* Many puppies died to bring you this code. */ - priv.xendConfigVersion = 4; priv.caps = caps; conn->privateData = &priv; if (virMutexInit(&priv.lock) < 0) goto fail; - if (xenGetDomIdFromSxprString(sexprData, 4, &id) < 0) + if (xenGetDomIdFromSxprString(sexprData, &id) < 0) goto fail; xenUnifiedLock(&priv); tty = xenStoreDomainGetConsolePath(conn, id); vncport = xenStoreDomainGetVNCPort(conn, id); xenUnifiedUnlock(&priv); - if (!(def = xenParseSxprString(sexprData, 4, + if (!(def = xenParseSxprString(sexprData, tty, vncport, caps, xmlopt))) goto fail; diff --git a/tests/xmconfigtest.c b/tests/xmconfigtest.c index 43a6775..c2084c2 100644 --- a/tests/xmconfigtest.c +++ b/tests/xmconfigtest.c @@ -60,7 +60,6 @@ testCompareParseXML(const char *xmcfg, const char *xml) if (!conn) goto fail; /* Many puppies died to bring you this code. */ - priv.xendConfigVersion = 4; priv.caps = caps; conn->privateData = &priv; @@ -113,7 +112,6 @@ testCompareFormatXML(const char *xmcfg, const char *xml) goto fail; /* Many puppies died to bring you this code. */ - priv.xendConfigVersion = 4; priv.caps = caps; conn->privateData = &priv; diff --git a/tests/xml2sexprtest.c b/tests/xml2sexprtest.c index 246fae0..b1b0cde 100644 --- a/tests/xml2sexprtest.c +++ b/tests/xml2sexprtest.c @@ -36,7 +36,7 @@ testCompareFiles(const char *xml, const char *sexpr) goto fail; } - if (!(gotsexpr = xenFormatSxpr(NULL, def, 4))) + if (!(gotsexpr = xenFormatSxpr(NULL, def))) goto fail; if (virtTestCompareToFile(gotsexpr, sexpr) < 0) -- 2.1.4

xendConfigVersion is no longer used, so remove it from the xenUnifiedPrivate struct. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- src/xen/xen_driver.c | 1 - src/xen/xen_driver.h | 2 -- src/xen/xend_internal.c | 37 ++++--------------------------------- 3 files changed, 4 insertions(+), 36 deletions(-) diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c index 6f25625..b40650f 100644 --- a/src/xen/xen_driver.c +++ b/src/xen/xen_driver.c @@ -487,7 +487,6 @@ xenUnifiedConnectOpen(virConnectPtr conn, virConnectAuthPtr auth, unsigned int f conn->privateData = priv; priv->handle = -1; - priv->xendConfigVersion = -1; priv->xshandle = NULL; diff --git a/src/xen/xen_driver.h b/src/xen/xen_driver.h index b5582a1..5d50a90 100644 --- a/src/xen/xen_driver.h +++ b/src/xen/xen_driver.h @@ -126,8 +126,6 @@ struct _xenUnifiedPrivate { virDomainXMLOptionPtr xmlopt; int handle; /* Xen hypervisor handle */ - int xendConfigVersion; /* XenD config version */ - /* connection to xend */ struct sockaddr_storage addr; socklen_t addrlen; diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c index cd783a1..db3820d 100644 --- a/src/xen/xend_internal.c +++ b/src/xen/xend_internal.c @@ -864,31 +864,6 @@ xenDaemonDomainLookupByName_ids(virConnectPtr xend, } -static int -xend_detect_config_version(virConnectPtr conn) -{ - struct sexpr *root; - const char *value; - xenUnifiedPrivatePtr priv = conn->privateData; - int ret = -1; - - root = sexpr_get(conn, "/xend/node/"); - if (root == NULL) - return ret; - - value = sexpr_node(root, "node/xend_config_format"); - - if (value) { - if (virStrToLong_i(value, NULL, 10, &priv->xendConfigVersion) < 0) - goto cleanup; - } - ret = 0; - cleanup: - sexpr_free(root); - return ret; -} - - /** * sexpr_to_xend_domain_state: * @root: an S-Expression describing a domain @@ -1186,22 +1161,19 @@ xenDaemonOpen(virConnectPtr conn, virReportError(VIR_ERR_NO_CONNECT, __FUNCTION__); goto failed; } - if (xenDaemonOpen_unix(conn, conn->uri->path) < 0 || - xend_detect_config_version(conn) == -1) + if (xenDaemonOpen_unix(conn, conn->uri->path) < 0) goto failed; } else if (STRCASEEQ(conn->uri->scheme, "xen")) { /* * try first to open the unix socket */ - if (xenDaemonOpen_unix(conn, "/var/lib/xend/xend-socket") == 0 && - xend_detect_config_version(conn) != -1) + if (xenDaemonOpen_unix(conn, "/var/lib/xend/xend-socket") == 0) goto done; /* * try though http on port 8000 */ - if (xenDaemonOpen_tcp(conn, "localhost", "8000") < 0 || - xend_detect_config_version(conn) == -1) + if (xenDaemonOpen_tcp(conn, "localhost", "8000") < 0) goto failed; } else if (STRCASEEQ(conn->uri->scheme, "http")) { if (conn->uri->port && @@ -1210,8 +1182,7 @@ xenDaemonOpen(virConnectPtr conn, if (xenDaemonOpen_tcp(conn, conn->uri->server ? conn->uri->server : "localhost", - port ? port : "8000") < 0 || - xend_detect_config_version(conn) == -1) + port ? port : "8000") < 0) goto failed; } else { virReportError(VIR_ERR_NO_CONNECT, __FUNCTION__); -- 2.1.4

On Tue, 2015-12-15 at 14:32 -0700, Jim Fehlig wrote:
Hi All,
Ian Campbell recently attempted [1] to fix and issue around MAX_VIRT_VPUS on ARM that required adding a new XEND_CONFIG_VERSION. After some discussion [2] we decided to drop support for all of the old xend config versions and go with the version supported in Xen 4.0, since the xl syntax was originally based on (and intended to be compatible with) xm circa that point in time.
This series removes all traces of xend config version from the codebase, essentially removing support for Xen 3.x. Hopefully I succeeding in making the rather large series reviewable. The series is also available on the remove-xend-config-version branch of my libvirt github clone [2].
Wow, thanks for offering to take this over, I had no idea it would end up with so much yakk hair everywhere! Ian.
[1] https://www.redhat.com/archives/libvir-list/2015-November/msg01153.ht ml [2] https://www.redhat.com/archives/libvir-list/2015-December/msg00148.ht ml [3] https://github.com/jfehlig/libvirt/tree/remove-xend-config-version
Jim Fehlig (16): Xen: tests: remove old xm config tests Xen: tests: remove net-ioemu xm config test Xen: tests: remove old sexpr2xml tests Xen: tests: remove old xml2sexpr tests Xen: tests: use latest XEND_CONFIG_VERSION in xm/xl tests Xen: xenconfig: remove XEND_CONFIG_VERSION in common code Xen: xenconfig: remove use of XEND_CONFIG_VERSION in xen_xm Xen: xenconfig: remove xendConfigVersion from public functions Xen: tests: use latest XEND_CONFIG_VERSION in sexpr2xml tests Xen: xenconfig: remove disks from '(image)' sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests Xen: xenconfig: remove use of XEND_CONFIG_VERSION in xen_sxpr Xen: xen_driver: remove use of XEND_CONFIG_VERSION Xen: xend: remove use of XEND_CONFIG_VERSION Xen: xenconfig: remove xendConfigVersion from public sexpr functions Xen: remove xendConfigVersion from driver private struct
src/libxl/libxl_driver.c | 9 +- src/xen/xen_driver.c | 296 ++++----------- src/xen/xen_driver.h | 2 - src/xen/xend_internal.c | 224 ++--------- src/xen/xm_internal.c | 9 +- src/xenconfig/xen_common.c | 211 ++++------- src/xenconfig/xen_common.h | 7 +- src/xenconfig/xen_sxpr.c | 411 ++++++--------- ------ src/xenconfig/xen_sxpr.h | 21 +- src/xenconfig/xen_xl.c | 9 +- src/xenconfig/xen_xl.h | 7 +- src/xenconfig/xen_xm.c | 57 +-- src/xenconfig/xen_xm.h | 5 +- src/xenconfig/xenxs_private.h | 8 - tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml | 2 +- .../sexpr2xmldata/sexpr2xml-fv-empty-kernel.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml | 4 +- .../sexpr2xmldata/sexpr2xml-fv-force-nohpet.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml | 2 +- tests/sexpr2xmldata/sexpr2xml-fv-localtime.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.sexpr | 9 - tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml | 48 --- .../sexpr2xmldata/sexpr2xml-fv-net-netfront.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml | 4 +- .../sexpr2xmldata/sexpr2xml-fv-parallel-tcp.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml | 4 +- .../sexpr2xml-fv-serial-dev-2-ports.sexpr | 5 +- .../sexpr2xml-fv-serial-dev-2-ports.xml | 4 +- .../sexpr2xml-fv-serial-dev-2nd-port.sexpr | 4 +- .../sexpr2xml-fv-serial-dev-2nd-port.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-file.sexpr | 7 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-null.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.sexpr | 7 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml | 4 +- .../sexpr2xmldata/sexpr2xml-fv-serial-stdio.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml | 4 +- .../sexpr2xml-fv-serial-tcp-telnet.sexpr | 3 +- .../sexpr2xml-fv-serial-tcp-telnet.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-sound-all.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-sound.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-sound.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-utc.sexpr | 2 + tests/sexpr2xmldata/sexpr2xml-fv-utc.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-v2.xml | 2 +- tests/sexpr2xmldata/sexpr2xml-fv.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml | 2 +- tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr | 9 - tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml | 34 -- tests/sexpr2xmltest.c | 130 ++++--- .../test-fullvirt-direct-kernel-boot.cfg | 3 +- .../test-fullvirt-direct-kernel-boot.xml | 2 +- tests/xlconfigdata/test-fullvirt-multiusb.cfg | 3 +- tests/xlconfigdata/test-fullvirt-multiusb.xml | 2 +- tests/xlconfigdata/test-new-disk.cfg | 3 +- tests/xlconfigdata/test-new-disk.xml | 2 +- tests/xlconfigdata/test-spice-features.cfg | 3 +- tests/xlconfigdata/test-spice-features.xml | 2 +- tests/xlconfigdata/test-spice.cfg | 3 +- tests/xlconfigdata/test-spice.xml | 2 +- tests/xlconfigtest.c | 29 +- tests/xmconfigdata/test-escape-paths.cfg | 5 +- tests/xmconfigdata/test-escape-paths.xml | 2 +- .../xmconfigdata/test-fullvirt-default-feature.cfg | 5 +- .../xmconfigdata/test-fullvirt-default-feature.xml | 2 +- tests/xmconfigdata/test-fullvirt-force-hpet.cfg | 5 +- tests/xmconfigdata/test-fullvirt-force-hpet.xml | 2 +- tests/xmconfigdata/test-fullvirt-force-nohpet.cfg | 5 +- tests/xmconfigdata/test-fullvirt-force-nohpet.xml | 2 +- tests/xmconfigdata/test-fullvirt-localtime.cfg | 5 +- tests/xmconfigdata/test-fullvirt-localtime.xml | 2 +- tests/xmconfigdata/test-fullvirt-net-ioemu.cfg | 25 -- tests/xmconfigdata/test-fullvirt-net-ioemu.xml | 49 --- tests/xmconfigdata/test-fullvirt-net-netfront.cfg | 3 + tests/xmconfigdata/test-fullvirt-net-netfront.xml | 2 +- tests/xmconfigdata/test-fullvirt-new-cdrom.cfg | 5 +- tests/xmconfigdata/test-fullvirt-new-cdrom.xml | 2 +- tests/xmconfigdata/test-fullvirt-old-cdrom.cfg | 26 -- tests/xmconfigdata/test-fullvirt-old-cdrom.xml | 49 --- tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg | 5 +- tests/xmconfigdata/test-fullvirt-parallel-tcp.xml | 2 +- .../test-fullvirt-serial-dev-2-ports.cfg | 5 +- .../test-fullvirt-serial-dev-2-ports.xml | 2 +- .../test-fullvirt-serial-dev-2nd-port.cfg | 5 +- .../test-fullvirt-serial-dev-2nd-port.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-file.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-file.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-null.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-null.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-pipe.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-pipe.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-pty.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-pty.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-stdio.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-stdio.xml | 2 +- .../test-fullvirt-serial-tcp-telnet.cfg | 5 +- .../test-fullvirt-serial-tcp-telnet.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-tcp.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-tcp.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-udp.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-udp.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-unix.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-unix.xml | 2 +- tests/xmconfigdata/test-fullvirt-sound.cfg | 5 +- tests/xmconfigdata/test-fullvirt-sound.xml | 2 +- tests/xmconfigdata/test-fullvirt-usbmouse.cfg | 5 +- tests/xmconfigdata/test-fullvirt-usbmouse.xml | 2 +- tests/xmconfigdata/test-fullvirt-usbtablet.cfg | 5 +- tests/xmconfigdata/test-fullvirt-usbtablet.xml | 2 +- tests/xmconfigdata/test-fullvirt-utc.cfg | 5 +- tests/xmconfigdata/test-fullvirt-utc.xml | 2 +- tests/xmconfigdata/test-no-source-cdrom.cfg | 5 +- tests/xmconfigdata/test-no-source-cdrom.xml | 2 +- .../test-paravirt-old-pvfb-vncdisplay.cfg | 18 - .../test-paravirt-old-pvfb-vncdisplay.xml | 36 -- tests/xmconfigdata/test-paravirt-old-pvfb.cfg | 17 - tests/xmconfigdata/test-paravirt-old-pvfb.xml | 36 -- tests/xmconfigdata/test-pci-devs.cfg | 5 +- tests/xmconfigdata/test-pci-devs.xml | 2 +- tests/xmconfigtest.c | 94 +++-- tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr | 4 +- tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-curmem.sexpr | 2 +- .../xml2sexpr-disk-block-shareable.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-disk-block.sexpr | 2 +- .../xml2sexprdata/xml2sexpr-disk-drv-blkback.sexpr | 2 +- .../xml2sexpr-disk-drv-blktap-qcow.sexpr | 2 +- .../xml2sexpr-disk-drv-blktap-raw.sexpr | 2 +- .../xml2sexprdata/xml2sexpr-disk-drv-blktap.sexpr | 2 +- .../xml2sexpr-disk-drv-blktap2-raw.sexpr | 2 +- .../xml2sexprdata/xml2sexpr-disk-drv-blktap2.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-disk-drv-loop.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-disk-file.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-escape.sexpr | 6 +- tests/xml2sexprdata/xml2sexpr-fv-force-hpet.sexpr | 10 +- .../xml2sexprdata/xml2sexpr-fv-force-nohpet.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-kernel.sexpr | 5 +- tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.sexpr | 9 - tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.xml | 31 -- .../xml2sexprdata/xml2sexpr-fv-net-netfront.sexpr | 5 +- .../xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr | 10 +- .../xml2sexpr-fv-serial-dev-2-ports.sexpr | 13 +- .../xml2sexpr-fv-serial-dev-2nd-port.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr | 13 +- tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr | 13 +- tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr | 10 +- .../xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr | 10 +- .../xml2sexpr-fv-serial-tcp-telnet.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-v2.sexpr | 4 +- tests/xml2sexprdata/xml2sexpr-fv-vncunused.sexpr | 4 +- tests/xml2sexprdata/xml2sexpr-fv.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-net-bridged.sexpr | 3 +- tests/xml2sexprdata/xml2sexpr-net-e1000.sexpr | 3 +- tests/xml2sexprdata/xml2sexpr-net-routed.sexpr | 3 +- .../xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr | 6 +- tests/xml2sexprdata/xml2sexpr-pci-devs.sexpr | 2 +- .../xml2sexpr-pv-bootloader-cmdline.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr | 6 +- tests/xml2sexprdata/xml2sexpr-pv-vcpus.sexpr | 3 +- .../xml2sexprdata/xml2sexpr-pv-vfb-new-auto.sexpr | 3 +- tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr | 3 +- tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr | 10 - tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.xml | 23 -- tests/xml2sexprdata/xml2sexpr-pv.sexpr | 3 +- tests/xml2sexprtest.c | 120 +++--- 193 files changed, 919 insertions(+), 1833 deletions(-) delete mode 100644 tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.sexpr delete mode 100644 tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml delete mode 100644 tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr delete mode 100644 tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml delete mode 100644 tests/xmconfigdata/test-fullvirt-net-ioemu.cfg delete mode 100644 tests/xmconfigdata/test-fullvirt-net-ioemu.xml delete mode 100755 tests/xmconfigdata/test-fullvirt-old-cdrom.cfg delete mode 100644 tests/xmconfigdata/test-fullvirt-old-cdrom.xml delete mode 100644 tests/xmconfigdata/test-paravirt-old-pvfb- vncdisplay.cfg delete mode 100644 tests/xmconfigdata/test-paravirt-old-pvfb- vncdisplay.xml delete mode 100755 tests/xmconfigdata/test-paravirt-old-pvfb.cfg delete mode 100644 tests/xmconfigdata/test-paravirt-old-pvfb.xml delete mode 100644 tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.sexpr delete mode 100644 tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.xml delete mode 100644 tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr delete mode 100644 tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.xml

On Wed, 2015-12-16 at 09:45 +0000, Ian Campbell wrote:
On Tue, 2015-12-15 at 14:32 -0700, Jim Fehlig wrote:
Hi All,
Ian Campbell recently attempted [1] to fix and issue around MAX_VIRT_VPUS on ARM that required adding a new XEND_CONFIG_VERSION. After some discussion [2] we decided to drop support for all of the old xend config versions and go with the version supported in Xen 4.0, since the xl syntax was originally based on (and intended to be compatible with) xm circa that point in time.
This series removes all traces of xend config version from the codebase, essentially removing support for Xen 3.x. Hopefully I succeeding in making the rather large series reviewable. The series is also available on the remove-xend-config-version branch of my libvirt github clone [2].
Wow, thanks for offering to take this over, I had no idea it would end up with so much yakk hair everywhere!
I've looked through it and the transformations look good to me: Acked-by: Ian Campbell <ian.campbell@citrix.com> There were a couple of references to xendConfigVersion remaining in comments on src/xen/xen_driver.c. There was also po/* which I presume some sort of semiautomated update will strip eventually. I'm not sure what to make of the references under docs/api_extension/. I tested this on ARM with "Xen: support maxvcpus in xm and xl config" on top and it worked. Ian.

On 12/16/2015 03:11 AM, Ian Campbell wrote:
On Wed, 2015-12-16 at 09:45 +0000, Ian Campbell wrote:
On Tue, 2015-12-15 at 14:32 -0700, Jim Fehlig wrote:
Hi All,
Ian Campbell recently attempted [1] to fix and issue around MAX_VIRT_VPUS on ARM that required adding a new XEND_CONFIG_VERSION. After some discussion [2] we decided to drop support for all of the old xend config versions and go with the version supported in Xen 4.0, since the xl syntax was originally based on (and intended to be compatible with) xm circa that point in time.
This series removes all traces of xend config version from the codebase, essentially removing support for Xen 3.x. Hopefully I succeeding in making the rather large series reviewable. The series is also available on the remove-xend-config-version branch of my libvirt github clone [2]. Wow, thanks for offering to take this over, I had no idea it would end up with so much yakk hair everywhere! I've looked through it and the transformations look good to me:
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Thanks for taking the time to look at all of these changes!
There were a couple of references to xendConfigVersion remaining in comments on src/xen/xen_driver.c.
I'll remove "with xendConfigVersion >= 3" from those sentences in 13/16.
There was also po/* which I presume some sort of semiautomated update will strip eventually.
I think so. It is due to removal of translated error messages in src/xen/xend_internal.c.
I'm not sure what to make of the references under docs/api_extension/.
Those are old patches that serve as an example of implementing a new API in libvirt. AFAIK, no one expects those to be kept in sync with current code.
I tested this on ARM with "Xen: support maxvcpus in xm and xl config" on top and it worked.
Good to hear. Thanks for all the help! Regards, Jim

On 15.12.2015 22:32, Jim Fehlig wrote:
Hi All,
Ian Campbell recently attempted [1] to fix and issue around MAX_VIRT_VPUS on ARM that required adding a new XEND_CONFIG_VERSION. After some discussion [2] we decided to drop support for all of the old xend config versions and go with the version supported in Xen 4.0, since the xl syntax was originally based on (and intended to be compatible with) xm circa that point in time.
This series removes all traces of xend config version from the codebase, essentially removing support for Xen 3.x. Hopefully I succeeding in making the rather large series reviewable. The series is also available on the remove-xend-config-version branch of my libvirt github clone [2].
[1] https://www.redhat.com/archives/libvir-list/2015-November/msg01153.html [2] https://www.redhat.com/archives/libvir-list/2015-December/msg00148.html [3] https://github.com/jfehlig/libvirt/tree/remove-xend-config-version
Jim Fehlig (16): Xen: tests: remove old xm config tests Xen: tests: remove net-ioemu xm config test Xen: tests: remove old sexpr2xml tests Xen: tests: remove old xml2sexpr tests Xen: tests: use latest XEND_CONFIG_VERSION in xm/xl tests Xen: xenconfig: remove XEND_CONFIG_VERSION in common code Xen: xenconfig: remove use of XEND_CONFIG_VERSION in xen_xm Xen: xenconfig: remove xendConfigVersion from public functions Xen: tests: use latest XEND_CONFIG_VERSION in sexpr2xml tests Xen: xenconfig: remove disks from '(image)' sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests Xen: xenconfig: remove use of XEND_CONFIG_VERSION in xen_sxpr Xen: xen_driver: remove use of XEND_CONFIG_VERSION Xen: xend: remove use of XEND_CONFIG_VERSION Xen: xenconfig: remove xendConfigVersion from public sexpr functions Xen: remove xendConfigVersion from driver private struct
src/libxl/libxl_driver.c | 9 +- src/xen/xen_driver.c | 296 ++++----------- src/xen/xen_driver.h | 2 - src/xen/xend_internal.c | 224 ++--------- src/xen/xm_internal.c | 9 +- src/xenconfig/xen_common.c | 211 ++++------- src/xenconfig/xen_common.h | 7 +- src/xenconfig/xen_sxpr.c | 411 ++++++--------------- src/xenconfig/xen_sxpr.h | 21 +- src/xenconfig/xen_xl.c | 9 +- src/xenconfig/xen_xl.h | 7 +- src/xenconfig/xen_xm.c | 57 +-- src/xenconfig/xen_xm.h | 5 +- src/xenconfig/xenxs_private.h | 8 - tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml | 2 +- .../sexpr2xmldata/sexpr2xml-fv-empty-kernel.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml | 4 +- .../sexpr2xmldata/sexpr2xml-fv-force-nohpet.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml | 2 +- tests/sexpr2xmldata/sexpr2xml-fv-localtime.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.sexpr | 9 - tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml | 48 --- .../sexpr2xmldata/sexpr2xml-fv-net-netfront.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml | 4 +- .../sexpr2xmldata/sexpr2xml-fv-parallel-tcp.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml | 4 +- .../sexpr2xml-fv-serial-dev-2-ports.sexpr | 5 +- .../sexpr2xml-fv-serial-dev-2-ports.xml | 4 +- .../sexpr2xml-fv-serial-dev-2nd-port.sexpr | 4 +- .../sexpr2xml-fv-serial-dev-2nd-port.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-file.sexpr | 7 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-null.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.sexpr | 7 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml | 4 +- .../sexpr2xmldata/sexpr2xml-fv-serial-stdio.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml | 4 +- .../sexpr2xml-fv-serial-tcp-telnet.sexpr | 3 +- .../sexpr2xml-fv-serial-tcp-telnet.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-sound-all.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-sound.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-sound.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-utc.sexpr | 2 + tests/sexpr2xmldata/sexpr2xml-fv-utc.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-v2.xml | 2 +- tests/sexpr2xmldata/sexpr2xml-fv.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml | 2 +- tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr | 9 - tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml | 34 -- tests/sexpr2xmltest.c | 130 ++++--- .../test-fullvirt-direct-kernel-boot.cfg | 3 +- .../test-fullvirt-direct-kernel-boot.xml | 2 +- tests/xlconfigdata/test-fullvirt-multiusb.cfg | 3 +- tests/xlconfigdata/test-fullvirt-multiusb.xml | 2 +- tests/xlconfigdata/test-new-disk.cfg | 3 +- tests/xlconfigdata/test-new-disk.xml | 2 +- tests/xlconfigdata/test-spice-features.cfg | 3 +- tests/xlconfigdata/test-spice-features.xml | 2 +- tests/xlconfigdata/test-spice.cfg | 3 +- tests/xlconfigdata/test-spice.xml | 2 +- tests/xlconfigtest.c | 29 +- tests/xmconfigdata/test-escape-paths.cfg | 5 +- tests/xmconfigdata/test-escape-paths.xml | 2 +- .../xmconfigdata/test-fullvirt-default-feature.cfg | 5 +- .../xmconfigdata/test-fullvirt-default-feature.xml | 2 +- tests/xmconfigdata/test-fullvirt-force-hpet.cfg | 5 +- tests/xmconfigdata/test-fullvirt-force-hpet.xml | 2 +- tests/xmconfigdata/test-fullvirt-force-nohpet.cfg | 5 +- tests/xmconfigdata/test-fullvirt-force-nohpet.xml | 2 +- tests/xmconfigdata/test-fullvirt-localtime.cfg | 5 +- tests/xmconfigdata/test-fullvirt-localtime.xml | 2 +- tests/xmconfigdata/test-fullvirt-net-ioemu.cfg | 25 -- tests/xmconfigdata/test-fullvirt-net-ioemu.xml | 49 --- tests/xmconfigdata/test-fullvirt-net-netfront.cfg | 3 + tests/xmconfigdata/test-fullvirt-net-netfront.xml | 2 +- tests/xmconfigdata/test-fullvirt-new-cdrom.cfg | 5 +- tests/xmconfigdata/test-fullvirt-new-cdrom.xml | 2 +- tests/xmconfigdata/test-fullvirt-old-cdrom.cfg | 26 -- tests/xmconfigdata/test-fullvirt-old-cdrom.xml | 49 --- tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg | 5 +- tests/xmconfigdata/test-fullvirt-parallel-tcp.xml | 2 +- .../test-fullvirt-serial-dev-2-ports.cfg | 5 +- .../test-fullvirt-serial-dev-2-ports.xml | 2 +- .../test-fullvirt-serial-dev-2nd-port.cfg | 5 +- .../test-fullvirt-serial-dev-2nd-port.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-file.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-file.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-null.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-null.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-pipe.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-pipe.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-pty.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-pty.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-stdio.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-stdio.xml | 2 +- .../test-fullvirt-serial-tcp-telnet.cfg | 5 +- .../test-fullvirt-serial-tcp-telnet.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-tcp.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-tcp.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-udp.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-udp.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-unix.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-unix.xml | 2 +- tests/xmconfigdata/test-fullvirt-sound.cfg | 5 +- tests/xmconfigdata/test-fullvirt-sound.xml | 2 +- tests/xmconfigdata/test-fullvirt-usbmouse.cfg | 5 +- tests/xmconfigdata/test-fullvirt-usbmouse.xml | 2 +- tests/xmconfigdata/test-fullvirt-usbtablet.cfg | 5 +- tests/xmconfigdata/test-fullvirt-usbtablet.xml | 2 +- tests/xmconfigdata/test-fullvirt-utc.cfg | 5 +- tests/xmconfigdata/test-fullvirt-utc.xml | 2 +- tests/xmconfigdata/test-no-source-cdrom.cfg | 5 +- tests/xmconfigdata/test-no-source-cdrom.xml | 2 +- .../test-paravirt-old-pvfb-vncdisplay.cfg | 18 - .../test-paravirt-old-pvfb-vncdisplay.xml | 36 -- tests/xmconfigdata/test-paravirt-old-pvfb.cfg | 17 - tests/xmconfigdata/test-paravirt-old-pvfb.xml | 36 -- tests/xmconfigdata/test-pci-devs.cfg | 5 +- tests/xmconfigdata/test-pci-devs.xml | 2 +- tests/xmconfigtest.c | 94 +++-- tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr | 4 +- tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-curmem.sexpr | 2 +- .../xml2sexpr-disk-block-shareable.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-disk-block.sexpr | 2 +- .../xml2sexprdata/xml2sexpr-disk-drv-blkback.sexpr | 2 +- .../xml2sexpr-disk-drv-blktap-qcow.sexpr | 2 +- .../xml2sexpr-disk-drv-blktap-raw.sexpr | 2 +- .../xml2sexprdata/xml2sexpr-disk-drv-blktap.sexpr | 2 +- .../xml2sexpr-disk-drv-blktap2-raw.sexpr | 2 +- .../xml2sexprdata/xml2sexpr-disk-drv-blktap2.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-disk-drv-loop.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-disk-file.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-escape.sexpr | 6 +- tests/xml2sexprdata/xml2sexpr-fv-force-hpet.sexpr | 10 +- .../xml2sexprdata/xml2sexpr-fv-force-nohpet.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-kernel.sexpr | 5 +- tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.sexpr | 9 - tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.xml | 31 -- .../xml2sexprdata/xml2sexpr-fv-net-netfront.sexpr | 5 +- .../xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr | 10 +- .../xml2sexpr-fv-serial-dev-2-ports.sexpr | 13 +- .../xml2sexpr-fv-serial-dev-2nd-port.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr | 13 +- tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr | 13 +- tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr | 10 +- .../xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr | 10 +- .../xml2sexpr-fv-serial-tcp-telnet.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-v2.sexpr | 4 +- tests/xml2sexprdata/xml2sexpr-fv-vncunused.sexpr | 4 +- tests/xml2sexprdata/xml2sexpr-fv.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-net-bridged.sexpr | 3 +- tests/xml2sexprdata/xml2sexpr-net-e1000.sexpr | 3 +- tests/xml2sexprdata/xml2sexpr-net-routed.sexpr | 3 +- .../xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr | 6 +- tests/xml2sexprdata/xml2sexpr-pci-devs.sexpr | 2 +- .../xml2sexpr-pv-bootloader-cmdline.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr | 6 +- tests/xml2sexprdata/xml2sexpr-pv-vcpus.sexpr | 3 +- .../xml2sexprdata/xml2sexpr-pv-vfb-new-auto.sexpr | 3 +- tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr | 3 +- tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr | 10 - tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.xml | 23 -- tests/xml2sexprdata/xml2sexpr-pv.sexpr | 3 +- tests/xml2sexprtest.c | 120 +++--- 193 files changed, 919 insertions(+), 1833 deletions(-) delete mode 100644 tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.sexpr delete mode 100644 tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml delete mode 100644 tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr delete mode 100644 tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml delete mode 100644 tests/xmconfigdata/test-fullvirt-net-ioemu.cfg delete mode 100644 tests/xmconfigdata/test-fullvirt-net-ioemu.xml delete mode 100755 tests/xmconfigdata/test-fullvirt-old-cdrom.cfg delete mode 100644 tests/xmconfigdata/test-fullvirt-old-cdrom.xml delete mode 100644 tests/xmconfigdata/test-paravirt-old-pvfb-vncdisplay.cfg delete mode 100644 tests/xmconfigdata/test-paravirt-old-pvfb-vncdisplay.xml delete mode 100755 tests/xmconfigdata/test-paravirt-old-pvfb.cfg delete mode 100644 tests/xmconfigdata/test-paravirt-old-pvfb.xml delete mode 100644 tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.sexpr delete mode 100644 tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.xml delete mode 100644 tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr delete mode 100644 tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.xml
ACK series Michal

On 12/17/2015 05:42 AM, Michal Privoznik wrote:
On 15.12.2015 22:32, Jim Fehlig wrote:
Hi All,
Ian Campbell recently attempted [1] to fix and issue around MAX_VIRT_VPUS on ARM that required adding a new XEND_CONFIG_VERSION. After some discussion [2] we decided to drop support for all of the old xend config versions and go with the version supported in Xen 4.0, since the xl syntax was originally based on (and intended to be compatible with) xm circa that point in time.
This series removes all traces of xend config version from the codebase, essentially removing support for Xen 3.x. Hopefully I succeeding in making the rather large series reviewable. The series is also available on the remove-xend-config-version branch of my libvirt github clone [2].
[1] https://www.redhat.com/archives/libvir-list/2015-November/msg01153.html [2] https://www.redhat.com/archives/libvir-list/2015-December/msg00148.html [3] https://github.com/jfehlig/libvirt/tree/remove-xend-config-version
Jim Fehlig (16): Xen: tests: remove old xm config tests Xen: tests: remove net-ioemu xm config test Xen: tests: remove old sexpr2xml tests Xen: tests: remove old xml2sexpr tests Xen: tests: use latest XEND_CONFIG_VERSION in xm/xl tests Xen: xenconfig: remove XEND_CONFIG_VERSION in common code Xen: xenconfig: remove use of XEND_CONFIG_VERSION in xen_xm Xen: xenconfig: remove xendConfigVersion from public functions Xen: tests: use latest XEND_CONFIG_VERSION in sexpr2xml tests Xen: xenconfig: remove disks from '(image)' sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests Xen: xenconfig: remove use of XEND_CONFIG_VERSION in xen_sxpr Xen: xen_driver: remove use of XEND_CONFIG_VERSION Xen: xend: remove use of XEND_CONFIG_VERSION Xen: xenconfig: remove xendConfigVersion from public sexpr functions Xen: remove xendConfigVersion from driver private struct
src/libxl/libxl_driver.c | 9 +- src/xen/xen_driver.c | 296 ++++----------- src/xen/xen_driver.h | 2 - src/xen/xend_internal.c | 224 ++--------- src/xen/xm_internal.c | 9 +- src/xenconfig/xen_common.c | 211 ++++------- src/xenconfig/xen_common.h | 7 +- src/xenconfig/xen_sxpr.c | 411 ++++++--------------- src/xenconfig/xen_sxpr.h | 21 +- src/xenconfig/xen_xl.c | 9 +- src/xenconfig/xen_xl.h | 7 +- src/xenconfig/xen_xm.c | 57 +-- src/xenconfig/xen_xm.h | 5 +- src/xenconfig/xenxs_private.h | 8 - tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml | 2 +- .../sexpr2xmldata/sexpr2xml-fv-empty-kernel.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml | 4 +- .../sexpr2xmldata/sexpr2xml-fv-force-nohpet.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml | 2 +- tests/sexpr2xmldata/sexpr2xml-fv-localtime.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.sexpr | 9 - tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml | 48 --- .../sexpr2xmldata/sexpr2xml-fv-net-netfront.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml | 4 +- .../sexpr2xmldata/sexpr2xml-fv-parallel-tcp.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml | 4 +- .../sexpr2xml-fv-serial-dev-2-ports.sexpr | 5 +- .../sexpr2xml-fv-serial-dev-2-ports.xml | 4 +- .../sexpr2xml-fv-serial-dev-2nd-port.sexpr | 4 +- .../sexpr2xml-fv-serial-dev-2nd-port.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-file.sexpr | 7 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-null.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.sexpr | 7 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml | 4 +- .../sexpr2xmldata/sexpr2xml-fv-serial-stdio.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml | 4 +- .../sexpr2xml-fv-serial-tcp-telnet.sexpr | 3 +- .../sexpr2xml-fv-serial-tcp-telnet.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-sound-all.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-sound.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-sound.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.sexpr | 3 +- tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-utc.sexpr | 2 + tests/sexpr2xmldata/sexpr2xml-fv-utc.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-fv-v2.xml | 2 +- tests/sexpr2xmldata/sexpr2xml-fv.sexpr | 4 +- tests/sexpr2xmldata/sexpr2xml-fv.xml | 4 +- tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml | 2 +- tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr | 9 - tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml | 34 -- tests/sexpr2xmltest.c | 130 ++++--- .../test-fullvirt-direct-kernel-boot.cfg | 3 +- .../test-fullvirt-direct-kernel-boot.xml | 2 +- tests/xlconfigdata/test-fullvirt-multiusb.cfg | 3 +- tests/xlconfigdata/test-fullvirt-multiusb.xml | 2 +- tests/xlconfigdata/test-new-disk.cfg | 3 +- tests/xlconfigdata/test-new-disk.xml | 2 +- tests/xlconfigdata/test-spice-features.cfg | 3 +- tests/xlconfigdata/test-spice-features.xml | 2 +- tests/xlconfigdata/test-spice.cfg | 3 +- tests/xlconfigdata/test-spice.xml | 2 +- tests/xlconfigtest.c | 29 +- tests/xmconfigdata/test-escape-paths.cfg | 5 +- tests/xmconfigdata/test-escape-paths.xml | 2 +- .../xmconfigdata/test-fullvirt-default-feature.cfg | 5 +- .../xmconfigdata/test-fullvirt-default-feature.xml | 2 +- tests/xmconfigdata/test-fullvirt-force-hpet.cfg | 5 +- tests/xmconfigdata/test-fullvirt-force-hpet.xml | 2 +- tests/xmconfigdata/test-fullvirt-force-nohpet.cfg | 5 +- tests/xmconfigdata/test-fullvirt-force-nohpet.xml | 2 +- tests/xmconfigdata/test-fullvirt-localtime.cfg | 5 +- tests/xmconfigdata/test-fullvirt-localtime.xml | 2 +- tests/xmconfigdata/test-fullvirt-net-ioemu.cfg | 25 -- tests/xmconfigdata/test-fullvirt-net-ioemu.xml | 49 --- tests/xmconfigdata/test-fullvirt-net-netfront.cfg | 3 + tests/xmconfigdata/test-fullvirt-net-netfront.xml | 2 +- tests/xmconfigdata/test-fullvirt-new-cdrom.cfg | 5 +- tests/xmconfigdata/test-fullvirt-new-cdrom.xml | 2 +- tests/xmconfigdata/test-fullvirt-old-cdrom.cfg | 26 -- tests/xmconfigdata/test-fullvirt-old-cdrom.xml | 49 --- tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg | 5 +- tests/xmconfigdata/test-fullvirt-parallel-tcp.xml | 2 +- .../test-fullvirt-serial-dev-2-ports.cfg | 5 +- .../test-fullvirt-serial-dev-2-ports.xml | 2 +- .../test-fullvirt-serial-dev-2nd-port.cfg | 5 +- .../test-fullvirt-serial-dev-2nd-port.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-file.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-file.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-null.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-null.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-pipe.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-pipe.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-pty.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-pty.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-stdio.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-stdio.xml | 2 +- .../test-fullvirt-serial-tcp-telnet.cfg | 5 +- .../test-fullvirt-serial-tcp-telnet.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-tcp.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-tcp.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-udp.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-udp.xml | 2 +- tests/xmconfigdata/test-fullvirt-serial-unix.cfg | 5 +- tests/xmconfigdata/test-fullvirt-serial-unix.xml | 2 +- tests/xmconfigdata/test-fullvirt-sound.cfg | 5 +- tests/xmconfigdata/test-fullvirt-sound.xml | 2 +- tests/xmconfigdata/test-fullvirt-usbmouse.cfg | 5 +- tests/xmconfigdata/test-fullvirt-usbmouse.xml | 2 +- tests/xmconfigdata/test-fullvirt-usbtablet.cfg | 5 +- tests/xmconfigdata/test-fullvirt-usbtablet.xml | 2 +- tests/xmconfigdata/test-fullvirt-utc.cfg | 5 +- tests/xmconfigdata/test-fullvirt-utc.xml | 2 +- tests/xmconfigdata/test-no-source-cdrom.cfg | 5 +- tests/xmconfigdata/test-no-source-cdrom.xml | 2 +- .../test-paravirt-old-pvfb-vncdisplay.cfg | 18 - .../test-paravirt-old-pvfb-vncdisplay.xml | 36 -- tests/xmconfigdata/test-paravirt-old-pvfb.cfg | 17 - tests/xmconfigdata/test-paravirt-old-pvfb.xml | 36 -- tests/xmconfigdata/test-pci-devs.cfg | 5 +- tests/xmconfigdata/test-pci-devs.xml | 2 +- tests/xmconfigtest.c | 94 +++-- tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr | 4 +- tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-curmem.sexpr | 2 +- .../xml2sexpr-disk-block-shareable.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-disk-block.sexpr | 2 +- .../xml2sexprdata/xml2sexpr-disk-drv-blkback.sexpr | 2 +- .../xml2sexpr-disk-drv-blktap-qcow.sexpr | 2 +- .../xml2sexpr-disk-drv-blktap-raw.sexpr | 2 +- .../xml2sexprdata/xml2sexpr-disk-drv-blktap.sexpr | 2 +- .../xml2sexpr-disk-drv-blktap2-raw.sexpr | 2 +- .../xml2sexprdata/xml2sexpr-disk-drv-blktap2.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-disk-drv-loop.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-disk-file.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-escape.sexpr | 6 +- tests/xml2sexprdata/xml2sexpr-fv-force-hpet.sexpr | 10 +- .../xml2sexprdata/xml2sexpr-fv-force-nohpet.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-kernel.sexpr | 5 +- tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.sexpr | 9 - tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.xml | 31 -- .../xml2sexprdata/xml2sexpr-fv-net-netfront.sexpr | 5 +- .../xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr | 10 +- .../xml2sexpr-fv-serial-dev-2-ports.sexpr | 13 +- .../xml2sexpr-fv-serial-dev-2nd-port.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr | 13 +- tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr | 13 +- tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr | 10 +- .../xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr | 10 +- .../xml2sexpr-fv-serial-tcp-telnet.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-fv-v2.sexpr | 4 +- tests/xml2sexprdata/xml2sexpr-fv-vncunused.sexpr | 4 +- tests/xml2sexprdata/xml2sexpr-fv.sexpr | 10 +- tests/xml2sexprdata/xml2sexpr-net-bridged.sexpr | 3 +- tests/xml2sexprdata/xml2sexpr-net-e1000.sexpr | 3 +- tests/xml2sexprdata/xml2sexpr-net-routed.sexpr | 3 +- .../xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr | 6 +- tests/xml2sexprdata/xml2sexpr-pci-devs.sexpr | 2 +- .../xml2sexpr-pv-bootloader-cmdline.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr | 2 +- tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr | 6 +- tests/xml2sexprdata/xml2sexpr-pv-vcpus.sexpr | 3 +- .../xml2sexprdata/xml2sexpr-pv-vfb-new-auto.sexpr | 3 +- tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr | 3 +- tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr | 10 - tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.xml | 23 -- tests/xml2sexprdata/xml2sexpr-pv.sexpr | 3 +- tests/xml2sexprtest.c | 120 +++--- 193 files changed, 919 insertions(+), 1833 deletions(-) delete mode 100644 tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.sexpr delete mode 100644 tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml delete mode 100644 tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr delete mode 100644 tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml delete mode 100644 tests/xmconfigdata/test-fullvirt-net-ioemu.cfg delete mode 100644 tests/xmconfigdata/test-fullvirt-net-ioemu.xml delete mode 100755 tests/xmconfigdata/test-fullvirt-old-cdrom.cfg delete mode 100644 tests/xmconfigdata/test-fullvirt-old-cdrom.xml delete mode 100644 tests/xmconfigdata/test-paravirt-old-pvfb-vncdisplay.cfg delete mode 100644 tests/xmconfigdata/test-paravirt-old-pvfb-vncdisplay.xml delete mode 100755 tests/xmconfigdata/test-paravirt-old-pvfb.cfg delete mode 100644 tests/xmconfigdata/test-paravirt-old-pvfb.xml delete mode 100644 tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.sexpr delete mode 100644 tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.xml delete mode 100644 tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr delete mode 100644 tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.xml
ACK series
Thanks! I removed 'xendConfigVersion' from the comments in xen_driver.c (patch 13/16) noted by Ian and pushed the series. This was a lot of work in preparation for Ian's patch to fix ARM tests where maxvcpus > 1 https://www.redhat.com/archives/libvir-list/2015-December/msg00631.html Ian has 'Tested-by' and 'Acked-by' that patch on top of this series. Any objections to pushing the fruit of all this labour? Regards, Jim
participants (3)
-
Ian Campbell
-
Jim Fehlig
-
Michal Privoznik