[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] Tests for Xen 4.0 blktap2



Tests for blktap2, pending ACK of blktap2 patch for xend driver
discussed here

https://www.redhat.com/archives/libvir-list/2010-August/msg00636.html

Regards,
Jim

>From c190013be39bf28da3e14225dacf777c75f4175a Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig novell com>
Date: Tue, 24 Aug 2010 15:39:29 -0600
Subject: [PATCH] Add tests for Xen's blktap2 implementation

xml2sexpr and sexpr2xml tests for blktap2
---
 .../sexpr2xml-disk-drv-blktap2-raw.sexpr           |    1 +
 .../sexpr2xml-disk-drv-blktap2-raw.xml             |   27 ++++++++++++++++++++
 tests/sexpr2xmltest.c                              |    1 +
 .../xml2sexpr-disk-drv-blktap2-raw.sexpr           |    1 +
 .../xml2sexpr-disk-drv-blktap2-raw.xml             |   23 +++++++++++++++++
 .../xml2sexprdata/xml2sexpr-disk-drv-blktap2.sexpr |    1 +
 tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.xml |   23 +++++++++++++++++
 tests/xml2sexprtest.c                              |    2 +
 8 files changed, 79 insertions(+), 0 deletions(-)
 create mode 100644 tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.sexpr
 create mode 100644 tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.xml
 create mode 100644 tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2-raw.sexpr
 create mode 100644 tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2-raw.xml
 create mode 100644 tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.sexpr
 create mode 100644 tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.xml

diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.sexpr b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.sexpr
new file mode 100644
index 0000000..79bc9b1
--- /dev/null
+++ b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.sexpr
@@ -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'))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.xml b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.xml
new file mode 100644
index 0000000..c6951de
--- /dev/null
+++ b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.xml
@@ -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>
diff --git a/tests/sexpr2xmltest.c b/tests/sexpr2xmltest.c
index 297c30e..8c75c52 100644
--- a/tests/sexpr2xmltest.c
+++ b/tests/sexpr2xmltest.c
@@ -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);
diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2-raw.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2-raw.sexpr
new file mode 100644
index 0000000..0293cc6
--- /dev/null
+++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2-raw.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 '/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'))))
\ No newline at end of file
diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2-raw.xml b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2-raw.xml
new file mode 100644
index 0000000..0cc37cc
--- /dev/null
+++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2-raw.xml
@@ -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>
diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.sexpr
new file mode 100644
index 0000000..0293cc6
--- /dev/null
+++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.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 '/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'))))
\ No newline at end of file
diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.xml b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.xml
new file mode 100644
index 0000000..67cce17
--- /dev/null
+++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.xml
@@ -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>
diff --git a/tests/xml2sexprtest.c b/tests/xml2sexprtest.c
index 3adad6b..49b7574 100644
--- a/tests/xml2sexprtest.c
+++ b/tests/xml2sexprtest.c
@@ -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);
-- 
1.6.0.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]