Re: [PATCH] qemuxmlconftest: Add test cases for broken and missing XML files

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

 



On Thu, Aug 08, 2024 at 09:27:04AM +0200, Peter Krempa wrote:
> 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@xxxxxxxxxx>
> ---
> 
> This patch is meant as an addendum to my review of:
> 
> [PATCH] util: open XML files before calling libxml2
> 
> 
>  .../broken-xml-invalid.x86_64-latest.err              |  3 +++
>  tests/qemuxmlconfdata/broken-xml-invalid.xml          |  1 +
>  .../nonexistent-file.x86_64-latest.err                |  1 +
>  tests/qemuxmlconftest.c                               |  8 +++++++-
>  tests/testutilsqemu.h                                 |  1 +
>  tests/virschematest.c                                 | 11 +++++++++++
>  6 files changed, 24 insertions(+), 1 deletion(-)
>  create mode 100644 tests/qemuxmlconfdata/broken-xml-invalid.x86_64-latest.err
>  create mode 100644 tests/qemuxmlconfdata/broken-xml-invalid.xml
>  create mode 100644 tests/qemuxmlconfdata/nonexistent-file.x86_64-latest.err
> 
> diff --git a/tests/qemuxmlconfdata/broken-xml-invalid.x86_64-latest.err b/tests/qemuxmlconfdata/broken-xml-invalid.x86_64-latest.err
> new file mode 100644
> index 0000000000..601f547cc6
> --- /dev/null
> +++ b/tests/qemuxmlconfdata/broken-xml-invalid.x86_64-latest.err
> @@ -0,0 +1,3 @@
> +/home/pipo/libvirt/tests/qemuxmlconfdata/broken-xml-invalid.xml:2: Couldn't find end of Start Tag dom line 1

We can't have your $HOME in these test output files.

Aside from that it looks good

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



[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