mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-25 10:03:49 +03:00
* tests/sexpr2xmltest.c tests/xml2sexprtest.c: warn before exiting
if the path environment variable is missing, add the tests for <shareable/> from/to w! ode for disk * tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.sexpr tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml tests/xml2sexprdata/xml2sexpr-disk-block-shareable.sexpr tests/xml2sexprdata/xml2sexpr-disk-block-shareable.xml: the new tests data Daniel
This commit is contained in:
parent
a2492efb60
commit
ef4006b3a5
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
Tue Nov 20 11:03:02 CET 2007 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* tests/sexpr2xmltest.c tests/xml2sexprtest.c: warn before exiting
|
||||
if the path environment variable is missing, add the tests for
|
||||
<shareable/> from/to w! ode for disk
|
||||
* tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.sexpr
|
||||
tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml
|
||||
tests/xml2sexprdata/xml2sexpr-disk-block-shareable.sexpr
|
||||
tests/xml2sexprdata/xml2sexpr-disk-block-shareable.xml:
|
||||
the new tests data
|
||||
|
||||
Sun Nov 18 11:24:33 UTC 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* tests/Makefile.am: Re-add quotes around top_{src,build}dir
|
||||
|
1
tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.sexpr
Normal file
1
tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.sexpr
Normal file
@ -0,0 +1 @@
|
||||
(domain (domid 6)(name 'pvtest')(memory 384)(maxmem 512)(vcpus 1)(uuid '49a0c6ffc066539264983632d093c2e7')(bootloader '/usr/bin/pygrub')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(device (tap (dev 'xvda')(uname 'tap:aio:/var/lib/xen/images/rhel5pv.img')(mode 'w!')))(device (vif (mac '00:16:3e:23:9e:eb')(bridge 'xenbr0')(script 'vif-bridge'))))
|
25
tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml
Normal file
25
tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<domain type='xen' id='6'>
|
||||
<name>pvtest</name>
|
||||
<uuid>49a0c6ff-c066-5392-6498-3632d093c2e7</uuid>
|
||||
<bootloader>/usr/bin/pygrub</bootloader>
|
||||
<memory>524288</memory>
|
||||
<currentMemory>393216</currentMemory>
|
||||
<vcpu>1</vcpu>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>restart</on_crash>
|
||||
<devices>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='tap' type='aio'/>
|
||||
<source file='/var/lib/xen/images/rhel5pv.img'/>
|
||||
<target dev='xvda'/>
|
||||
<shareable/>
|
||||
</disk>
|
||||
<interface type='bridge'>
|
||||
<source bridge='xenbr0'/>
|
||||
<target dev='vif6.0'/>
|
||||
<mac address='00:16:3e:23:9e:eb'/>
|
||||
<script path='vif-bridge'/>
|
||||
</interface>
|
||||
</devices>
|
||||
</domain>
|
@ -108,6 +108,12 @@ static int testCompareDiskBlock(const void *data ATTRIBUTE_UNUSED) {
|
||||
1);
|
||||
}
|
||||
|
||||
static int testCompareDiskShareable(const void *data ATTRIBUTE_UNUSED) {
|
||||
return testCompareFiles("sexpr2xmldata/sexpr2xml-disk-block-shareable.xml",
|
||||
"sexpr2xmldata/sexpr2xml-disk-block-shareable.sexpr",
|
||||
1);
|
||||
}
|
||||
|
||||
static int testCompareDiskDrvBlktapQcow(const void *data ATTRIBUTE_UNUSED) {
|
||||
return testCompareFiles("sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml",
|
||||
"sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.sexpr",
|
||||
@ -183,8 +189,10 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
abs_top_srcdir = getenv("abs_top_srcdir");
|
||||
if (!abs_top_srcdir)
|
||||
return 1;
|
||||
if (!abs_top_srcdir) {
|
||||
fprintf(stderr, "missing enviroment variable abs_top_srcdir\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (virtTestRun("SEXPR-2-XML PV config (version 1)",
|
||||
1, testComparePVversion1, NULL) != 0)
|
||||
@ -222,6 +230,10 @@ main(int argc, char **argv)
|
||||
1, testCompareDiskBlock, NULL) != 0)
|
||||
ret = -1;
|
||||
|
||||
if (virtTestRun("SEXPR-2-XML Disk Block shareable",
|
||||
1, testCompareDiskShareable, NULL) != 0)
|
||||
ret = -1;
|
||||
|
||||
if (virtTestRun("SEXPR-2-XML Disk Driver blktap qcow config",
|
||||
1, testCompareDiskDrvBlktapQcow, NULL) != 0)
|
||||
ret = -1;
|
||||
|
1
tests/xml2sexprdata/xml2sexpr-disk-block-shareable.sexpr
Normal file
1
tests/xml2sexprdata/xml2sexpr-disk-block-shareable.sexpr
Normal file
@ -0,0 +1 @@
|
||||
(vm (name 'pvtest')(memory 384)(maxmem 512)(vcpus 1)(uuid '49a0c6ffc066539264983632d093c2e7')(bootloader '/usr/bin/pygrub')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(device (tap (dev 'xvda')(uname 'tap:aio:/var/lib/xen/images/rhel5pv.img')(mode 'w!')))(device (vif (mac '00:16:3e:23:9e:eb')(bridge 'xenbr0')(script 'vif-bridge'))))
|
33
tests/xml2sexprdata/xml2sexpr-disk-block-shareable.xml
Normal file
33
tests/xml2sexprdata/xml2sexpr-disk-block-shareable.xml
Normal file
@ -0,0 +1,33 @@
|
||||
<domain type='xen'>
|
||||
<name>pvtest</name>
|
||||
<uuid>49a0c6ffc066539264983632d093c2e7</uuid>
|
||||
<bootloader>/usr/bin/pygrub</bootloader>
|
||||
<os>
|
||||
<type>linux</type>
|
||||
<kernel>/var/lib/xen/boot_kernel.BCkYBN</kernel>
|
||||
<initrd>/var/lib/xen/boot_ramdisk.sjOK9_</initrd>
|
||||
<cmdline>ro root=/dev/VolGroup00/LogVol00</cmdline>
|
||||
</os>
|
||||
<currentMemory>393216</currentMemory>
|
||||
<memory>524288</memory>
|
||||
<vcpu>1</vcpu>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>restart</on_crash>
|
||||
<devices>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='tap' type='aio'/>
|
||||
<source file='/var/lib/xen/images/rhel5pv.img'/>
|
||||
<target dev='xvda'/>
|
||||
<shareable/>
|
||||
</disk>
|
||||
<interface type='bridge'>
|
||||
<mac address='00:16:3e:23:9e:eb'/>
|
||||
<source bridge='xenbr0'/>
|
||||
<script path='vif-bridge'/>
|
||||
</interface>
|
||||
<graphics type='vnc' port='-1' keymap='en-us'/>
|
||||
<console/>
|
||||
</devices>
|
||||
</domain>
|
||||
|
@ -131,6 +131,13 @@ static int testCompareDiskBlock(const void *data ATTRIBUTE_UNUSED) {
|
||||
2);
|
||||
}
|
||||
|
||||
static int testCompareDiskShareable(const void *data ATTRIBUTE_UNUSED) {
|
||||
return testCompareFiles("xml2sexprdata/xml2sexpr-disk-block-shareable.xml",
|
||||
"xml2sexprdata/xml2sexpr-disk-block-shareable.sexpr",
|
||||
"pvtest",
|
||||
2);
|
||||
}
|
||||
|
||||
static int testCompareDiskDrvLoop(const void *data ATTRIBUTE_UNUSED) {
|
||||
return testCompareFiles("xml2sexprdata/xml2sexpr-disk-drv-loop.xml",
|
||||
"xml2sexprdata/xml2sexpr-disk-drv-loop.sexpr",
|
||||
@ -233,8 +240,11 @@ main(int argc, char **argv)
|
||||
progname = argv[0];
|
||||
|
||||
abs_top_srcdir = getenv("abs_top_srcdir");
|
||||
if (!abs_top_srcdir)
|
||||
return 1;
|
||||
if (!abs_top_srcdir) {
|
||||
fprintf(stderr, "missing enviroment variable abs_top_srcdir\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
if (argc > 1) {
|
||||
fprintf(stderr, "Usage: %s\n", progname);
|
||||
@ -281,6 +291,10 @@ main(int argc, char **argv)
|
||||
1, testCompareDiskBlock, NULL) != 0)
|
||||
ret = -1;
|
||||
|
||||
if (virtTestRun("XML-2-SEXPR Disk Shareable",
|
||||
1, testCompareDiskShareable, NULL) != 0)
|
||||
ret = -1;
|
||||
|
||||
if (virtTestRun("XML-2-SEXPR Disk Drv Loop",
|
||||
1, testCompareDiskDrvLoop, NULL) != 0)
|
||||
ret = -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user