This series:
- cleans up the XML validator code a bit
- adds testing of nodedevxml2xmlout directory
- cleans up some mistakes in un-tested XML files
- adds internal schema and improves testing of
- cputestdata
- simplifies file selection by using a custom schema
- device schemas (e.g. qemuhotplugtest)
After this series the outstanding list of XML files which are not
validated is:
./examples/xml/test/testnodeinline.xml
./examples/xml/test/testnode.xml
./tests/virsh-auth.xml
All of the above should be tested, but there's no schema for them yet.
./src/cpu_map/*.xml
These are internal input-only data files distributed by libvirt.
Creating a schema for them is possible, but not very justified and
neither simple.
./tests/qemumigparamsdata/*.xml
./tests/qemumigrationcookiexmldata/*.xml
Internal input and output files. Writing a schema could theoretically
make sense as they are used for migration but currently doesn't seem to
be worth it.
./tests/qemucapabilitiesdata/*.xml
Internal input and output, for caching only, thus any incompatibility
allows us to simply drop them. Not worth writing schema.
./tests/qemustatusxml2xmldata/*.xml
Internal status XML, input/output. Writing schema might make sense to
avoid regressions and have a scaffold for future.
./tests/networkxml2xmlupdatein/.xml
Snippets of <network> xml, hard to write custom schema for.
./tests/nodedevmdevctldata/*.xml
./tests/virstorageutildata/*.xml
Non-libvirt test data.
Peter Krempa (12):
virschematest: Test 'nodedevxml2xmlout' directory
qemustatusxml2xml: Remove obsolete 'json' attribute
util: xml: Refactor cleanup path in virXMLValidatorInit
util: xml: Refactor cleanup in virXMLValidateAgainstSchema
virschematest: Construct path to the schema in the SCHEMAS_PATH
virschematest: Improve testing schemas in 'tests/cputestdata'
schema: Introduce scaffolding for schema for <privateData> elements
qemublocktestdata: Fix 'block-raw-reservations' case
tests: qemublocktestdata/imagecreate: Remove bogus 'name="vda"'
attribute from <disk>
qemublocktest: Mark 'network-ssh-qcow2' input XML as invalid
schema: Rename definition of disk 'target' element to 'diskTarget'
virschematest: Add infrastructure for testing single devices
src/conf/schemas/domainbackup.rng | 4 +-
src/conf/schemas/domaincheckpoint.rng | 2 +-
src/conf/schemas/domaincommon.rng | 12 ++-
src/conf/schemas/domainsnapshot.rng | 2 +-
src/conf/schemas/privatedata.rng | 30 +++++++
src/util/virxml.c | 23 ++---
tests/meson.build | 1 +
tests/qemublocktest.c | 2 +-
.../imagecreate/luks-encopts.xml | 2 +-
.../imagecreate/luks-noopts.xml | 2 +-
.../imagecreate/network-gluster-qcow2.xml | 2 +-
.../imagecreate/network-rbd-qcow2.xml | 2 +-
...w2.json => network-ssh-qcow2-invalid.json} | 0
...cow2.xml => network-ssh-qcow2-invalid.xml} | 2 +-
.../imagecreate/qcow2-luks-encopts.xml | 2 +-
.../imagecreate/qcow2-luks-noopts.xml | 2 +-
.../imagecreate/qcow2-slice.xml | 2 +-
tests/qemublocktestdata/imagecreate/qcow2.xml | 2 +-
.../qemublocktestdata/imagecreate/raw-nbd.xml | 2 +-
.../imagecreate/raw-slice.xml | 2 +-
tests/qemublocktestdata/imagecreate/raw.xml | 2 +-
.../xml2json/block-raw-reservations.xml | 2 +-
.../migration-out-nbd-in.xml | 2 +-
.../migration-out-nbd-tls-in.xml | 2 +-
tests/qemustatusxml2xmldata/upgrade-in.xml | 2 +-
tests/schemas/cpu-baseline.rng.in | 84 +++++++++++++++++++
tests/schemas/device.rng.in | 51 +++++++++++
tests/schemas/meson.build | 18 ++++
tests/schemas/privatedata.rng.in | 68 +++++++++++++++
tests/virschematest.c | 28 ++++---
30 files changed, 304 insertions(+), 53 deletions(-)
create mode 100644 src/conf/schemas/privatedata.rng
rename tests/qemublocktestdata/imagecreate/{network-ssh-qcow2.json =>
network-ssh-qcow2-invalid.json} (100%)
rename tests/qemublocktestdata/imagecreate/{network-ssh-qcow2.xml =>
network-ssh-qcow2-invalid.xml} (88%)
create mode 100644 tests/schemas/cpu-baseline.rng.in
create mode 100644 tests/schemas/device.rng.in
create mode 100644 tests/schemas/meson.build
create mode 100644 tests/schemas/privatedata.rng.in
--
2.38.1