[virt-tools-list] [PATCH virt-manager 10/14] tests: cli: Add boot.order tests

Marc Hartmayer mhartmay at linux.ibm.com
Tue Feb 26 09:56:40 UTC 2019


Signed-off-by: Marc Hartmayer <mhartmay at linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy at linux.ibm.com>
---
 .../virt-xml-edit-select-disk-bootorder.xml   | 19 +++++++++++++++++++
 .../virt-xml-edit-select-disk-bootorder2.xml  | 18 ++++++++++++++++++
 tests/clitest.py                              |  4 ++++
 3 files changed, 41 insertions(+)
 create mode 100644 tests/cli-test-xml/compare/virt-xml-edit-select-disk-bootorder.xml
 create mode 100644 tests/cli-test-xml/compare/virt-xml-edit-select-disk-bootorder2.xml

diff --git a/tests/cli-test-xml/compare/virt-xml-edit-select-disk-bootorder.xml b/tests/cli-test-xml/compare/virt-xml-edit-select-disk-bootorder.xml
new file mode 100644
index 000000000000..60114b99b603
--- /dev/null
+++ b/tests/cli-test-xml/compare/virt-xml-edit-select-disk-bootorder.xml
@@ -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.
\ No newline at end of file
diff --git a/tests/cli-test-xml/compare/virt-xml-edit-select-disk-bootorder2.xml b/tests/cli-test-xml/compare/virt-xml-edit-select-disk-bootorder2.xml
new file mode 100644
index 000000000000..0c35cd141e4a
--- /dev/null
+++ b/tests/cli-test-xml/compare/virt-xml-edit-select-disk-bootorder2.xml
@@ -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.
\ No newline at end of file
diff --git a/tests/clitest.py b/tests/clitest.py
index abfca031ace0..b3a0ed77ba97 100644
--- a/tests/clitest.py
+++ b/tests/clitest.py
@@ -966,6 +966,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 /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 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.add_invalid("--edit --memory 200,clearxml=yes")  # clear isn't wired up for memory
-- 
2.17.0




More information about the virt-tools-list mailing list