diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2010-08-23 14:00:22 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2010-10-13 16:42:48 +0100 |
commit | 3a092f38994a57f3c12397464f7532cb82e15e14 (patch) | |
tree | dd1d99c2ea5f3df70a9183a6dc3c59756e22cd56 /tests/xml2sexprdata | |
parent | 4435f3c4779b8e2a63166ebe987979e921afa5e0 (diff) | |
download | libvirt-3a092f38994a57f3c12397464f7532cb82e15e14.tar.gz |
Fix Xen SEXPR generation to properly quote strings containing ()
* src/xen/sexpr.c: Ensure () are escaped in sexpr2string
* tests/sexpr2xmldata/sexpr2xml-boot-grub.sexpr,
tests/sexpr2xmldata/sexpr2xml-boot-grub.xml,
tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr,
tests/xml2sexprdata/xml2sexpr-boot-grub.xml: Data files to
check escaping
* tests/sexpr2xmltest.c, tests/xml2sexprtest.c: Add boot-grub
escaping test case
Diffstat (limited to 'tests/xml2sexprdata')
-rw-r--r-- | tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr | 1 | ||||
-rw-r--r-- | tests/xml2sexprdata/xml2sexpr-boot-grub.xml | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr b/tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr new file mode 100644 index 0000000000..a9d14df68d --- /dev/null +++ b/tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr @@ -0,0 +1 @@ +(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)))(device (vbd (dev 'xvda')(uname 'phy:/dev/MainVG/GuestLV')(mode 'w'))))
\ No newline at end of file diff --git a/tests/xml2sexprdata/xml2sexpr-boot-grub.xml b/tests/xml2sexprdata/xml2sexpr-boot-grub.xml new file mode 100644 index 0000000000..b9b1c9f784 --- /dev/null +++ b/tests/xml2sexprdata/xml2sexpr-boot-grub.xml @@ -0,0 +1,21 @@ +<domain type='xen' id='15'> + <name>pvtest</name> + <uuid>596a5d2171f48fb2e068e2386a5c413e</uuid> + <os> + <type>linux</type> + <kernel>/usr/lib/xen/boot/pv-grub-x86_64.gz</kernel> + <cmdline>(hd0,0)/grub/menu.lst</cmdline> + </os> + <memory>430080</memory> + <vcpu>2</vcpu> + <on_poweroff>destroy</on_poweroff> + <on_reboot>destroy</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <disk type='block' device='disk'> + <source dev='/dev/MainVG/GuestLV'/> + <target dev='xvda'/> + </disk> + <console tty='/dev/pts/4'/> + </devices> +</domain> |