tests: clitest: Slim down virt-xml --os-variant tests

There's some redundancy here, and let's not depend on test-many-devices
which causes a lot of test suite churn
This commit is contained in:
Cole Robinson 2019-01-08 12:24:50 -05:00
parent 91dd6739c6
commit 2a88d3a1af
7 changed files with 39 additions and 79 deletions

View File

@ -1,13 +0,0 @@
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
+ <disk type="file" device="disk">
+ <driver name="qemu" type="qcow2"/>
+ <source file="/dev/default-pool/testvol1.img"/>
+ <target dev="hda" bus="ide"/>
+ </disk>
</devices>
</domain>
Domain 'test' defined successfully.
Changes will take effect after the domain is fully powered off.

View File

@ -1,23 +1,18 @@
</description>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
- <libosinfo:os id="http://fedoraproject.org/fedora/unknown"/>
+ <libosinfo:os id="http://microsoft.com/win/me"/>
</libosinfo:libosinfo>
</metadata>
<memory unit="KiB">409600</memory>
@@
<vsock model="virtio">
<cid auto="no" address="5"/>
</vsock>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
+ <disk type="file" device="disk">
+ <driver name="qemu" type="qcow2"/>
+ <source file="/dev/default-pool/testvol1.img"/>
+ <target dev="hdd" bus="ide"/>
+ <target dev="vda" bus="virtio"/>
+ </disk>
</devices>
<seclabel type="dynamic" model="selinux" relabel="yes"/>
<seclabel type="static" model="dac" relabel="yes">
+ <metadata>
+ <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
+ <libosinfo:os id="http://fedoraproject.org/fedora/28"/>
+ </libosinfo:libosinfo>
+ </metadata>
</domain>
Domain 'test-many-devices' defined successfully.
Domain 'test' defined successfully.
Changes will take effect after the domain is fully powered off.

View File

@ -1,14 +1,13 @@
<vsock model="virtio">
<cid auto="no" address="5"/>
</vsock>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
+ <disk type="file" device="disk">
+ <driver name="qemu" type="qcow2"/>
+ <source file="/dev/default-pool/testvol1.img"/>
+ <target dev="vdaf" bus="virtio"/>
+ <target dev="hda" bus="ide"/>
+ </disk>
</devices>
<seclabel type="dynamic" model="selinux" relabel="yes"/>
<seclabel type="static" model="dac" relabel="yes">
</domain>
Domain 'test-many-devices' defined successfully.
Domain 'test' defined successfully.
Changes will take effect after the domain is fully powered off.

View File

@ -1,13 +0,0 @@
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
+ <interface type="bridge">
+ <source bridge="eth0"/>
+ <mac address="00:11:22:33:44:55"/>
+ <model type="e1000"/>
+ </interface>
</devices>
</domain>
Domain 'test' defined successfully.
Changes will take effect after the domain is fully powered off.

View File

@ -1,23 +1,18 @@
</description>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
- <libosinfo:os id="http://fedoraproject.org/fedora/unknown"/>
+ <libosinfo:os id="http://microsoft.com/win/me"/>
</libosinfo:libosinfo>
</metadata>
<memory unit="KiB">409600</memory>
@@
<vsock model="virtio">
<cid auto="no" address="5"/>
</vsock>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
+ <interface type="bridge">
+ <source bridge="eth0"/>
+ <mac address="00:11:22:33:44:55"/>
+ <model type="e1000"/>
+ <model type="virtio"/>
+ </interface>
</devices>
<seclabel type="dynamic" model="selinux" relabel="yes"/>
<seclabel type="static" model="dac" relabel="yes">
+ <metadata>
+ <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
+ <libosinfo:os id="http://fedoraproject.org/fedora/28"/>
+ </libosinfo:libosinfo>
+ </metadata>
</domain>
Domain 'test-many-devices' defined successfully.
Domain 'test' defined successfully.
Changes will take effect after the domain is fully powered off.

View File

@ -1,14 +1,13 @@
<vsock model="virtio">
<cid auto="no" address="5"/>
</vsock>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
+ <interface type="bridge">
+ <source bridge="eth0"/>
+ <mac address="00:11:22:33:44:55"/>
+ <model type="virtio"/>
+ <model type="e1000"/>
+ </interface>
</devices>
<seclabel type="dynamic" model="selinux" relabel="yes"/>
<seclabel type="static" model="dac" relabel="yes">
</domain>
Domain 'test-many-devices' defined successfully.
Domain 'test' defined successfully.
Changes will take effect after the domain is fully powered off.

View File

@ -973,13 +973,11 @@ c.add_compare("--remove-device --disk /dev/null", "remove-disk-path")
c.add_compare("--remove-device --video all", "remove-video-all", check_version="1.3.3") # check_version=video primary= attribute
c.add_compare("--remove-device --host-device 0x04b3:0x4485", "remove-hostdev-name", check_version="1.2.11") # check_version=video ram output change
c = vixml.add_category("add/rm devices (KVM)", "--connect %(URI-KVM)s --print-diff --define")
c.add_compare("test --add-device --disk %(EXISTIMG1)s", "kvm-add-disk-default") # Guest OS is not known
c.add_compare("test-many-devices --add-device --disk %(EXISTIMG1)s", "kvm-add-disk-os-from-xml") # Guest OS information taken from the guest XML
c.add_compare("test-many-devices --add-device --disk %(EXISTIMG1)s --os-variant winme", "kvm-add-disk-os-from-cmdline") # Guest OS information provided on the command line
c.add_compare("test --add-device --network default", "kvm-add-network-default") # Guest OS is not known
c.add_compare("test-many-devices --add-device --network default", "kvm-add-network-os-from-xml") # Guest OS information taken from the guest XML
c.add_compare("test-many-devices --add-device --network default --os-variant winme", "kvm-add-network-os-from-cmdline") # Guest OS information provided on the command line
c = vixml.add_category("add/rm devices OS KVM", "--connect %(URI-KVM)s test --print-diff --define")
c.add_compare("--add-device --disk %(EXISTIMG1)s", "kvm-add-disk-os-from-xml") # Guest OS (none) from XML
c.add_compare("--add-device --disk %(EXISTIMG1)s --os-variant fedora28", "kvm-add-disk-os-from-cmdline") # Guest OS (fedora) provided on command line
c.add_compare("--add-device --network default", "kvm-add-network-os-from-xml") # Guest OS information taken from the guest XML
c.add_compare("--add-device --network default --os-variant fedora28", "kvm-add-network-os-from-cmdline") # Guest OS information provided on the command line