tests: Create a smaller testsuite.xml

Right now, most test cases will create a libvirt test driver using
tests/testdriver.xml. This is problematic for 2 reasons:

1) testdriver.xml is 3500 lines of XML, and it's parsed hundreds of
   times. Opening it is responsible for about 25% of test suite time
2) Older libvirt chokes on testdriver.xml, meaning the test suite will
   be useless there. This is a recurring problem as new features are
   added to testdriver.xml

Most test cases don't actually need all the test state in testdriver.xml
though. So this creates a smaller testsuite.xml which has a lower
libvirt requirement and is much quicker to parse. New XML bits should
continue to go into testdriver.xml so we can keep testsuite.xml as
the more stripped down option.
This commit is contained in:
Cole Robinson
2018-02-20 15:00:46 -05:00
parent 47afa912b3
commit 62fecb09d3
6 changed files with 582 additions and 243 deletions

View File

@@ -54,214 +54,6 @@
</os>
</domain>
<domain type='test'>
<name>test-for-virtxml</name>
<currentMemory>204800</currentMemory>
<memory>409600</memory>
<blkiotune>
<weight>100</weight>
<device>
<path>/dev/sdd</path>
<weight>200</weight>
</device>
</blkiotune>
<memoryBacking>
<hugepages/>
</memoryBacking>
<uuid>12345678-12F4-1234-1234-123456789012</uuid>
<os>
<type arch='i686'>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
</os>
<idmap>
<uid start='0' target='1000' count='10'/>
<gid start='0' target='1000' count='10'/>
</idmap>
<description>Test VM for virtxml cli tests
</description>
<features>
<acpi/>
<apic eoi='off'/>
<hyperv>
<relaxed state='on'/>
<vapic state='on'/>
<spinlocks state='on' retries='12287'/>
</hyperv>
</features>
<clock offset="utc">
<timer name="rtc" tickpolicy="catchup"/>
<timer name="pit" tickpolicy="delay"/>
<timer name="hpet" present="no"/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<vcpu cpuset="1,2,5-9,11,13-14">9</vcpu>
<numatune>
<memory mode='interleave' placement='auto'/>
</numatune>
<cpu match="exact">
<model>core2duo</model>
<vendor>Intel</vendor>
<feature policy="require" name="pbe"/>
<feature policy="require" name="tm2"/>
<feature policy="require" name="est"/>
<feature policy="require" name="ss"/>
<feature policy="require" name="ht"/>
<feature policy="require" name="ds"/>
<feature policy="require" name="lahf_lm"/>
<feature policy="require" name="tm"/>
<feature policy="require" name="cx16"/>
<feature policy="require" name="vmx"/>
<feature policy="require" name="ds_cpl"/>
<feature policy="require" name="xtpr"/>
<feature policy="require" name="acpi"/>
<numa>
<cell id='0' cpus='0' memory='1048576' unit='KiB'/>
<cell id='1' cpus='1' memory='1048576' unit='KiB'/>
<cell id='2' cpus='2' memory='1048576' unit='KiB'/>
<cell id='3' cpus='3' memory='1048576' unit='KiB'/>
</numa>
</cpu>
<pm>
<suspend-to-mem enabled='no'/>
</pm>
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
<disk type='block' device='floppy'>
<source dev='/dev/null'/>
<target dev='fda' bus='fdc'/>
<boot order='5'/>
</disk>
<disk type='file' device='disk'>
<source file='/tmp/foobar'/>
<target dev='hda' bus='ide'/>
<iotune>
<read_bytes_sec>5242880</read_bytes_sec>
<total_iops_sec>50</total_iops_sec>
</iotune>
</disk>
<disk type='file' device='disk'>
<driver name="qemu" type="qcow2" cache="none"/>
<source file='/tmp/foobar2'>
<seclabel model='dac' relabel='no'/>
</source>
<target dev='sda' bus='scsi'/>
<boot order='1'/>
<address type='drive' controller='9'/>
<shareable/>
</disk>
<controller type='scsi' index='9' model='virtio-scsi'/>
<controller type='usb'/>
<interface type='network'>
<source network='default'/>
<mac address='22:22:33:54:32:10'/>
<model type='e1000'/>
</interface>
<interface type='bridge'>
<source bridge='br0'/>
<mac address='22:00:00:44:AA:BF'/>
<model type='e1000'/>
</interface>
<interface type='ethernet'>
<mac address='00:11:7f:33:44:55'/>
<script path='/etc/qemu-ifup'/>
<target dev='nic02'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' display=':3.4' xauth='/testdir/.Xauthority' fullscreen='yes'/>
<sound model='sb16'/>
<sound model='es1370'/>
<sound model='ich6'/>
<video>
<model type='vmvga'/>
</video>
<video>
<model type='cirrus' vram='10240' heads='3'/>
</video>
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x04b3'/>
<product id='0x4485'/>
</source>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address bus='0x00' slot='0x19' function="0x0"/>
</source>
<rom bar='off'/>
</hostdev>
<serial type='null'/>
<parallel type='file'>
<source path='/tmp/foo.log'/>
</parallel>
<console type='null'>
<target type='serial'/>
</console>
<console type='pty'>
<target type='virtio'/>
</console>
<channel type='pipe'>
<source path='/tmp/guestfwd'/>
<target type='guestfwd' address='10.0.2.1' port='4600'/>
</channel>
<watchdog model='ib700' action='poweroff'/>
<smartcard mode='host'>
<address type='ccid' controller='0' slot='0'/>
</smartcard>
<redirdev bus='usb' type='tcp'>
<source mode='connect' host='localhost' service='4000'/>
<protocol type='raw'/>
</redirdev>
<filesystem>
<driver type='handle'/>
<source dir='/foo/bar'/>
<target dir='/bar/baz'/>
</filesystem>
<tpm model='tpm-tis'>
<backend type='passthrough'>
<device path='/dev/tzz'/>
</backend>
</tpm>
<rng model='virtio'>
<rate period='2000' bytes='1234'/>
<backend model='egd' type='tcp'>
<source mode='connect' host='1.2.3.4' service='1234'/>
</backend>
</rng>
<panic>
<address type='isa' iobase='0x505'/>
</panic>
<memballoon model='virtio'/>
</devices>
<seclabel model='selinux' type='dynamic'/>
</domain>
<domain type='test'>
<name>test-many-devices</name>
<currentMemory>204800</currentMemory>