[PATCH v2 00/18] virschematest: Improve XML validation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quite a few XMLs in examples/tests are not validated, many of them
actually invalid. Improve schema validation.

v2:
 - pushed ACK'd patches
 - rebased
 - added patch for schema validation of tests/cputestdata

Peter Krempa (18):
  virschematest: Rewrite internals to allow increasing XML test coverage
  virschematest: Add regex filtering for directory contents
  examples: xml: Fix 'pool-netfs.xml' example
  examples: xml: Fix 'vol-raw.xml' and 'vol-sparse.xml'
  virschematest: Add coverage for 'examples/xml/storage'
  virschematest: Add coverage for 'examples/xml/test'
  virschematest: Fix testing of 'nwfilter' xmls
  domainconfdata/getfilesystem.xml: Remove <init> element
  schema: nwfilter: Allow all accepted values for 'ipsetflags'
  schema: nwfiter: Allow leading/trailing whitespace in
    'variable-name-type'
  nwfilterxml2firewall: Fix schema compilance of 'tcp' test case
  nwfilterxml2xmltest: Rename cases with XMLs not conforming to schema
  schema: domain: Add definition for the 'vmware' private namespace
  schema: domain: Allow space in XML schema for bridge source
  tests: vmx: Add <name> element for all domain XMLs
  virschematest: Add directories containing domain XMLs
  virschematest: Validate more XMLs
  virschematest: Validate schema in tests/cputestdata

 docs/schemas/domaincommon.rng                 |  17 +-
 docs/schemas/nwfilter.rng                     |   4 +-
 examples/xml/storage/pool-netfs.xml           |   2 +-
 examples/xml/storage/vol-raw.xml              |   3 +
 examples/xml/storage/vol-sparse.xml           |   3 +
 tests/domainconfdata/getfilesystem.xml        |   1 -
 tests/nwfilterxml2firewalldata/tcp.xml        |   2 +-
 ...ipv6-test.xml => ah-ipv6-test-invalid.xml} |   0
 ...pv6-test.xml => all-ipv6-test-invalid.xml} |   0
 .../{arp-test.xml => arp-test-invalid.xml}    |   0
 ...est1.xml => chain_prefixtest1-invalid.xml} |   0
 ...ment-test.xml => comment-test-invalid.xml} |   0
 ...pv6-test.xml => esp-ipv6-test-invalid.xml} |   0
 ...ata-test.xml => hex-data-test-invalid.xml} |   0
 .../{icmp-test.xml => icmp-test-invalid.xml}  |   0
 ...cmpv6-test.xml => icmpv6-test-invalid.xml} |   0
 .../{ip-test.xml => ip-test-invalid.xml}      |   0
 .../{ipv6-test.xml => ipv6-test-invalid.xml}  |   0
 .../{mac-test.xml => mac-test-invalid.xml}    |   0
 .../{rarp-test.xml => rarp-test-invalid.xml}  |   0
 ...v6-test.xml => sctp-ipv6-test-invalid.xml} |   0
 .../{sctp-test.xml => sctp-test-invalid.xml}  |   0
 ...pv6-test.xml => tcp-ipv6-test-invalid.xml} |   0
 .../{tcp-test.xml => tcp-test-invalid.xml}    |   0
 ...pv6-test.xml => udp-ipv6-test-invalid.xml} |   0
 .../{udp-test.xml => udp-test-invalid.xml}    |   0
 ...test.xml => udplite-ipv6-test-invalid.xml} |   0
 .../{vlan-test.xml => vlan-test-invalid.xml}  |   0
 tests/nwfilterxml2xmltest.c                   |  44 +--
 tests/virschematest.c                         | 371 ++++++++++++------
 tests/vmx2xmldata/vmx2xml-annotation.vmx      |   1 +
 tests/vmx2xmldata/vmx2xml-annotation.xml      |   1 +
 .../vmx2xml-case-insensitive-1.vmx            |   1 +
 .../vmx2xml-case-insensitive-2.vmx            |   1 +
 .../vmx2xmldata/vmx2xml-cdrom-ide-device.vmx  |   1 +
 .../vmx2xmldata/vmx2xml-cdrom-ide-device.xml  |   1 +
 .../vmx2xmldata/vmx2xml-cdrom-ide-empty-2.vmx |   1 +
 .../vmx2xmldata/vmx2xml-cdrom-ide-empty-2.xml |   1 +
 tests/vmx2xmldata/vmx2xml-cdrom-ide-empty.vmx |   1 +
 tests/vmx2xmldata/vmx2xml-cdrom-ide-empty.xml |   1 +
 tests/vmx2xmldata/vmx2xml-cdrom-ide-file.vmx  |   1 +
 tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml  |   1 +
 .../vmx2xml-cdrom-ide-raw-auto-detect.vmx     |   1 +
 .../vmx2xml-cdrom-ide-raw-auto-detect.xml     |   1 +
 .../vmx2xml-cdrom-ide-raw-device.vmx          |   1 +
 .../vmx2xml-cdrom-ide-raw-device.xml          |   1 +
 .../vmx2xmldata/vmx2xml-cdrom-scsi-device.vmx |   1 +
 .../vmx2xmldata/vmx2xml-cdrom-scsi-device.xml |   1 +
 .../vmx2xmldata/vmx2xml-cdrom-scsi-empty.vmx  |   1 +
 .../vmx2xmldata/vmx2xml-cdrom-scsi-empty.xml  |   1 +
 tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.vmx |   1 +
 tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml |   1 +
 .../vmx2xml-cdrom-scsi-passthru.vmx           |   1 +
 .../vmx2xml-cdrom-scsi-passthru.xml           |   1 +
 .../vmx2xml-cdrom-scsi-raw-auto-detect.vmx    |   1 +
 .../vmx2xml-cdrom-scsi-raw-auto-detect.xml    |   1 +
 .../vmx2xml-cdrom-scsi-raw-device.vmx         |   1 +
 .../vmx2xml-cdrom-scsi-raw-device.xml         |   1 +
 tests/vmx2xmldata/vmx2xml-datacenterpath.vmx  |   1 +
 tests/vmx2xmldata/vmx2xml-datacenterpath.xml  |   1 +
 .../vmx2xmldata/vmx2xml-ethernet-bridged.vmx  |   1 +
 .../vmx2xmldata/vmx2xml-ethernet-bridged.xml  |   1 +
 tests/vmx2xmldata/vmx2xml-ethernet-custom.vmx |   1 +
 tests/vmx2xmldata/vmx2xml-ethernet-custom.xml |   1 +
 tests/vmx2xmldata/vmx2xml-ethernet-e1000.vmx  |   1 +
 tests/vmx2xmldata/vmx2xml-ethernet-e1000.xml  |   1 +
 .../vmx2xml-ethernet-generated.vmx            |   1 +
 .../vmx2xml-ethernet-generated.xml            |   1 +
 tests/vmx2xmldata/vmx2xml-ethernet-nat.vmx    |   1 +
 tests/vmx2xmldata/vmx2xml-ethernet-nat.xml    |   1 +
 tests/vmx2xmldata/vmx2xml-ethernet-other.vmx  |   1 +
 tests/vmx2xmldata/vmx2xml-ethernet-other.xml  |   1 +
 tests/vmx2xmldata/vmx2xml-ethernet-static.vmx |   1 +
 tests/vmx2xmldata/vmx2xml-ethernet-static.xml |   1 +
 .../vmx2xmldata/vmx2xml-ethernet-vmxnet2.vmx  |   1 +
 .../vmx2xmldata/vmx2xml-ethernet-vmxnet2.xml  |   1 +
 tests/vmx2xmldata/vmx2xml-ethernet-vpx.vmx    |   1 +
 tests/vmx2xmldata/vmx2xml-ethernet-vpx.xml    |   1 +
 tests/vmx2xmldata/vmx2xml-firmware-efi.vmx    |   1 +
 tests/vmx2xmldata/vmx2xml-firmware-efi.xml    |   1 +
 tests/vmx2xmldata/vmx2xml-floppy-device.vmx   |   1 +
 tests/vmx2xmldata/vmx2xml-floppy-device.xml   |   1 +
 tests/vmx2xmldata/vmx2xml-floppy-file.vmx     |   1 +
 tests/vmx2xmldata/vmx2xml-floppy-file.xml     |   1 +
 tests/vmx2xmldata/vmx2xml-graphics-vnc.vmx    |   1 +
 tests/vmx2xmldata/vmx2xml-graphics-vnc.xml    |   1 +
 .../vmx2xmldata/vmx2xml-harddisk-ide-file.vmx |   1 +
 .../vmx2xmldata/vmx2xml-harddisk-ide-file.xml |   1 +
 .../vmx2xml-harddisk-scsi-file.vmx            |   1 +
 .../vmx2xml-harddisk-scsi-file.xml            |   1 +
 .../vmx2xml-harddisk-transient.vmx            |   1 +
 .../vmx2xml-harddisk-transient.xml            |   1 +
 tests/vmx2xmldata/vmx2xml-minimal-64bit.vmx   |   1 +
 tests/vmx2xmldata/vmx2xml-minimal-64bit.xml   |   1 +
 tests/vmx2xmldata/vmx2xml-minimal.vmx         |   1 +
 tests/vmx2xmldata/vmx2xml-minimal.xml         |   1 +
 tests/vmx2xmldata/vmx2xml-parallel-device.vmx |   1 +
 tests/vmx2xmldata/vmx2xml-parallel-device.xml |   1 +
 tests/vmx2xmldata/vmx2xml-parallel-file.vmx   |   1 +
 tests/vmx2xmldata/vmx2xml-parallel-file.xml   |   1 +
 tests/vmx2xmldata/vmx2xml-scsi-driver.vmx     |   1 +
 tests/vmx2xmldata/vmx2xml-scsi-driver.xml     |   1 +
 .../vmx2xmldata/vmx2xml-scsi-writethrough.vmx |   1 +
 .../vmx2xmldata/vmx2xml-scsi-writethrough.xml |   1 +
 tests/vmx2xmldata/vmx2xml-serial-device.vmx   |   1 +
 tests/vmx2xmldata/vmx2xml-serial-device.xml   |   1 +
 tests/vmx2xmldata/vmx2xml-serial-file.vmx     |   1 +
 tests/vmx2xmldata/vmx2xml-serial-file.xml     |   1 +
 .../vmx2xml-serial-network-client.vmx         |   1 +
 .../vmx2xml-serial-network-client.xml         |   1 +
 .../vmx2xml-serial-network-server.vmx         |   1 +
 .../vmx2xml-serial-network-server.xml         |   1 +
 .../vmx2xml-serial-pipe-client-app.vmx        |   1 +
 .../vmx2xml-serial-pipe-client-vm.vmx         |   1 +
 .../vmx2xml-serial-pipe-server-app.vmx        |   1 +
 .../vmx2xml-serial-pipe-server-vm.vmx         |   1 +
 tests/vmx2xmldata/vmx2xml-serial-pipe.xml     |   1 +
 tests/vmx2xmldata/vmx2xml-sharedfolder.vmx    |   1 +
 tests/vmx2xmldata/vmx2xml-sharedfolder.xml    |   1 +
 tests/vmx2xmldata/vmx2xml-smbios.vmx          |   1 +
 tests/vmx2xmldata/vmx2xml-smbios.xml          |   1 +
 tests/vmx2xmldata/vmx2xml-svga.vmx            |   1 +
 tests/vmx2xmldata/vmx2xml-svga.xml            |   1 +
 123 files changed, 393 insertions(+), 147 deletions(-)
 rename tests/nwfilterxml2xmlin/{ah-ipv6-test.xml => ah-ipv6-test-invalid.xml} (100%)
 rename tests/nwfilterxml2xmlin/{all-ipv6-test.xml => all-ipv6-test-invalid.xml} (100%)
 rename tests/nwfilterxml2xmlin/{arp-test.xml => arp-test-invalid.xml} (100%)
 rename tests/nwfilterxml2xmlin/{chain_prefixtest1.xml => chain_prefixtest1-invalid.xml} (100%)
 rename tests/nwfilterxml2xmlin/{comment-test.xml => comment-test-invalid.xml} (100%)
 rename tests/nwfilterxml2xmlin/{esp-ipv6-test.xml => esp-ipv6-test-invalid.xml} (100%)
 rename tests/nwfilterxml2xmlin/{hex-data-test.xml => hex-data-test-invalid.xml} (100%)
 rename tests/nwfilterxml2xmlin/{icmp-test.xml => icmp-test-invalid.xml} (100%)
 rename tests/nwfilterxml2xmlin/{icmpv6-test.xml => icmpv6-test-invalid.xml} (100%)
 rename tests/nwfilterxml2xmlin/{ip-test.xml => ip-test-invalid.xml} (100%)
 rename tests/nwfilterxml2xmlin/{ipv6-test.xml => ipv6-test-invalid.xml} (100%)
 rename tests/nwfilterxml2xmlin/{mac-test.xml => mac-test-invalid.xml} (100%)
 rename tests/nwfilterxml2xmlin/{rarp-test.xml => rarp-test-invalid.xml} (100%)
 rename tests/nwfilterxml2xmlin/{sctp-ipv6-test.xml => sctp-ipv6-test-invalid.xml} (100%)
 rename tests/nwfilterxml2xmlin/{sctp-test.xml => sctp-test-invalid.xml} (100%)
 rename tests/nwfilterxml2xmlin/{tcp-ipv6-test.xml => tcp-ipv6-test-invalid.xml} (100%)
 rename tests/nwfilterxml2xmlin/{tcp-test.xml => tcp-test-invalid.xml} (100%)
 rename tests/nwfilterxml2xmlin/{udp-ipv6-test.xml => udp-ipv6-test-invalid.xml} (100%)
 rename tests/nwfilterxml2xmlin/{udp-test.xml => udp-test-invalid.xml} (100%)
 rename tests/nwfilterxml2xmlin/{udplite-ipv6-test.xml => udplite-ipv6-test-invalid.xml} (100%)
 rename tests/nwfilterxml2xmlin/{vlan-test.xml => vlan-test-invalid.xml} (100%)

-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux