[libvirt PATCH v4 4/5] tests: Enable CPU XML validation in the tests.
Peter Krempa
pkrempa at redhat.com
Wed Oct 7 09:05:02 UTC 2020
On Wed, Oct 07, 2020 at 10:54:57 +0200, Tim Wiederhake wrote:
Please always provide a short summary. E.g. that this is adding schema
validation via virschematest with a custom schema to match the
undescribed files.
> Signed-off-by: Tim Wiederhake <twiederh at redhat.com>
> ---
> docs/schemas/cpu_test.rng | 48 +++++++++++++++++++++++++++++++++++++++
This schema describes some internals which must NOT be part of the
installed schema.
As of such this not acceptable upstream.
I will adapt your patch in my upcoming series which actually improves
virschematest and this will come in very handy.
NACK as we must not shipt the schema for internals.
> docs/schemas/meson.build | 1 +
> tests/cputest.c | 2 +-
> tests/virschematest.c | 1 +
> 4 files changed, 51 insertions(+), 1 deletion(-)
> create mode 100644 docs/schemas/cpu_test.rng
> diff --git a/tests/cputest.c b/tests/cputest.c
> index 90f319bf9c..e31c2c0820 100644
> --- a/tests/cputest.c
> +++ b/tests/cputest.c
> @@ -81,7 +81,7 @@ cpuTestLoadXML(virArch arch, const char *name)
> if (!(doc = virXMLParseFileCtxt(xml, &ctxt)))
> goto cleanup;
>
> - virCPUDefParseXML(ctxt, NULL, VIR_CPU_TYPE_AUTO, &cpu, false);
> + virCPUDefParseXML(ctxt, NULL, VIR_CPU_TYPE_AUTO, &cpu, true);
This is mixing two changes at once. Adding schema validation via
virschematest and via the integrated validator. Since I must NACK the
bits for virschematest you'll need to re-home this hunk somewhere.
>
> cleanup:
> xmlXPathFreeContext(ctxt);
More information about the libvir-list
mailing list