]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
cputune: New tests for cputune XML
authorOsier Yang <jyang@redhat.com>
Tue, 29 Mar 2011 13:44:14 +0000 (21:44 +0800)
committerOsier Yang <jyang@redhat.com>
Tue, 29 Mar 2011 14:13:46 +0000 (22:13 +0800)
v1 - v2:
  * Add missed tests/qemuxml2argvdata/qemuxml2argv-cputune.args

tests/qemuxml2argvdata/qemuxml2argv-cputune.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-cputune.xml [new file with mode: 0644]
tests/qemuxml2argvtest.c
tests/qemuxml2xmltest.c

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cputune.args b/tests/qemuxml2argvdata/qemuxml2argv-cputune.args
new file mode 100644 (file)
index 0000000..c41cec0
--- /dev/null
@@ -0,0 +1,4 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M \
+pc -m 214 -smp 2 -name QEMUGuest1 -nographic \
+-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \
+-hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cputune.xml b/tests/qemuxml2argvdata/qemuxml2argv-cputune.xml
new file mode 100644 (file)
index 0000000..0afbadb
--- /dev/null
@@ -0,0 +1,30 @@
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
+  <vcpu>2</vcpu>
+  <cputune>
+    <shares>2048</shares>
+    <vcpupin vcpu='0' cpuset='0'/>
+    <vcpupin vcpu='1' cpuset='1'/>
+  </cputune>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' unit='0'/>
+    </disk>
+    <controller type='ide' index='0'/>
+    <memballoon model='virtio'/>
+  </devices>
+</domain>
index 02de8de1a61140844121295c55c9b8a60d26cea8..c06bdf6c907c04a11c4e14624408e31120c13691 100644 (file)
@@ -494,6 +494,7 @@ mymain(int argc, char **argv)
 
     DO_TEST("memtune", false, QEMU_CAPS_NAME);
     DO_TEST("blkiotune", false, QEMU_CAPS_NAME);
+    DO_TEST("cputune", false, QEMU_CAPS_NAME);
 
     free(driver.stateDir);
     virCapabilitiesFree(driver.caps);
index c0c36ad5d6e9ed4b2b2b7e483f4b88826317c632..b86dbee5f28584dce57192096f0c06fb1b9bfe58 100644 (file)
@@ -185,6 +185,7 @@ mymain(int argc, char **argv)
     DO_TEST("encrypted-disk");
     DO_TEST("memtune");
     DO_TEST("blkiotune");
+    DO_TEST("cputune");
 
     DO_TEST("smp");