[PATCH 0/2] virschematest: Fix schema coverage of 'ch' driver's tests

Peter Krempa (2): tests: chxml2xmlin: Fix path format for fake paths virschematest: Validate files in 'chxml2xmlin' and 'chxml2xmlout' directories tests/chxml2xmlin/basic.xml | 4 ++-- tests/virschematest.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) -- 2.41.0

Our XML schema requires absolute paths for the <kernel> and disk source values. Fix the 'ch' test to have absolute paths. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/chxml2xmlin/basic.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/chxml2xmlin/basic.xml b/tests/chxml2xmlin/basic.xml index 911aa7c621..4cd2f3ae5f 100644 --- a/tests/chxml2xmlin/basic.xml +++ b/tests/chxml2xmlin/basic.xml @@ -6,7 +6,7 @@ <vcpu placement='static'>2</vcpu> <os> <type arch='x86_64'>hvm</type> - <kernel>hypervisor-fw</kernel> + <kernel>/path/to/hypervisor-fw</kernel> <boot dev='hd'/> </os> <clock offset='utc'/> @@ -16,7 +16,7 @@ <devices> <emulator>/usr/local/bin/cloud-hypervisor</emulator> <disk type='file' device='disk'> - <source file='disk.raw'/> + <source file='/path/to/disk.raw'/> <target dev='vda' bus='virtio'/> </disk> <interface type='ethernet'> -- 2.41.0

The test files for the 'ch' driver were not validated against the schema and thus also didn't conform to the schema. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/virschematest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/virschematest.c b/tests/virschematest.c index c8c1527613..c7bfd372c9 100644 --- a/tests/virschematest.c +++ b/tests/virschematest.c @@ -237,6 +237,8 @@ static const struct testSchemaEntry schemaDomain[] = { { .dir = "tests/xml2vmxdata" }, { .dir = "tests/bhyveargv2xmldata" }, { .dir = "tests/qemuagentdata" }, + { .dir = "tests/chxml2xmlin" }, + { .dir = "tests/chxml2xmlout" }, }; static const struct testSchemaEntry schemaDomainCaps[] = { -- 2.41.0

On a Thursday in 2023, Peter Krempa wrote:
Peter Krempa (2): tests: chxml2xmlin: Fix path format for fake paths virschematest: Validate files in 'chxml2xmlin' and 'chxml2xmlout' directories
tests/chxml2xmlin/basic.xml | 4 ++-- tests/virschematest.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano
participants (2)
-
Ján Tomko
-
Peter Krempa