libvirt/tests/genericxml2xmlindata
Pavel Hrdina 21bfd1e9b9 conf: error out for multiple source elements while parsing chardev
Currently we accept and correctly parse this chardev XML:

  ...
  <channel type='tcp'>
    <source mode='connect'/>
    <source mode='bind' host='localhost'/>
    <source service='4567'/>
    <target type='virtio' name='test'/>
  </channel>
  ...

The parsed formatted XML is:

  ...
  <channel type='tcp'>
    <source mode='connect' host='localhost' service='4567'/>
    <target type='virtio' name='test'/>
  </channel>
  ...

That behavior is super wrong and should not be allowed.  If you notice
the current parse takes the first found attribute and uses that value,
so for example from the "<source mode='bind' host='localhost'/>" only
the "host" attribute is used.  It works the same way for all possible
attributes that we are able to parse for source element.

This patch enforces providing only one source element for all character
devices, only for UDP type we allow to provide two source elements
since you can specify both modes.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-08-22 17:28:40 +02:00
..
generic-chardev-tcp-missing-host.xml tests: introduce genericxml test for TCP chardev 2017-08-22 17:28:40 +02:00
generic-chardev-tcp-missing-service.xml tests: introduce genericxml test for TCP chardev 2017-08-22 17:28:40 +02:00
generic-chardev-tcp-multiple-source.xml conf: error out for multiple source elements while parsing chardev 2017-08-22 17:28:40 +02:00
generic-chardev-tcp.xml tests: introduce genericxml test for TCP chardev 2017-08-22 17:28:40 +02:00
generic-chardev-udp-missing-connect-service.xml tests: introduce genericxml test for UDP chardev 2017-08-22 17:28:40 +02:00
generic-chardev-udp-multiple-source.xml conf: error out for multiple source elements while parsing chardev 2017-08-22 17:28:40 +02:00
generic-chardev-udp.xml tests: introduce genericxml test for UDP chardev 2017-08-22 17:28:40 +02:00
generic-chardev-unix-redirdev-missing-path.xml tests: introduce genericxml test for UNIX chardev 2017-08-22 17:28:40 +02:00
generic-chardev-unix-rng-missing-path.xml tests: introduce genericxml test for UNIX chardev 2017-08-22 17:28:40 +02:00
generic-chardev-unix-smartcard-missing-path.xml tests: introduce genericxml test for UNIX chardev 2017-08-22 17:28:40 +02:00
generic-chardev-unix.xml tests: introduce genericxml test for UNIX chardev 2017-08-22 17:28:40 +02:00
generic-cpu-cache-disable.xml Add support for CPU cache specification 2017-04-27 22:07:14 +02:00
generic-cpu-cache-emulate.xml Add support for CPU cache specification 2017-04-27 22:07:14 +02:00
generic-cpu-cache-passthrough.xml Add support for CPU cache specification 2017-04-27 22:07:14 +02:00
generic-disk-network-http.xml conf: Pre-fill default ports when parsing network disk sources 2017-07-14 16:05:46 +02:00
generic-disk-virtio.xml tests: unify qemu binary paths for all qemu related tests 2017-04-11 14:06:47 +02:00
generic-graphics-listen-back-compat-mismatch.xml tests: unify qemu binary paths for all qemu related tests 2017-04-11 14:06:47 +02:00
generic-graphics-listen-back-compat.xml tests: unify qemu binary paths for all qemu related tests 2017-04-11 14:06:47 +02:00
generic-graphics-vnc-autoport-no.xml tests: unify qemu binary paths for all qemu related tests 2017-04-11 14:06:47 +02:00
generic-graphics-vnc-listen-attr-only.xml tests: unify qemu binary paths for all qemu related tests 2017-04-11 14:06:47 +02:00
generic-graphics-vnc-listen-element-minimal.xml tests: unify qemu binary paths for all qemu related tests 2017-04-11 14:06:47 +02:00
generic-graphics-vnc-listen-element-with-address.xml tests: unify qemu binary paths for all qemu related tests 2017-04-11 14:06:47 +02:00
generic-graphics-vnc-manual-port.xml tests: unify qemu binary paths for all qemu related tests 2017-04-11 14:06:47 +02:00
generic-graphics-vnc-minimal.xml tests: unify qemu binary paths for all qemu related tests 2017-04-11 14:06:47 +02:00
generic-graphics-vnc-socket-attr-listen-address.xml tests: unify qemu binary paths for all qemu related tests 2017-04-11 14:06:47 +02:00
generic-graphics-vnc-socket-attr-listen-socket-mismatch.xml tests: unify qemu binary paths for all qemu related tests 2017-04-11 14:06:47 +02:00
generic-graphics-vnc-socket-attr-listen-socket.xml tests: unify qemu binary paths for all qemu related tests 2017-04-11 14:06:47 +02:00
generic-graphics-vnc-socket-listen.xml tests: unify qemu binary paths for all qemu related tests 2017-04-11 14:06:47 +02:00
generic-graphics-vnc-socket.xml tests: unify qemu binary paths for all qemu related tests 2017-04-11 14:06:47 +02:00
generic-name-slash-fail.xml conf: domain: reject name containing '/' 2016-05-02 10:06:04 -04:00
generic-perf.xml perf: add emulation_faults software perf event support 2017-03-07 13:51:05 -05:00
generic-vcpus-individual.xml conf: Add XML for individual vCPU hotplug 2016-08-24 15:44:47 -04:00