Add tests for Xen's blktap2 implementation

xml2sexpr and sexpr2xml tests for blktap2
This commit is contained in:
Jim Fehlig 2010-08-24 15:49:00 -06:00 committed by Eric Blake
parent 2b3109e2bd
commit 14515a728d
8 changed files with 79 additions and 0 deletions

View File

@ -0,0 +1 @@
(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 ')))(device (tap2 (dev 'xvda')(uname 'tap2:aio:/root/some.img')(mode 'w'))))

View File

@ -0,0 +1,27 @@
<domain type='xen' id='6'>
<name>pvtest</name>
<uuid>596a5d21-71f4-8fb2-e068-e2386a5c413e</uuid>
<memory>430080</memory>
<currentMemory>430080</currentMemory>
<vcpu>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_64/os </cmdline>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='tap2' type='aio'/>
<source file='/root/some.img'/>
<target dev='xvda' bus='xen'/>
</disk>
<console type='pty'>
<target type='xen' port='0'/>
</console>
</devices>
</domain>

View File

@ -138,6 +138,7 @@ mymain(int argc, char **argv)
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);

View File

@ -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 '/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 ')))(device (tap2 (dev 'xvda')(uname 'tap2:aio:/root/some.img')(mode 'w'))))

View File

@ -0,0 +1,23 @@
<domain type='xen' id='15'>
<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_64/os </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='file' device='disk'>
<driver name="tap2" type="aio"/>
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
<console tty='/dev/pts/4'/>
</devices>
</domain>

View File

@ -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 '/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 ')))(device (tap2 (dev 'xvda')(uname 'tap2:aio:/root/some.img')(mode 'w'))))

View File

@ -0,0 +1,23 @@
<domain type='xen' id='15'>
<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_64/os </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='file' device='disk'>
<driver name="tap2"/>
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
<console tty='/dev/pts/4'/>
</devices>
</domain>

View File

@ -127,6 +127,8 @@ mymain(int argc, char **argv)
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("curmem", "curmem", "rhel5", 2);
DO_TEST("net-routed", "net-routed", "pvtest", 2);