[libvirt PATCH v3 0/8] Make unknown XML elements fail CPU comparison

Peter Krempa pkrempa at redhat.com
Wed Oct 7 07:23:00 UTC 2020

On Wed, Sep 30, 2020 at 13:54:57 +0200, Tim Wiederhake wrote:
> We currently ignore unknown elements in the CPU XML description, e.g.
> with virsh cpu-compare and hypervisor-cpu-compare.  This makes
> '<cpu><faeture name="..."/></cpu>' (note the typo in "faeture")
> semantically identic to '<cpu/>'.  No error is reported.
> This series adds checks for unrecognized attributes and elements in
> the "<cpu>" element, catching this kind of mistake.
> V1: https://www.redhat.com/archives/libvir-list/2020-September/msg00933.html
> V2: https://www.redhat.com/archives/libvir-list/2020-September/msg01073.html
> Changed:
> * Added more detailed commit messages
> * Added missing man page details
> * Split the changes slightly differently in the commits
> * CPU tests now always validate XML documents
> * Fixed typo "nonexistant" -> "nonexistent"
> Tim Wiederhake (8):
>   schema: Unify apostrophe and quotation mark usage
>   schema: Move host cpu definition to cputypes.rng
>   schema: Move guest cpu definition to cputypes.rng
>   schema: Add schema for guest or host cpu definition
>   util: Allow validation for single XML node

I've pushed patches 1-5 now,

>   cpu: Wire in XML validation
>   virsh: Add "validate" argument to [hypervisor-]cpu-compare
>   tests: Add tests for unknown elements and attributes in cpu defintion

but there's a non-trivial merge conflict in the rest. Please rebase them
on top of master and repost.

More information about the libvir-list mailing list