libvirt/tests/qemuxml2argvdata/pseries-features-htm.xml

15 lines
334 B
XML
Raw Normal View History

tests: refactor pseries features parse failure tests The qemuxml2argvtest pseries-feature parse failure tests uses a symlink to the pseries-features.xml test domain and control which feature it is supposed to fail by excluding it from the capabilities list. The advantage of this approach is that the same XML can be used in multiple tests. One downside is that any new pseries capability must be declared in all existent tests, otherwise all other tests can break if this new capability happens to be validated early in qemu_validate.c. Any new parse_error test must declare all other existent capabilities. Another downside is the fact that we're testing fairly improbable scenarios: all pseries capabilities being tested here were introduced by the same QEMU version, 4.2.0, at least as far as libvirt is aware of. This means that it's no possible to have a scenario where, for example, ccf-assist is not present but cfpc is. And last, but not the least, it's getting in the way of our effort to convert all pseries tests to not use explicit capabilities. Changing all these tests to use DO_TEST_PARSE_ERROR_NOCAPS() will allow us to test exactly what we want to test, which is the parse error given for each feature if the binary does not have support for it. The XML being used for each test can be simplified to just declare a single feature. In the end we'll end up with more XML lines, but less complexity inside qemuxml2argvtest.c. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2022-09-15 16:22:08 +00:00
<domain type='qemu'>
<name>guest</name>
<uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
<memory unit='KiB'>524288</memory>
<os>
<type arch='ppc64' machine='pseries'>hvm</type>
</os>
<features>
<htm state='on'/>
</features>
<devices>
<emulator>/usr/bin/qemu-system-ppc64</emulator>
</devices>
</domain>