tests: cli: Add boot.order tests

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
This commit is contained in:
Marc Hartmayer 2019-02-26 10:56:40 +01:00 committed by Cole Robinson
parent b83a0a61a0
commit c896d19d76
3 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,19 @@
<total_iops_sec>50</total_iops_sec>
</iotune>
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
+ <boot order="1"/>
</disk>
<disk type="file" device="disk">
<driver name="qemu" type="qcow2" cache="none"/>
@@
</source>
<target dev="sda" bus="scsi"/>
<shareable/>
- <boot order="1"/>
+ <boot order="2"/>
<address type="drive" controller="9" bus="0" target="0" unit="0"/>
</disk>
<controller type="scsi" index="0"/>
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the domain is fully powered off.

View File

@ -0,0 +1,18 @@
<os>
<type arch="i686">hvm</type>
<loader type="rom">/usr/lib/xen/boot/hvmloader</loader>
- <boot dev="hd"/>
</os>
<features>
<acpi/>
@@
<source file="/dev/default-pool/collidevol1.img"/>
<target dev="hda" bus="ide"/>
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
+ <boot order="1"/>
</disk>
<controller type="ide" index="0"/>
<interface type="user">
Domain 'test-collide' defined successfully.
Changes will take effect after the domain is fully powered off.

View File

@ -965,6 +965,10 @@ c.add_compare("--edit ich6 --sound pcspk", "edit-select-sound-model", check_vers
c.add_compare("--edit target=hda --disk /dev/null", "edit-select-disk-target") c.add_compare("--edit target=hda --disk /dev/null", "edit-select-disk-target")
c.add_compare("--edit /tmp/foobar2 --disk shareable=off,readonly=on", "edit-select-disk-path") c.add_compare("--edit /tmp/foobar2 --disk shareable=off,readonly=on", "edit-select-disk-path")
c.add_compare("--edit mac=00:11:7f:33:44:55 --network target=nic55", "edit-select-network-mac") c.add_compare("--edit mac=00:11:7f:33:44:55 --network target=nic55", "edit-select-network-mac")
c.add_compare("--edit target=hda --disk boot_order=1", "edit-select-disk-bootorder")
c = vixml.add_category("edit selection 2", "test-collide --print-diff --define")
c.add_compare("--edit target=hda --disk boot_order=1", "edit-select-disk-bootorder2")
c = vixml.add_category("edit clear", "test-for-virtxml --print-diff --define") c = vixml.add_category("edit clear", "test-for-virtxml --print-diff --define")
c.add_invalid("--edit --memory 200,clearxml=yes") # clear isn't wired up for memory c.add_invalid("--edit --memory 200,clearxml=yes") # clear isn't wired up for memory