diff options
author | Daniel Veillard <veillard@redhat.com> | 2007-06-07 13:50:18 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2007-06-07 13:50:18 +0000 |
commit | a80faa4bf089590aa97aaa01c3dc879c71b39cff (patch) | |
tree | 6f5c9007d76f9ea6de5ff8620b5e99ab55ee10a6 /tests | |
parent | * src/libvirt.c: do not die if the daemon is not running on a Xen (diff) | |
download | libvirt-a80faa4bf089590aa97aaa01c3dc879c71b39cff.tar.gz libvirt-a80faa4bf089590aa97aaa01c3dc879c71b39cff.tar.bz2 libvirt-a80faa4bf089590aa97aaa01c3dc879c71b39cff.zip |
* src/xend_internal.c src/xm_internal.c src/xml.c: add support
for arguments to bootloader, patch from Hugh Brock
* tests/sexpr2xmltest.c tests/xml2sexprtest.c
tests/sexpr2xmldata/sexpr2xml-pv-bootloader.sexpr
tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml
tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr
tests/xml2sexprdata/xml2sexpr-pv-bootloader.xml: add specific
regression tests
Daniel
Diffstat (limited to 'tests')
-rw-r--r-- | tests/sexpr2xmldata/sexpr2xml-pv-bootloader.sexpr | 1 | ||||
-rw-r--r-- | tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml | 18 | ||||
-rw-r--r-- | tests/sexpr2xmltest.c | 10 | ||||
-rw-r--r-- | tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr | 1 | ||||
-rw-r--r-- | tests/xml2sexprdata/xml2sexpr-pv-bootloader.xml | 19 | ||||
-rw-r--r-- | tests/xml2sexprtest.c | 11 |
6 files changed, 60 insertions, 0 deletions
diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.sexpr b/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.sexpr new file mode 100644 index 000000000..51b511c80 --- /dev/null +++ b/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.sexpr @@ -0,0 +1 @@ +(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(bootloader '/usr/bin/pypxeboot')(bootloader_args 'mac=AA:00:86:e2:35:72')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))
\ No newline at end of file diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml b/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml new file mode 100644 index 000000000..221832dbc --- /dev/null +++ b/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml @@ -0,0 +1,18 @@ +<domain type='xen' id='6'> + <name>pvtest</name> + <uuid>596a5d2171f48fb2e068e2386a5c413e</uuid> + <bootloader>/usr/bin/pypxeboot</bootloader> + <bootloader_args>mac=AA:00:86:e2:35:72</bootloader_args> + <memory>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> + </devices> +</domain> diff --git a/tests/sexpr2xmltest.c b/tests/sexpr2xmltest.c index 2c567aaf8..1f0af7c93 100644 --- a/tests/sexpr2xmltest.c +++ b/tests/sexpr2xmltest.c @@ -81,6 +81,12 @@ static int testCompareFVversion2(void *data ATTRIBUTE_UNUSED) { 2); } +static int testComparePVBootloader(void *data ATTRIBUTE_UNUSED) { + return testCompareFiles("sexpr2xmldata/sexpr2xml-pv-bootloader.xml", + "sexpr2xmldata/sexpr2xml-pv-bootloader.sexpr", + 2); +} + static int testCompareDiskFile(void *data ATTRIBUTE_UNUSED) { return testCompareFiles("sexpr2xmldata/sexpr2xml-disk-file.xml", "sexpr2xmldata/sexpr2xml-disk-file.sexpr", @@ -167,6 +173,10 @@ main(int argc, char **argv) 1, testCompareFVversion2, NULL) != 0) ret = -1; + if (virtTestRun("SEXPR-2-XML PV config bootloader", + 1, testComparePVBootloader, NULL) != 0) + ret = -1; + if (virtTestRun("SEXPR-2-XML Disk File config", 1, testCompareDiskFile, NULL) != 0) ret = -1; diff --git a/tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr b/tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr new file mode 100644 index 000000000..a3bc30dbb --- /dev/null +++ b/tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr @@ -0,0 +1 @@ +(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(bootloader '/usr/bin/pypxeboot')(bootloader_args 'mac=AA:00:86:e2:35:72')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))
\ No newline at end of file diff --git a/tests/xml2sexprdata/xml2sexpr-pv-bootloader.xml b/tests/xml2sexprdata/xml2sexpr-pv-bootloader.xml new file mode 100644 index 000000000..6bf7e262f --- /dev/null +++ b/tests/xml2sexprdata/xml2sexpr-pv-bootloader.xml @@ -0,0 +1,19 @@ +<domain type='xen' id='15'> + <name>pvtest</name> + <uuid>596a5d2171f48fb2e068e2386a5c413e</uuid> + <bootloader>/usr/bin/pypxeboot</bootloader> + <bootloader_args>mac=AA:00:86:e2:35:72</bootloader_args> + <memory>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'> + <source file='/root/some.img'/> + <target dev='xvda'/> + </disk> + <console tty='/dev/pts/4'/> + </devices> +</domain> + diff --git a/tests/xml2sexprtest.c b/tests/xml2sexprtest.c index 069d65f06..7cc93a024 100644 --- a/tests/xml2sexprtest.c +++ b/tests/xml2sexprtest.c @@ -103,6 +103,13 @@ static int testComparePVNewVFB(void *data ATTRIBUTE_UNUSED) { 3); } +static int testComparePVBootloader(void *data ATTRIBUTE_UNUSED) { + return testCompareFiles("xml2sexprdata/xml2sexpr-pv-bootloader.xml", + "xml2sexprdata/xml2sexpr-pv-bootloader.sexpr", + "pvtest", + 1); +} + static int testCompareDiskFile(void *data ATTRIBUTE_UNUSED) { return testCompareFiles("xml2sexprdata/xml2sexpr-disk-file.xml", "xml2sexprdata/xml2sexpr-disk-file.sexpr", @@ -221,6 +228,10 @@ main(int argc, char **argv) 1, testComparePVNewVFB, NULL) != 0) ret = -1; + if (virtTestRun("XML-2-SEXPR PV config with bootloader", + 1, testComparePVBootloader, NULL) != 0) + ret = -1; + if (virtTestRun("XML-2-SEXPR Disk File", 1, testCompareDiskFile, NULL) != 0) ret = -1; |