Add and fix test cases for cpu mode attribute

This patch adds and fixes test cases for cpu mode attribute.

Signed-off-by: Ken ICHIKAWA <ichikawa.ken@jp.fujitsu.com>
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>

(crobinso: Minor rebase tweaks)
This commit is contained in:
Hu Tao
2013-04-11 13:45:46 +08:00
committed by Cole Robinson
parent 2a72d50477
commit ee7168e6f9
9 changed files with 63 additions and 9 deletions

View File

@@ -0,0 +1,19 @@
<domain type="kvm">
<name>TestGuest</name>
<currentMemory>204800</currentMemory>
<memory>409600</memory>
<uuid>12345678-1234-1234-1234-123456789012</uuid>
<os>
<type arch="i686">hvm</type>
<boot dev="hd"/>
</os>
<vcpu cpuset="1-3">4</vcpu>
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
<disk type="block" device="cdrom">
<target dev="hdc" bus="ide"/>
<readonly/>
</disk>
</devices>
<cpu mode="host-passthrough"/>
</domain>

View File

@@ -0,0 +1,21 @@
<domain type="kvm">
<name>TestGuest</name>
<currentMemory>204800</currentMemory>
<memory>409600</memory>
<uuid>12345678-1234-1234-1234-123456789012</uuid>
<os>
<type arch="i686">hvm</type>
<boot dev="hd"/>
</os>
<vcpu cpuset="1-3">4</vcpu>
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
<disk type="block" device="cdrom">
<target dev="hdc" bus="ide"/>
<readonly/>
</disk>
</devices>
<cpu mode="custom" match="exact">
<model>qemu64</model>
</cpu>
</domain>

View File

@@ -16,7 +16,7 @@
<numatune>
<memory nodeset="2,4,6"/>
</numatune>
<cpu match="strict">
<cpu match="strict" mode="custom">
<model>qemu64</model>
<vendor>qemuvendor</vendor>
<topology sockets="4" cores="3" threads="1"/>

View File

@@ -22,7 +22,7 @@
<seclabel model="testSecurity" type="static">
<label>frob</label>
</seclabel>
<cpu match="exact">
<cpu mode="custom" match="exact">
<model>foobar</model>
<topology cores="4" sockets="1" threads="1"/>
<feature policy="forbid" name="x2apic"/>