Commit Graph

2 Commits

Author SHA1 Message Date
Daniel P. Berrangé
0635cd9555 util/xml: fix extraction of XML context
Currently given an input of '<dom\n' we emit an error:

  error: Failed to define domain from tests/qemuxmlconfdata/broken-xml-invalid.xml
  error: at line 2: Couldn't find end of Start Tag dom line 1
  (null)
  ^

With this fix we emit:

  error: Failed to define domain from tests/qemuxmlconfdata/broken-xml-invalid.xml
  error: at line 2: Couldn't find end of Start Tag dom line 1
  <dom
  ----^

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-12-20 10:00:22 +00:00
Peter Krempa
71f14351f9 qemuxmlconftest: Add test cases for broken and missing XML files
Add test cases for few edge cases which excercise the XML reporting from
libxml2 in anticipation of upcoming changes of behaviour.

'virschematest' must skip parsing of the broken file altogether so this
patch adds infrastructure to allow that.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-08-09 16:34:33 +02:00