mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-10-26 17:25:22 +03:00
test: add more test cases for option --blkiotune
Add additional test cases for option --blkiotune. Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
This commit is contained in:
parent
dbfa8166b1
commit
5a097183a9
@ -7,6 +7,13 @@
|
||||
<numatune>
|
||||
<memory mode="preferred" nodeset="1-3,5"/>
|
||||
</numatune>
|
||||
<blkiotune>
|
||||
<weight>200</weight>
|
||||
<device>
|
||||
<path>/dev/sdc</path>
|
||||
<weight>300</weight>
|
||||
</device>
|
||||
</blkiotune>
|
||||
<os>
|
||||
<type arch="i686">hvm</type>
|
||||
<loader>/foo/bar</loader>
|
||||
@ -131,6 +138,13 @@
|
||||
<numatune>
|
||||
<memory mode="preferred" nodeset="1-3,5"/>
|
||||
</numatune>
|
||||
<blkiotune>
|
||||
<weight>200</weight>
|
||||
<device>
|
||||
<path>/dev/sdc</path>
|
||||
<weight>300</weight>
|
||||
</device>
|
||||
</blkiotune>
|
||||
<os>
|
||||
<type arch="i686">hvm</type>
|
||||
<loader>/foo/bar</loader>
|
||||
|
7
tests/cli-test-xml/compare/virtxml-build-blkiotune.xml
Normal file
7
tests/cli-test-xml/compare/virtxml-build-blkiotune.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<blkiotune>
|
||||
<weight>100</weight>
|
||||
<device>
|
||||
<path>/dev/sdf</path>
|
||||
<weight>200</weight>
|
||||
</device>
|
||||
</blkiotune>
|
@ -9,7 +9,7 @@
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>restart</on_crash>
|
||||
@@ -314,4 +309,5 @@
|
||||
@@ -321,4 +316,5 @@
|
||||
<address type="isa" iobase="0x505"/>
|
||||
</panic>
|
||||
</devices>
|
||||
|
@ -21,7 +21,7 @@
|
||||
<clock offset="utc">
|
||||
<timer name="rtc" tickpolicy="catchup"/>
|
||||
<timer name="pit" tickpolicy="delay"/>
|
||||
@@ -314,4 +297,5 @@
|
||||
@@ -321,4 +304,5 @@
|
||||
<address type="isa" iobase="0x505"/>
|
||||
</panic>
|
||||
</devices>
|
||||
|
16
tests/cli-test-xml/compare/virtxml-edit-simple-blkiotune.xml
Normal file
16
tests/cli-test-xml/compare/virtxml-edit-simple-blkiotune.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<memory unit="KiB">409600</memory>
|
||||
<currentMemory unit="KiB">204800</currentMemory>
|
||||
<blkiotune>
|
||||
- <weight>100</weight>
|
||||
+ <weight>500</weight>
|
||||
<device>
|
||||
- <path>/dev/sdd</path>
|
||||
- <weight>200</weight>
|
||||
+ <path>/dev/sdf</path>
|
||||
+ <weight>600</weight>
|
||||
</device>
|
||||
</blkiotune>
|
||||
<memoryBacking>
|
||||
|
||||
Domain 'test-many-devices' defined successfully.
|
||||
Changes will take effect after the next domain shutdown.
|
@ -9,7 +9,7 @@
|
||||
<feature policy="require" name="tm2"/>
|
||||
<feature policy="require" name="est"/>
|
||||
<feature policy="require" name="ss"/>
|
||||
@@ -43,6 +43,7 @@
|
||||
@@ -50,6 +50,7 @@
|
||||
<feature policy="require" name="ds_cpl"/>
|
||||
<feature policy="require" name="xtpr"/>
|
||||
<feature policy="require" name="acpi"/>
|
||||
|
@ -5,6 +5,12 @@
|
||||
- <currentMemory unit="KiB">204800</currentMemory>
|
||||
+ <memory unit="KiB">1024000</memory>
|
||||
+ <currentMemory unit="KiB">512000</currentMemory>
|
||||
<blkiotune>
|
||||
<weight>100</weight>
|
||||
<device>
|
||||
@@ -14,7 +14,6 @@
|
||||
</device>
|
||||
</blkiotune>
|
||||
<memoryBacking>
|
||||
- <hugepages/>
|
||||
</memoryBacking>
|
||||
|
@ -11,8 +11,8 @@
|
||||
+very,very=new desc'</description>
|
||||
<memory unit="KiB">409600</memory>
|
||||
<currentMemory unit="KiB">204800</currentMemory>
|
||||
<memoryBacking>
|
||||
@@ -314,4 +314,5 @@
|
||||
<blkiotune>
|
||||
@@ -321,4 +321,5 @@
|
||||
<address type="isa" iobase="0x505"/>
|
||||
</panic>
|
||||
</devices>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<numatune>
|
||||
<memory mode="interleave" placement="auto"/>
|
||||
</numatune>
|
||||
@@ -43,6 +43,7 @@
|
||||
@@ -50,6 +50,7 @@
|
||||
<feature policy="require" name="ds_cpl"/>
|
||||
<feature policy="require" name="xtpr"/>
|
||||
<feature policy="require" name="acpi"/>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<disk type="dir" device="floppy">
|
||||
<source dir="/tmp"/>
|
||||
<target dev="fdb" bus="fdc"/>
|
||||
@@ -81,12 +76,6 @@
|
||||
@@ -88,12 +83,6 @@
|
||||
<target dev="hdb" bus="ide"/>
|
||||
<readonly/>
|
||||
<address type="drive" controller="0" bus="0" target="0" unit="1"/>
|
||||
|
@ -560,6 +560,7 @@ c.add_compare("""--hvm --pxe \
|
||||
--panic default \
|
||||
--security type=static,label='system_u:object_r:svirt_image_t:s0:c100,c200',relabel=yes \
|
||||
--numatune \\"1-3,5\\",mode=preferred \
|
||||
--blkiotune weight=200,device_path=/dev/sdc,device_weight=300 \
|
||||
--boot loader=/foo/bar \
|
||||
--host-device net_00_1c_25_10_b1_e4 \
|
||||
--features acpi=off,eoi=on,privnet=on,hyperv_spinlocks=on,hyperv_spinlocks_retries=1234 \
|
||||
@ -788,6 +789,7 @@ c.add_compare("test --print-xml --edit --vcpus 7", "virtxml-print-xml") # test
|
||||
c.add_compare("--edit --cpu host-passthrough", "virtxml-stdin-edit", input_file=(xmldir + "/virtxml-stdin-edit.xml")) # stdin test
|
||||
c.add_compare("--build-xml --cpu pentium3,+x2apic", "virtxml-build-cpu")
|
||||
c.add_compare("--build-xml --tpm /dev/tpm", "virtxml-build-tpm")
|
||||
c.add_compare("--build-xml --blkiotune weight=100,device_path=/dev/sdf,device_weight=200", "virtxml-build-blkiotune")
|
||||
|
||||
|
||||
c = vixml.add_category("simple edit diff", "test-many-devices --edit --print-diff --define", compare_check=support.SUPPORT_CONN_PANIC_DEVICE)
|
||||
@ -798,6 +800,7 @@ c.add_compare("--memory 500,maxmemory=1000,hugepages=off", "virtxml-edit-simple-
|
||||
c.add_compare("--vcpus 10,maxvcpus=20,cores=5,sockets=4,threads=1", "virtxml-edit-simple-vcpus")
|
||||
c.add_compare("--cpu model=pentium2,+x2apic,forbid=pbe", "virtxml-edit-simple-cpu")
|
||||
c.add_compare("--numatune 1-5,7,mode=strict", "virtxml-edit-simple-numatune")
|
||||
c.add_compare("--blkiotune weight=500,device_path=/dev/sdf,device_weight=600", "virtxml-edit-simple-blkiotune")
|
||||
c.add_compare("--boot loader=foo.bar,network,useserial=on,init=/bin/bash", "virtxml-edit-simple-boot")
|
||||
c.add_compare("--security label=foo,bar,baz,UNKNOWN=val,relabel=on", "virtxml-edit-simple-security")
|
||||
c.add_compare("--features eoi=on,hyperv_relaxed=off,acpi=", "virtxml-edit-simple-features")
|
||||
|
@ -58,6 +58,13 @@
|
||||
<name>test-many-devices</name>
|
||||
<currentMemory>204800</currentMemory>
|
||||
<memory>409600</memory>
|
||||
<blkiotune>
|
||||
<weight>100</weight>
|
||||
<device>
|
||||
<path>/dev/sdd</path>
|
||||
<weight>200</weight>
|
||||
</device>
|
||||
</blkiotune>
|
||||
<memoryBacking>
|
||||
<hugepages/>
|
||||
</memoryBacking>
|
||||
|
@ -1887,6 +1887,8 @@ class ParserPanic(VirtCLIParser):
|
||||
|
||||
class ParserBlkiotune(VirtCLIParser):
|
||||
def _init_params(self):
|
||||
self.clear_attr = "blkiotune"
|
||||
|
||||
self.set_param("blkiotune.weight", "weight")
|
||||
self.set_param("blkiotune.device_path", "device_path")
|
||||
self.set_param("blkiotune.device_weight", "device_weight")
|
||||
|
Loading…
Reference in New Issue
Block a user