[PATCH 00/21] virschematest: Improve XML validation

We had quite a few test files which weren't validated yet. Additionally this will allow us to add schemas for internal testing only for stuff such as the qemu status XML. Peter Krempa (21): util: xml: Add autoptr cleanup for virXMLValidator virschematest: Rewrite internals to allow increasing XML test coverage virschematest: Add regex filtering for directory contents examples: xml: Fix 'pool-netfs.xml' example examples: xml: Fix 'vol-raw.xml' and 'vol-sparse.xml' virschematest: Add coverage for 'examples/xml/storage' virschematest: Add coverage for 'examples/xml/test' virschematest: Fix testing of 'nwfilter' xmls domainconfdata/getfilesystem.xml: Remove <init> element bhyveargv2xmldata: Remove XML files for console2/3/4 test case bhyve: parse: Set video device model when parsing bhyve commandline schema: nwfilter: Allow all accepted values for 'ipsetflags' schema: nwfiter: Allow leading/trailing whitespace in 'variable-name-type' nwfilterxml2firewall: Fix schema compilance of 'tcp' test case nwfilterxml2xmltest: Rename cases with XMLs not conforming to schema schema: domain: Add definition for the 'vmware' private namespace schema: domain: Allow space in XML schema for bridge source tests: vmx: Make paths in test files conform with the XML schema tests: vmx: Add <name> element for all domain XMLs virschematest: Add directories containing domain XMLs virschematest: Validate more XMLs docs/schemas/domaincommon.rng | 17 +- docs/schemas/nwfilter.rng | 4 +- examples/xml/storage/pool-netfs.xml | 2 +- examples/xml/storage/vol-raw.xml | 3 + examples/xml/storage/vol-sparse.xml | 3 + src/bhyve/bhyve_parse_command.c | 2 + src/util/virxml.h | 1 + .../bhyveargv2xml-console2.xml | 15 - .../bhyveargv2xml-console3.xml | 27 -- .../bhyveargv2xml-console4.xml | 15 - .../bhyveargv2xml-vnc-listen.xml | 2 +- .../bhyveargv2xml-vnc-password.xml | 2 +- .../bhyveargv2xml-vnc-resolution.xml | 2 +- .../bhyveargv2xml-vnc-vga-io.xml | 2 +- .../bhyveargv2xml-vnc-vga-off.xml | 2 +- .../bhyveargv2xml-vnc-vga-on.xml | 2 +- tests/bhyveargv2xmldata/bhyveargv2xml-vnc.xml | 2 +- tests/domainconfdata/getfilesystem.xml | 1 - tests/nwfilterxml2firewalldata/tcp.xml | 2 +- ...ipv6-test.xml => ah-ipv6-test-invalid.xml} | 0 ...pv6-test.xml => all-ipv6-test-invalid.xml} | 0 .../{arp-test.xml => arp-test-invalid.xml} | 0 ...est1.xml => chain_prefixtest1-invalid.xml} | 0 ...ment-test.xml => comment-test-invalid.xml} | 0 ...pv6-test.xml => esp-ipv6-test-invalid.xml} | 0 ...ata-test.xml => hex-data-test-invalid.xml} | 0 .../{icmp-test.xml => icmp-test-invalid.xml} | 0 ...cmpv6-test.xml => icmpv6-test-invalid.xml} | 0 .../{ip-test.xml => ip-test-invalid.xml} | 0 .../{ipv6-test.xml => ipv6-test-invalid.xml} | 0 .../{mac-test.xml => mac-test-invalid.xml} | 0 .../{rarp-test.xml => rarp-test-invalid.xml} | 0 ...v6-test.xml => sctp-ipv6-test-invalid.xml} | 0 .../{sctp-test.xml => sctp-test-invalid.xml} | 0 ...pv6-test.xml => tcp-ipv6-test-invalid.xml} | 0 .../{tcp-test.xml => tcp-test-invalid.xml} | 0 ...pv6-test.xml => udp-ipv6-test-invalid.xml} | 0 .../{udp-test.xml => udp-test-invalid.xml} | 0 ...test.xml => udplite-ipv6-test-invalid.xml} | 0 .../{vlan-test.xml => vlan-test-invalid.xml} | 0 tests/nwfilterxml2xmltest.c | 44 +-- tests/virschematest.c | 362 ++++++++++++------ tests/vmx2xmldata/vmx2xml-annotation.vmx | 1 + tests/vmx2xmldata/vmx2xml-annotation.xml | 1 + .../vmx2xml-case-insensitive-1.vmx | 1 + .../vmx2xml-case-insensitive-1.xml | 2 +- .../vmx2xml-case-insensitive-2.vmx | 1 + .../vmx2xml-case-insensitive-2.xml | 2 +- .../vmx2xmldata/vmx2xml-cdrom-ide-device.vmx | 1 + .../vmx2xmldata/vmx2xml-cdrom-ide-device.xml | 1 + .../vmx2xmldata/vmx2xml-cdrom-ide-empty-2.vmx | 1 + .../vmx2xmldata/vmx2xml-cdrom-ide-empty-2.xml | 1 + tests/vmx2xmldata/vmx2xml-cdrom-ide-empty.vmx | 1 + tests/vmx2xmldata/vmx2xml-cdrom-ide-empty.xml | 1 + tests/vmx2xmldata/vmx2xml-cdrom-ide-file.vmx | 1 + tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml | 3 +- .../vmx2xml-cdrom-ide-raw-auto-detect.vmx | 1 + .../vmx2xml-cdrom-ide-raw-auto-detect.xml | 1 + .../vmx2xml-cdrom-ide-raw-device.vmx | 1 + .../vmx2xml-cdrom-ide-raw-device.xml | 1 + .../vmx2xmldata/vmx2xml-cdrom-scsi-device.vmx | 1 + .../vmx2xmldata/vmx2xml-cdrom-scsi-device.xml | 1 + .../vmx2xmldata/vmx2xml-cdrom-scsi-empty.vmx | 1 + .../vmx2xmldata/vmx2xml-cdrom-scsi-empty.xml | 1 + tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.vmx | 1 + tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml | 3 +- .../vmx2xml-cdrom-scsi-passthru.vmx | 1 + .../vmx2xml-cdrom-scsi-passthru.xml | 1 + .../vmx2xml-cdrom-scsi-raw-auto-detect.vmx | 1 + .../vmx2xml-cdrom-scsi-raw-auto-detect.xml | 1 + .../vmx2xml-cdrom-scsi-raw-device.vmx | 1 + .../vmx2xml-cdrom-scsi-raw-device.xml | 1 + tests/vmx2xmldata/vmx2xml-datacenterpath.vmx | 1 + tests/vmx2xmldata/vmx2xml-datacenterpath.xml | 1 + .../vmx2xmldata/vmx2xml-esx-in-the-wild-1.xml | 2 +- .../vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml | 6 +- .../vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml | 6 +- .../vmx2xmldata/vmx2xml-esx-in-the-wild-4.xml | 8 +- .../vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml | 4 +- .../vmx2xmldata/vmx2xml-esx-in-the-wild-6.xml | 2 +- .../vmx2xmldata/vmx2xml-esx-in-the-wild-7.xml | 2 +- .../vmx2xmldata/vmx2xml-esx-in-the-wild-8.xml | 6 +- .../vmx2xmldata/vmx2xml-esx-in-the-wild-9.xml | 2 +- .../vmx2xmldata/vmx2xml-ethernet-bridged.vmx | 1 + .../vmx2xmldata/vmx2xml-ethernet-bridged.xml | 1 + tests/vmx2xmldata/vmx2xml-ethernet-custom.vmx | 1 + tests/vmx2xmldata/vmx2xml-ethernet-custom.xml | 1 + tests/vmx2xmldata/vmx2xml-ethernet-e1000.vmx | 1 + tests/vmx2xmldata/vmx2xml-ethernet-e1000.xml | 1 + .../vmx2xml-ethernet-generated.vmx | 1 + .../vmx2xml-ethernet-generated.xml | 1 + tests/vmx2xmldata/vmx2xml-ethernet-nat.vmx | 1 + tests/vmx2xmldata/vmx2xml-ethernet-nat.xml | 1 + tests/vmx2xmldata/vmx2xml-ethernet-other.vmx | 1 + tests/vmx2xmldata/vmx2xml-ethernet-other.xml | 1 + tests/vmx2xmldata/vmx2xml-ethernet-static.vmx | 1 + tests/vmx2xmldata/vmx2xml-ethernet-static.xml | 1 + .../vmx2xmldata/vmx2xml-ethernet-vmxnet2.vmx | 1 + .../vmx2xmldata/vmx2xml-ethernet-vmxnet2.xml | 1 + tests/vmx2xmldata/vmx2xml-ethernet-vpx.vmx | 1 + tests/vmx2xmldata/vmx2xml-ethernet-vpx.xml | 1 + tests/vmx2xmldata/vmx2xml-firmware-efi.vmx | 1 + tests/vmx2xmldata/vmx2xml-firmware-efi.xml | 1 + tests/vmx2xmldata/vmx2xml-floppy-device.vmx | 1 + tests/vmx2xmldata/vmx2xml-floppy-device.xml | 1 + tests/vmx2xmldata/vmx2xml-floppy-file.vmx | 1 + tests/vmx2xmldata/vmx2xml-floppy-file.xml | 5 +- .../vmx2xml-fusion-in-the-wild-1.xml | 2 +- tests/vmx2xmldata/vmx2xml-graphics-vnc.vmx | 1 + tests/vmx2xmldata/vmx2xml-graphics-vnc.xml | 1 + .../vmx2xmldata/vmx2xml-gsx-in-the-wild-1.xml | 2 +- .../vmx2xmldata/vmx2xml-gsx-in-the-wild-2.xml | 2 +- .../vmx2xmldata/vmx2xml-gsx-in-the-wild-3.xml | 2 +- .../vmx2xmldata/vmx2xml-gsx-in-the-wild-4.xml | 2 +- .../vmx2xmldata/vmx2xml-harddisk-ide-file.vmx | 1 + .../vmx2xmldata/vmx2xml-harddisk-ide-file.xml | 3 +- .../vmx2xml-harddisk-scsi-file.vmx | 1 + .../vmx2xml-harddisk-scsi-file.xml | 3 +- .../vmx2xml-harddisk-transient.vmx | 1 + .../vmx2xml-harddisk-transient.xml | 3 +- tests/vmx2xmldata/vmx2xml-minimal-64bit.vmx | 1 + tests/vmx2xmldata/vmx2xml-minimal-64bit.xml | 1 + tests/vmx2xmldata/vmx2xml-minimal.vmx | 1 + tests/vmx2xmldata/vmx2xml-minimal.xml | 1 + tests/vmx2xmldata/vmx2xml-parallel-device.vmx | 1 + tests/vmx2xmldata/vmx2xml-parallel-device.xml | 1 + tests/vmx2xmldata/vmx2xml-parallel-file.vmx | 1 + tests/vmx2xmldata/vmx2xml-parallel-file.xml | 3 +- tests/vmx2xmldata/vmx2xml-scsi-driver.vmx | 1 + tests/vmx2xmldata/vmx2xml-scsi-driver.xml | 9 +- .../vmx2xmldata/vmx2xml-scsi-writethrough.vmx | 1 + .../vmx2xmldata/vmx2xml-scsi-writethrough.xml | 3 +- tests/vmx2xmldata/vmx2xml-serial-device.vmx | 1 + tests/vmx2xmldata/vmx2xml-serial-device.xml | 1 + tests/vmx2xmldata/vmx2xml-serial-file.vmx | 1 + tests/vmx2xmldata/vmx2xml-serial-file.xml | 5 +- .../vmx2xml-serial-network-client.vmx | 1 + .../vmx2xml-serial-network-client.xml | 1 + .../vmx2xml-serial-network-server.vmx | 1 + .../vmx2xml-serial-network-server.xml | 1 + .../vmx2xml-serial-pipe-client-app.vmx | 1 + .../vmx2xml-serial-pipe-client-vm.vmx | 1 + .../vmx2xml-serial-pipe-server-app.vmx | 1 + .../vmx2xml-serial-pipe-server-vm.vmx | 1 + tests/vmx2xmldata/vmx2xml-serial-pipe.xml | 1 + tests/vmx2xmldata/vmx2xml-sharedfolder.vmx | 1 + tests/vmx2xmldata/vmx2xml-sharedfolder.xml | 1 + tests/vmx2xmldata/vmx2xml-smbios.vmx | 1 + tests/vmx2xmldata/vmx2xml-smbios.xml | 1 + tests/vmx2xmldata/vmx2xml-svga.vmx | 1 + tests/vmx2xmldata/vmx2xml-svga.xml | 1 + tests/vmx2xmltest.c | 4 +- tests/xml2vmxdata/xml2vmx-cdrom-ide-file.xml | 2 +- tests/xml2vmxdata/xml2vmx-cdrom-scsi-file.xml | 2 +- .../xml2vmxdata/xml2vmx-esx-in-the-wild-1.xml | 2 +- .../xml2vmxdata/xml2vmx-esx-in-the-wild-2.xml | 6 +- .../xml2vmxdata/xml2vmx-esx-in-the-wild-3.xml | 6 +- .../xml2vmxdata/xml2vmx-esx-in-the-wild-4.xml | 8 +- .../xml2vmxdata/xml2vmx-esx-in-the-wild-5.xml | 4 +- .../xml2vmxdata/xml2vmx-esx-in-the-wild-6.xml | 2 +- .../xml2vmxdata/xml2vmx-esx-in-the-wild-7.xml | 2 +- .../xml2vmxdata/xml2vmx-esx-in-the-wild-9.xml | 2 +- tests/xml2vmxdata/xml2vmx-floppy-file.xml | 4 +- .../xml2vmx-fusion-in-the-wild-1.xml | 2 +- .../xml2vmxdata/xml2vmx-gsx-in-the-wild-1.xml | 2 +- .../xml2vmxdata/xml2vmx-gsx-in-the-wild-2.xml | 2 +- .../xml2vmxdata/xml2vmx-gsx-in-the-wild-3.xml | 2 +- .../xml2vmxdata/xml2vmx-gsx-in-the-wild-4.xml | 2 +- .../xml2vmxdata/xml2vmx-harddisk-ide-file.xml | 2 +- .../xml2vmx-harddisk-scsi-file.xml | 2 +- tests/xml2vmxdata/xml2vmx-parallel-file.xml | 2 +- tests/xml2vmxdata/xml2vmx-scsi-driver.xml | 8 +- .../xml2vmxdata/xml2vmx-scsi-writethrough.xml | 2 +- tests/xml2vmxdata/xml2vmx-serial-file.xml | 2 +- tests/xml2vmxtest.c | 4 +- 175 files changed, 473 insertions(+), 290 deletions(-) delete mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-console2.xml delete mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-console3.xml delete mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-console4.xml rename tests/nwfilterxml2xmlin/{ah-ipv6-test.xml => ah-ipv6-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{all-ipv6-test.xml => all-ipv6-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{arp-test.xml => arp-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{chain_prefixtest1.xml => chain_prefixtest1-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{comment-test.xml => comment-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{esp-ipv6-test.xml => esp-ipv6-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{hex-data-test.xml => hex-data-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{icmp-test.xml => icmp-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{icmpv6-test.xml => icmpv6-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{ip-test.xml => ip-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{ipv6-test.xml => ipv6-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{mac-test.xml => mac-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{rarp-test.xml => rarp-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{sctp-ipv6-test.xml => sctp-ipv6-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{sctp-test.xml => sctp-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{tcp-ipv6-test.xml => tcp-ipv6-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{tcp-test.xml => tcp-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{udp-ipv6-test.xml => udp-ipv6-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{udp-test.xml => udp-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{udplite-ipv6-test.xml => udplite-ipv6-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{vlan-test.xml => vlan-test-invalid.xml} (100%) -- 2.26.2

Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/util/virxml.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/virxml.h b/src/util/virxml.h index fd0d30fcec..b73591c3df 100644 --- a/src/util/virxml.h +++ b/src/util/virxml.h @@ -220,6 +220,7 @@ virXMLValidateNodeAgainstSchema(const char *schemafile, void virXMLValidatorFree(virXMLValidatorPtr validator); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virXMLValidator, virXMLValidatorFree); void virXMLFormatElement(virBufferPtr buf, -- 2.26.2

To allow greater variablitity of XML schema validation tests without needlessly reparsing the schema we need to refactor the internals to pass in structs rather than just paths to directory. This allows to directly implement testing of single files and will simplify further additions such as filtering of the list of XML files in a directory. The list of tested paths is directly ported for now and will be improved in follow-up patches. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/virschematest.c | 317 ++++++++++++++++++++++++++---------------- 1 file changed, 199 insertions(+), 118 deletions(-) diff --git a/tests/virschematest.c b/tests/virschematest.c index 17eb2a4b34..e6e176eef3 100644 --- a/tests/virschematest.c +++ b/tests/virschematest.c @@ -30,36 +30,49 @@ VIR_LOG_INIT("tests.schematest"); +struct testSchemaEntry { + const char *dir; + const char *file; +}; + + struct testSchemaData { virXMLValidatorPtr validator; - const char *schema; const char *xml_path; }; static int -testSchemaFile(const void *args) +testSchemaValidateXML(const void *args) { const struct testSchemaData *data = args; bool shouldFail = virStringHasSuffix(data->xml_path, "-invalid.xml"); - xmlDocPtr xml = NULL; - int ret = -1; + g_autoptr(xmlDoc) xml = NULL; if (!(xml = virXMLParseFile(data->xml_path))) return -1; - if (virXMLValidatorValidate(data->validator, xml) < 0) { - if (!shouldFail) - goto cleanup; - } else { - if (shouldFail) - goto cleanup; - } + if ((virXMLValidatorValidate(data->validator, xml) < 0) != shouldFail) + return -1; - ret = 0; - cleanup: - xmlFreeDoc(xml); - return ret; + return 0; +} + + +static int +testSchemaFile(const char *schema, + virXMLValidatorPtr validator, + const char *path) +{ + g_autofree char *test_name = NULL; + struct testSchemaData data = { + .validator = validator, + .xml_path = path, + }; + + test_name = g_strdup_printf("Checking %s against %s", path, schema); + + return virTestRun(test_name, testSchemaValidateXML, &data); } @@ -72,9 +85,6 @@ testSchemaDir(const char *schema, struct dirent *ent; int ret = 0; int rc; - struct testSchemaData data = { - .validator = validator, - }; if (virDirOpen(&dir, dir_path) < 0) { virTestPropagateLibvirtError(); @@ -82,7 +92,6 @@ testSchemaDir(const char *schema, } while ((rc = virDirRead(dir, &ent, dir_path)) > 0) { - g_autofree char *test_name = NULL; g_autofree char *xml_path = NULL; if (!virStringHasSuffix(ent->d_name, ".xml")) @@ -92,10 +101,7 @@ testSchemaDir(const char *schema, xml_path = g_strdup_printf("%s/%s", dir_path, ent->d_name); - test_name = g_strdup_printf("Checking %s against %s", ent->d_name, schema); - - data.xml_path = xml_path; - if (virTestRun(test_name, testSchemaFile, &data) < 0) + if (testSchemaFile(schema, validator, xml_path) < 0) ret = -1; } @@ -109,122 +115,197 @@ testSchemaDir(const char *schema, } +/** + * testSchemaGrammarReport: + * + * We need to parse the schema regardless since it's necessary also when tests + * are skipped using VIR_TEST_RANGE so this function merely reports whether the + * schema was parsed successfully via virTestRun. + */ static int -testSchemaDirs(const char *schema, virXMLValidatorPtr validator, ...) +testSchemaGrammarReport(const void *opaque) { - va_list args; - int ret = 0; - const char *dir; + const virXMLValidator *validator = opaque; - va_start(args, validator); + if (!validator) + return -1; - while ((dir = va_arg(args, char *))) { - g_autofree char *dir_path = g_strdup_printf("%s/%s", abs_srcdir, dir); - if (testSchemaDir(schema, validator, dir_path) < 0) - ret = -1; - } + return 0; +} + +static virXMLValidatorPtr +testSchemaGrammarLoad(const char *schema) +{ + g_autofree char *schema_path = NULL; + g_autofree char *testname = NULL; + virXMLValidatorPtr ret; + + schema_path = g_strdup_printf("%s/%s", abs_top_srcdir, schema); + + ret = virXMLValidatorInit(schema_path); + + testname = g_strdup_printf("test schema grammar file: '%s'", schema); + + ignore_value(virTestRun(testname, testSchemaGrammarReport, ret)); - va_end(args); return ret; } static int -testSchemaGrammar(const void *opaque) +testSchemaEntries(const char *schema, + const struct testSchemaEntry *entries, + size_t nentries) { - struct testSchemaData *data = (struct testSchemaData *) opaque; - g_autofree char *schema_path = NULL; - - schema_path = g_strdup_printf("%s/docs/schemas/%s", abs_top_srcdir, - data->schema); + g_autoptr(virXMLValidator) validator = NULL; + size_t i; + int ret = 0; - if (!(data->validator = virXMLValidatorInit(schema_path))) + if (!(validator = testSchemaGrammarLoad(schema))) return -1; - return 0; + for (i = 0; i < nentries; i++) { + const struct testSchemaEntry *entry = entries + i; + + if (!entry->file == !entry->dir) { + VIR_TEST_VERBOSE("\nmust specify exactly one of 'dir' and 'file' for struct testSchemaEntry\n"); + ret = -1; + continue; + } + + if (entry->dir) { + g_autofree char *path = g_strdup_printf("%s/%s", abs_top_srcdir, entry->dir); + + if (testSchemaDir(schema, validator, path) < 0) + ret = -1; + } + + if (entry->file) { + g_autofree char *path = g_strdup_printf("%s/%s", abs_top_srcdir, entry->file); + + if (testSchemaFile(schema, validator, path) < 0) + ret = -1; + } + } + + return ret; } +static const struct testSchemaEntry schemaCapability[] = { + { .dir = "tests/capabilityschemadata" }, + { .dir = "tests/vircaps2xmldata" }, +}; + +static const struct testSchemaEntry schemaDomain[] = { + { .dir = "tests/domainschemadata" }, + { .dir = "tests/qemuxml2argvdata" }, + { .dir = "tests/xmconfigdata" }, + { .dir = "tests/qemuxml2xmloutdata" }, + { .dir = "tests/lxcxml2xmldata" }, + { .dir = "tests/lxcxml2xmloutdata" }, + { .dir = "tests/bhyvexml2argvdata" }, + { .dir = "tests/bhyvexml2xmloutdata" }, + { .dir = "tests/genericxml2xmlindata" }, + { .dir = "tests/genericxml2xmloutdata" }, + { .dir = "tests/xlconfigdata" }, + { .dir = "tests/libxlxml2domconfigdata" }, + { .dir = "tests/qemuhotplugtestdomains" }, +}; + +static const struct testSchemaEntry schemaDomainCaps[] = { + { .dir = "tests/domaincapsdata" }, +}; + +static const struct testSchemaEntry schemaDomainBackup[] = { + { .dir = "tests/domainbackupxml2xmlin" }, + { .dir = "tests/domainbackupxml2xmlout" }, +}; + +static const struct testSchemaEntry schemaDomainCheckpoint[] = { + { .dir = "tests/qemudomaincheckpointxml2xmlin" }, + { .dir = "tests/qemudomaincheckpointxml2xmlout" }, +}; + +static const struct testSchemaEntry schemaDomainSnapshot[] = { + { .dir = "tests/qemudomainsnapshotxml2xmlin" }, + { .dir = "tests/qemudomainsnapshotxml2xmlout" }, +}; + +static const struct testSchemaEntry schemaInterface[] = { + { .dir = "tests/interfaceschemadata" }, +}; + +static const struct testSchemaEntry schemaNetwork[] = { + { .dir = "src/network" }, + { .dir = "tests/networkxml2xmlin" }, + { .dir = "tests/networkxml2xmlout" }, + { .dir = "tests/networkxml2confdata" }, +}; + +static const struct testSchemaEntry schemaNetworkport[] = { + { .dir = "tests/virnetworkportxml2xmldata" }, +}; + +static const struct testSchemaEntry schemaNodedev[] = { + { .dir = "tests/nodedevschemadata" }, +}; + +static const struct testSchemaEntry schemaNwfilter[] = { + { .dir = "tests/nwfilterxml2xmlout" }, + { .dir = "src/nwfilter" }, +}; + +static const struct testSchemaEntry schemaNwfilterbinding[] = { + { .dir = "tests/virnwfilterbindingxml2xmldata" }, +}; + +static const struct testSchemaEntry schemaSecret[] = { + { .dir = "tests/secretxml2xmlin" }, +}; + +static const struct testSchemaEntry schemaStoragepoolcaps[] = { + { .dir = "tests/storagepoolcapsschemadata" }, +}; + +static const struct testSchemaEntry schemaStoragePool[] = { + { .dir = "tests/storagepoolxml2xmlin" }, + { .dir = "tests/storagepoolxml2xmlout" }, + { .dir = "tests/storagepoolschemadata" }, +}; + +static const struct testSchemaEntry schemaStorageVol[] = { + { .dir = "tests/storagevolxml2xmlin" }, + { .dir = "tests/storagevolxml2xmlout" }, + { .dir = "tests/storagevolschemadata" }, +}; + + static int mymain(void) { int ret = 0; - struct testSchemaData data; - - memset(&data, 0, sizeof(data)); - -#define DO_TEST_DIR(sch, ...) \ - do { \ - data.schema = sch; \ - if (virTestRun("test schema grammar file: " sch, \ - testSchemaGrammar, &data) == 0) { \ - /* initialize the validator even if the schema test \ - * was skipped because of VIR_TEST_RANGE */ \ - if (!data.validator && testSchemaGrammar(&data) < 0) { \ - ret = -1; \ - break; \ - } \ - if (testSchemaDirs(sch, data.validator, __VA_ARGS__, NULL) < 0) \ - ret = -1; \ - \ - virXMLValidatorFree(data.validator); \ - data.validator = NULL; \ - } else { \ - ret = -1; \ - } \ - } while (0) - -#define DO_TEST_FILE(sch, xmlfile) \ - do { \ - data.schema = sch; \ - data.xml_path = abs_srcdir "/" xmlfile; \ - if (virTestRun("test schema grammar file: " sch, \ - testSchemaGrammar, &data) == 0) { \ - /* initialize the validator even if the schema test \ - * was skipped because of VIR_TEST_RANGE */ \ - if (!data.validator && testSchemaGrammar(&data) < 0) { \ - ret = -1; \ - break; \ - } \ - if (virTestRun("Checking " xmlfile " against " sch, \ - testSchemaFile, &data) < 0) \ - ret = -1; \ - \ - virXMLValidatorFree(data.validator); \ - data.validator = NULL; \ - } else { \ - ret = -1; \ - } \ - } while (0) - - DO_TEST_DIR("capability.rng", "capabilityschemadata", "vircaps2xmldata"); - DO_TEST_DIR("domain.rng", "domainschemadata", - "qemuxml2argvdata", "xmconfigdata", - "qemuxml2xmloutdata", "lxcxml2xmldata", - "lxcxml2xmloutdata", "bhyvexml2argvdata", - "bhyvexml2xmloutdata", "genericxml2xmlindata", - "genericxml2xmloutdata", "xlconfigdata", "libxlxml2domconfigdata", - "qemuhotplugtestdomains"); - DO_TEST_DIR("domaincaps.rng", "domaincapsdata"); - DO_TEST_DIR("domainbackup.rng", "domainbackupxml2xmlin", - "domainbackupxml2xmlout"); - DO_TEST_DIR("domaincheckpoint.rng", "qemudomaincheckpointxml2xmlin", - "qemudomaincheckpointxml2xmlout"); - DO_TEST_DIR("domainsnapshot.rng", "qemudomainsnapshotxml2xmlin", - "qemudomainsnapshotxml2xmlout"); - DO_TEST_DIR("interface.rng", "interfaceschemadata"); - DO_TEST_DIR("network.rng", "../src/network", "networkxml2xmlin", - "networkxml2xmlout", "networkxml2confdata"); - DO_TEST_DIR("networkport.rng", "virnetworkportxml2xmldata"); - DO_TEST_DIR("nodedev.rng", "nodedevschemadata"); - DO_TEST_DIR("nwfilter.rng", "nwfilterxml2xmlout", "../src/nwfilter"); - DO_TEST_DIR("nwfilterbinding.rng", "virnwfilterbindingxml2xmldata"); - DO_TEST_DIR("secret.rng", "secretxml2xmlin"); - DO_TEST_DIR("storagepoolcaps.rng", "storagepoolcapsschemadata"); - DO_TEST_DIR("storagepool.rng", "storagepoolxml2xmlin", "storagepoolxml2xmlout", - "storagepoolschemadata"); - DO_TEST_DIR("storagevol.rng", "storagevolxml2xmlin", "storagevolxml2xmlout", - "storagevolschemadata"); + +#define DO_TEST(sch, ent) \ + if (testSchemaEntries((sch), (ent), G_N_ELEMENTS(ent)) < 0) \ + ret = -1; + + DO_TEST("docs/schemas/capability.rng", schemaCapability); + DO_TEST("docs/schemas/domain.rng", schemaDomain); + DO_TEST("docs/schemas/domaincaps.rng", schemaDomainCaps); + DO_TEST("docs/schemas/domainbackup.rng", schemaDomainBackup); + DO_TEST("docs/schemas/domaincheckpoint.rng", schemaDomainCheckpoint); + DO_TEST("docs/schemas/domainsnapshot.rng", schemaDomainSnapshot); + DO_TEST("docs/schemas/interface.rng", schemaInterface); + DO_TEST("docs/schemas/network.rng", schemaNetwork); + DO_TEST("docs/schemas/networkport.rng", schemaNetworkport); + DO_TEST("docs/schemas/nodedev.rng", schemaNodedev); + DO_TEST("docs/schemas/nwfilter.rng", schemaNwfilter); + DO_TEST("docs/schemas/nwfilterbinding.rng", schemaNwfilterbinding); + DO_TEST("docs/schemas/secret.rng", schemaSecret); + DO_TEST("docs/schemas/storagepoolcaps.rng", schemaStoragepoolcaps); + DO_TEST("docs/schemas/storagepool.rng", schemaStoragePool); + DO_TEST("docs/schemas/storagevol.rng", schemaStorageVol); return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; } -- 2.26.2

In some cases we have directories with mixed XML files in the test suite. Adding regex filtering will allow testing subsets of the XML files against schema. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/virschematest.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/tests/virschematest.c b/tests/virschematest.c index e6e176eef3..7d7db3e354 100644 --- a/tests/virschematest.c +++ b/tests/virschematest.c @@ -32,6 +32,10 @@ VIR_LOG_INIT("tests.schematest"); struct testSchemaEntry { const char *dir; + /* if dirRegex is non-NULL the provided regular expression is used to match + * the file names in a directory (without path prefixed) and only matching + * files are validated */ + const char *dirRegex; const char *file; }; @@ -79,18 +83,29 @@ testSchemaFile(const char *schema, static int testSchemaDir(const char *schema, virXMLValidatorPtr validator, - const char *dir_path) + const char *dir_path, + const char *filterstr) { DIR *dir = NULL; struct dirent *ent; int ret = 0; int rc; + g_autoptr(GRegex) filter = NULL; if (virDirOpen(&dir, dir_path) < 0) { virTestPropagateLibvirtError(); return -1; } + if (filterstr) { + g_autoptr(GError) err = NULL; + + if (!(filter = g_regex_new(filterstr, 0, 0, &err))) { + VIR_TEST_VERBOSE("\nfailed to compile regex '%s': %s", filterstr, err->message); + return -1; + } + } + while ((rc = virDirRead(dir, &ent, dir_path)) > 0) { g_autofree char *xml_path = NULL; @@ -98,6 +113,9 @@ testSchemaDir(const char *schema, continue; if (ent->d_name[0] == '.') continue; + if (filter && + !g_regex_match(filter, ent->d_name, 0, NULL)) + continue; xml_path = g_strdup_printf("%s/%s", dir_path, ent->d_name); @@ -176,7 +194,7 @@ testSchemaEntries(const char *schema, if (entry->dir) { g_autofree char *path = g_strdup_printf("%s/%s", abs_top_srcdir, entry->dir); - if (testSchemaDir(schema, validator, path) < 0) + if (testSchemaDir(schema, validator, path, entry->dirRegex) < 0) ret = -1; } -- 2.26.2

Schema mandates a '<dir>' element, not '<directory>'. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- examples/xml/storage/pool-netfs.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/xml/storage/pool-netfs.xml b/examples/xml/storage/pool-netfs.xml index d1df2e2b7c..446d4b41bd 100644 --- a/examples/xml/storage/pool-netfs.xml +++ b/examples/xml/storage/pool-netfs.xml @@ -2,7 +2,7 @@ <name>virtimages</name> <source> <host name="nfs.example.com"/> - <directory path="/var/lib/virt/images"/> + <dir path="/var/lib/virt/images"/> </source> <target> <path>/var/lib/virt/images</path> -- 2.26.2

Our schema forces a <target/> element which was not present in the files. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- examples/xml/storage/vol-raw.xml | 3 +++ examples/xml/storage/vol-sparse.xml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/examples/xml/storage/vol-raw.xml b/examples/xml/storage/vol-raw.xml index bc4e049a35..e6c5a28a25 100644 --- a/examples/xml/storage/vol-raw.xml +++ b/examples/xml/storage/vol-raw.xml @@ -2,4 +2,7 @@ <name>raw.img</name> <allocation unit="M">10</allocation> <capacity unit="M">1000</capacity> + <target> + <format type="raw"/> + </target> </volume> diff --git a/examples/xml/storage/vol-sparse.xml b/examples/xml/storage/vol-sparse.xml index 2ec9f0b748..21f14a4ac7 100644 --- a/examples/xml/storage/vol-sparse.xml +++ b/examples/xml/storage/vol-sparse.xml @@ -2,4 +2,7 @@ <name>sparse.img</name> <allocation>0</allocation> <capacity unit="T">1</capacity> + <target> + <format type="raw"/> + </target> </volume> -- 2.26.2

Match the correct subsets of the files via the 'dirRegex' property. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/virschematest.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/virschematest.c b/tests/virschematest.c index 7d7db3e354..29cd5cc6e3 100644 --- a/tests/virschematest.c +++ b/tests/virschematest.c @@ -290,12 +290,16 @@ static const struct testSchemaEntry schemaStoragePool[] = { { .dir = "tests/storagepoolxml2xmlin" }, { .dir = "tests/storagepoolxml2xmlout" }, { .dir = "tests/storagepoolschemadata" }, + { .dir = "examples/xml/storage", + .dirRegex = "pool-.*" }, }; static const struct testSchemaEntry schemaStorageVol[] = { { .dir = "tests/storagevolxml2xmlin" }, { .dir = "tests/storagevolxml2xmlout" }, { .dir = "tests/storagevolschemadata" }, + { .dir = "examples/xml/storage", + .dirRegex = "vol-.*" }, }; -- 2.26.2

Add all appropriate file from our test driver example XML directory. Note that the two 'node.*' files are actually custom for the test driver to load full state. We don't have a schema for them. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/virschematest.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/virschematest.c b/tests/virschematest.c index 29cd5cc6e3..816305d776 100644 --- a/tests/virschematest.c +++ b/tests/virschematest.c @@ -229,6 +229,8 @@ static const struct testSchemaEntry schemaDomain[] = { { .dir = "tests/xlconfigdata" }, { .dir = "tests/libxlxml2domconfigdata" }, { .dir = "tests/qemuhotplugtestdomains" }, + { .dir = "examples/xml/test/", + .dirRegex = "testdom.*" }, }; static const struct testSchemaEntry schemaDomainCaps[] = { @@ -259,6 +261,8 @@ static const struct testSchemaEntry schemaNetwork[] = { { .dir = "tests/networkxml2xmlin" }, { .dir = "tests/networkxml2xmlout" }, { .dir = "tests/networkxml2confdata" }, + { .dir = "examples/xml/test/", + .dirRegex = "testnet.*" }, }; static const struct testSchemaEntry schemaNetworkport[] = { @@ -267,6 +271,7 @@ static const struct testSchemaEntry schemaNetworkport[] = { static const struct testSchemaEntry schemaNodedev[] = { { .dir = "tests/nodedevschemadata" }, + { .file = "examples/xml/test/testdev.xml" }, }; static const struct testSchemaEntry schemaNwfilter[] = { @@ -292,6 +297,7 @@ static const struct testSchemaEntry schemaStoragePool[] = { { .dir = "tests/storagepoolschemadata" }, { .dir = "examples/xml/storage", .dirRegex = "pool-.*" }, + { .file = "examples/xml/test/testpool.xml" }, }; static const struct testSchemaEntry schemaStorageVol[] = { @@ -300,6 +306,7 @@ static const struct testSchemaEntry schemaStorageVol[] = { { .dir = "tests/storagevolschemadata" }, { .dir = "examples/xml/storage", .dirRegex = "vol-.*" }, + { .file = "examples/xml/test/testvol.xml" }, }; -- 2.26.2

The files are under 'src/nwfilter/xml' Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/virschematest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/virschematest.c b/tests/virschematest.c index 816305d776..0a1639bf44 100644 --- a/tests/virschematest.c +++ b/tests/virschematest.c @@ -276,7 +276,7 @@ static const struct testSchemaEntry schemaNodedev[] = { static const struct testSchemaEntry schemaNwfilter[] = { { .dir = "tests/nwfilterxml2xmlout" }, - { .dir = "src/nwfilter" }, + { .dir = "src/nwfilter/xml" }, }; static const struct testSchemaEntry schemaNwfilterbinding[] = { -- 2.26.2

The element is not needed for the test and doesn't conform to the domain XML schema. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/domainconfdata/getfilesystem.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/domainconfdata/getfilesystem.xml b/tests/domainconfdata/getfilesystem.xml index 2ee78b4eb9..2d8c963eaf 100644 --- a/tests/domainconfdata/getfilesystem.xml +++ b/tests/domainconfdata/getfilesystem.xml @@ -6,7 +6,6 @@ <vcpu placement='static'>1</vcpu> <os> <type arch='x86_64'>hvm</type> - <init>/bin/sh</init> </os> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> -- 2.26.2

The test case is invoked using DO_TEST_FAIL so the XML files are actually unexpected, unused and actually don't even conform to the RNG schema for <domain>. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../bhyveargv2xml-console2.xml | 15 ----------- .../bhyveargv2xml-console3.xml | 27 ------------------- .../bhyveargv2xml-console4.xml | 15 ----------- 3 files changed, 57 deletions(-) delete mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-console2.xml delete mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-console3.xml delete mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-console4.xml diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-console2.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-console2.xml deleted file mode 100644 index 12467e968b..0000000000 --- a/tests/bhyveargv2xmldata/bhyveargv2xml-console2.xml +++ /dev/null @@ -1,15 +0,0 @@ -<domain type='bhyve'> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>219136</memory> - <currentMemory unit='KiB'>219136</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type>hvm</type> - </os> - <clock offset='localtime'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>destroy</on_reboot> - <on_crash>destroy</on_crash> - <devices> - </devices> -</domain> diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-console3.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-console3.xml deleted file mode 100644 index 2aea6c46d0..0000000000 --- a/tests/bhyveargv2xmldata/bhyveargv2xml-console3.xml +++ /dev/null @@ -1,27 +0,0 @@ -<domain type='bhyve'> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>219136</memory> - <currentMemory unit='KiB'>219136</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type>hvm</type> - </os> - <clock offset='localtime'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>destroy</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <serial type='nmdm'> - <source master='/dev/nmdm0A' slave='/dev/nmdm0B'/> - <target port='0'/> - </serial> - <serial type='nmdm'> - <source master='/dev/nmdm1B' slave='/dev/nmdm1A'/> - <target port='1'/> - </serial> - <console type='nmdm'> - <source master='/dev/nmdm0A' slave='/dev/nmdm0B'/> - <target type='serial' port='0'/> - </console> - </devices> -</domain> diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-console4.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-console4.xml deleted file mode 100644 index 12467e968b..0000000000 --- a/tests/bhyveargv2xmldata/bhyveargv2xml-console4.xml +++ /dev/null @@ -1,15 +0,0 @@ -<domain type='bhyve'> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>219136</memory> - <currentMemory unit='KiB'>219136</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type>hvm</type> - </os> - <clock offset='localtime'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>destroy</on_reboot> - <on_crash>destroy</on_crash> - <devices> - </devices> -</domain> -- 2.26.2

Peter Krempa wrote:
The test case is invoked using DO_TEST_FAIL so the XML files are actually unexpected, unused and actually don't even conform to the RNG schema for <domain>.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../bhyveargv2xml-console2.xml | 15 ----------- .../bhyveargv2xml-console3.xml | 27 ------------------- .../bhyveargv2xml-console4.xml | 15 ----------- 3 files changed, 57 deletions(-) delete mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-console2.xml delete mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-console3.xml delete mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-console4.xml
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com> Roman Bogorodskiy

Add the proper video device type when parsing bhyve's commandline into a XML. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/bhyve/bhyve_parse_command.c | 2 ++ tests/bhyveargv2xmldata/bhyveargv2xml-vnc-listen.xml | 2 +- tests/bhyveargv2xmldata/bhyveargv2xml-vnc-password.xml | 2 +- tests/bhyveargv2xmldata/bhyveargv2xml-vnc-resolution.xml | 2 +- tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-io.xml | 2 +- tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-off.xml | 2 +- tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-on.xml | 2 +- tests/bhyveargv2xmldata/bhyveargv2xml-vnc.xml | 2 +- 8 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/bhyve/bhyve_parse_command.c b/src/bhyve/bhyve_parse_command.c index 969e782b27..4f1d384da1 100644 --- a/src/bhyve/bhyve_parse_command.c +++ b/src/bhyve/bhyve_parse_command.c @@ -573,6 +573,8 @@ bhyveParsePCIFbuf(virDomainDefPtr def, if (!(video = virDomainVideoDefNew(xmlopt))) goto cleanup; + video->type = VIR_DOMAIN_VIDEO_TYPE_GOP; + if (!(graphics = virDomainGraphicsDefNew(xmlopt))) goto cleanup; diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-listen.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-listen.xml index 4ab17aef81..616f8e180e 100644 --- a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-listen.xml +++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-listen.xml @@ -16,7 +16,7 @@ <listen type='address' address='1.2.3.4'/> </graphics> <video> - <model type='default' heads='1'/> + <model type='gop' heads='1'/> </video> </devices> </domain> diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-password.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-password.xml index 456a1ee9e3..be15a20d91 100644 --- a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-password.xml +++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-password.xml @@ -16,7 +16,7 @@ <listen type='address' address='127.0.0.1'/> </graphics> <video> - <model type='default' heads='1'/> + <model type='gop' heads='1'/> </video> </devices> </domain> diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-resolution.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-resolution.xml index f8fa0ed1ce..662961ba0d 100644 --- a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-resolution.xml +++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-resolution.xml @@ -16,7 +16,7 @@ <listen type='address' address='127.0.0.1'/> </graphics> <video> - <model type='default' heads='1'> + <model type='gop' heads='1'> <resolution x='1920' y='1080'/> </model> </video> diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-io.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-io.xml index 1e2f3d6938..4ead57217a 100644 --- a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-io.xml +++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-io.xml @@ -16,7 +16,7 @@ <listen type='address' address='127.0.0.1'/> </graphics> <video> - <model type='default' heads='1'/> + <model type='gop' heads='1'/> </video> </devices> </domain> diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-off.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-off.xml index 3c9c76e5aa..0623938b65 100644 --- a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-off.xml +++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-off.xml @@ -17,7 +17,7 @@ </graphics> <video> <driver vgaconf='off'/> - <model type='default' heads='1'/> + <model type='gop' heads='1'/> </video> </devices> </domain> diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-on.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-on.xml index b83772c47a..01aa559cb4 100644 --- a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-on.xml +++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-on.xml @@ -17,7 +17,7 @@ </graphics> <video> <driver vgaconf='on'/> - <model type='default' heads='1'/> + <model type='gop' heads='1'/> </video> </devices> </domain> diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc.xml index 1e2f3d6938..4ead57217a 100644 --- a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc.xml +++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc.xml @@ -16,7 +16,7 @@ <listen type='address' address='127.0.0.1'/> </graphics> <video> - <model type='default' heads='1'/> + <model type='gop' heads='1'/> </video> </devices> </domain> -- 2.26.2

Peter Krempa wrote:
Add the proper video device type when parsing bhyve's commandline into a XML.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/bhyve/bhyve_parse_command.c | 2 ++ tests/bhyveargv2xmldata/bhyveargv2xml-vnc-listen.xml | 2 +- tests/bhyveargv2xmldata/bhyveargv2xml-vnc-password.xml | 2 +- tests/bhyveargv2xmldata/bhyveargv2xml-vnc-resolution.xml | 2 +- tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-io.xml | 2 +- tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-off.xml | 2 +- tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-on.xml | 2 +- tests/bhyveargv2xmldata/bhyveargv2xml-vnc.xml | 2 +- 8 files changed, 9 insertions(+), 7 deletions(-)
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com> Roman Bogorodskiy

The parser for the 'ipsetflags' accepts the 'src' and 'dst' values stripping case. Express the same in the schema to pass validation of any accepted string. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- docs/schemas/nwfilter.rng | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/schemas/nwfilter.rng b/docs/schemas/nwfilter.rng index 75caf61b89..64a607e62f 100644 --- a/docs/schemas/nwfilter.rng +++ b/docs/schemas/nwfilter.rng @@ -980,7 +980,7 @@ <define name="ipset-flags-type"> <data type="string"> - <param name="pattern">(src|dst)(,(src|dst)){0,5}</param> + <param name="pattern">([Ss][Rr][Cc]|[Dd][Ss][Tt])(,([Ss][Rr][Cc]|[Dd][Ss][Tt])){0,5}</param> </data> </define> </grammar> -- 2.26.2

The reference string parser tolerates some leading/trailing whitespace for the reference strings as witnessed by tests/nwfilterxml2xmlin/iter-test3.xml Allow them in the schema so that the test passes schema validation. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- docs/schemas/nwfilter.rng | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/schemas/nwfilter.rng b/docs/schemas/nwfilter.rng index 64a607e62f..a75de7ed3e 100644 --- a/docs/schemas/nwfilter.rng +++ b/docs/schemas/nwfilter.rng @@ -725,7 +725,7 @@ <define name="variable-name-type"> <data type="string"> - <param name="pattern">$[a-zA-Z0-9_]+(\[[ ]*[@]?[0-9]+[ ]*\])?</param> + <param name="pattern">$[ ]*[a-zA-Z0-9_]+(\[[ ]*[@]?[0-9]+[ ]*\])?[ ]*</param> </data> </define> -- 2.26.2

Fix the 'flags' of the last rule to conform to the RNG schema. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/nwfilterxml2firewalldata/tcp.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/nwfilterxml2firewalldata/tcp.xml b/tests/nwfilterxml2firewalldata/tcp.xml index 14ebd35d38..1321f1a513 100644 --- a/tests/nwfilterxml2firewalldata/tcp.xml +++ b/tests/nwfilterxml2firewalldata/tcp.xml @@ -29,6 +29,6 @@ <tcp state='NONE' flags='RST/NONE'/> </rule> <rule action='accept' direction='in'> - <tcp state='NONE' flags='PSH/'/> + <tcp state='NONE' flags='PSH/NONE'/> </rule> </filter> -- 2.26.2

There's quite a few negative tests. In anticipation of schema testing of the 'nwfilterxml2xmlin' directory rename all negative/non-conformant XMLs with the -invalid suffix. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- ...ipv6-test.xml => ah-ipv6-test-invalid.xml} | 0 ...pv6-test.xml => all-ipv6-test-invalid.xml} | 0 .../{arp-test.xml => arp-test-invalid.xml} | 0 ...est1.xml => chain_prefixtest1-invalid.xml} | 0 ...ment-test.xml => comment-test-invalid.xml} | 0 ...pv6-test.xml => esp-ipv6-test-invalid.xml} | 0 ...ata-test.xml => hex-data-test-invalid.xml} | 0 .../{icmp-test.xml => icmp-test-invalid.xml} | 0 ...cmpv6-test.xml => icmpv6-test-invalid.xml} | 0 .../{ip-test.xml => ip-test-invalid.xml} | 0 .../{ipv6-test.xml => ipv6-test-invalid.xml} | 0 .../{mac-test.xml => mac-test-invalid.xml} | 0 .../{rarp-test.xml => rarp-test-invalid.xml} | 0 ...v6-test.xml => sctp-ipv6-test-invalid.xml} | 0 .../{sctp-test.xml => sctp-test-invalid.xml} | 0 ...pv6-test.xml => tcp-ipv6-test-invalid.xml} | 0 .../{tcp-test.xml => tcp-test-invalid.xml} | 0 ...pv6-test.xml => udp-ipv6-test-invalid.xml} | 0 .../{udp-test.xml => udp-test-invalid.xml} | 0 ...test.xml => udplite-ipv6-test-invalid.xml} | 0 .../{vlan-test.xml => vlan-test-invalid.xml} | 0 tests/nwfilterxml2xmltest.c | 44 +++++++++---------- 22 files changed, 22 insertions(+), 22 deletions(-) rename tests/nwfilterxml2xmlin/{ah-ipv6-test.xml => ah-ipv6-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{all-ipv6-test.xml => all-ipv6-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{arp-test.xml => arp-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{chain_prefixtest1.xml => chain_prefixtest1-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{comment-test.xml => comment-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{esp-ipv6-test.xml => esp-ipv6-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{hex-data-test.xml => hex-data-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{icmp-test.xml => icmp-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{icmpv6-test.xml => icmpv6-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{ip-test.xml => ip-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{ipv6-test.xml => ipv6-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{mac-test.xml => mac-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{rarp-test.xml => rarp-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{sctp-ipv6-test.xml => sctp-ipv6-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{sctp-test.xml => sctp-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{tcp-ipv6-test.xml => tcp-ipv6-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{tcp-test.xml => tcp-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{udp-ipv6-test.xml => udp-ipv6-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{udp-test.xml => udp-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{udplite-ipv6-test.xml => udplite-ipv6-test-invalid.xml} (100%) rename tests/nwfilterxml2xmlin/{vlan-test.xml => vlan-test-invalid.xml} (100%) diff --git a/tests/nwfilterxml2xmlin/ah-ipv6-test.xml b/tests/nwfilterxml2xmlin/ah-ipv6-test-invalid.xml similarity index 100% rename from tests/nwfilterxml2xmlin/ah-ipv6-test.xml rename to tests/nwfilterxml2xmlin/ah-ipv6-test-invalid.xml diff --git a/tests/nwfilterxml2xmlin/all-ipv6-test.xml b/tests/nwfilterxml2xmlin/all-ipv6-test-invalid.xml similarity index 100% rename from tests/nwfilterxml2xmlin/all-ipv6-test.xml rename to tests/nwfilterxml2xmlin/all-ipv6-test-invalid.xml diff --git a/tests/nwfilterxml2xmlin/arp-test.xml b/tests/nwfilterxml2xmlin/arp-test-invalid.xml similarity index 100% rename from tests/nwfilterxml2xmlin/arp-test.xml rename to tests/nwfilterxml2xmlin/arp-test-invalid.xml diff --git a/tests/nwfilterxml2xmlin/chain_prefixtest1.xml b/tests/nwfilterxml2xmlin/chain_prefixtest1-invalid.xml similarity index 100% rename from tests/nwfilterxml2xmlin/chain_prefixtest1.xml rename to tests/nwfilterxml2xmlin/chain_prefixtest1-invalid.xml diff --git a/tests/nwfilterxml2xmlin/comment-test.xml b/tests/nwfilterxml2xmlin/comment-test-invalid.xml similarity index 100% rename from tests/nwfilterxml2xmlin/comment-test.xml rename to tests/nwfilterxml2xmlin/comment-test-invalid.xml diff --git a/tests/nwfilterxml2xmlin/esp-ipv6-test.xml b/tests/nwfilterxml2xmlin/esp-ipv6-test-invalid.xml similarity index 100% rename from tests/nwfilterxml2xmlin/esp-ipv6-test.xml rename to tests/nwfilterxml2xmlin/esp-ipv6-test-invalid.xml diff --git a/tests/nwfilterxml2xmlin/hex-data-test.xml b/tests/nwfilterxml2xmlin/hex-data-test-invalid.xml similarity index 100% rename from tests/nwfilterxml2xmlin/hex-data-test.xml rename to tests/nwfilterxml2xmlin/hex-data-test-invalid.xml diff --git a/tests/nwfilterxml2xmlin/icmp-test.xml b/tests/nwfilterxml2xmlin/icmp-test-invalid.xml similarity index 100% rename from tests/nwfilterxml2xmlin/icmp-test.xml rename to tests/nwfilterxml2xmlin/icmp-test-invalid.xml diff --git a/tests/nwfilterxml2xmlin/icmpv6-test.xml b/tests/nwfilterxml2xmlin/icmpv6-test-invalid.xml similarity index 100% rename from tests/nwfilterxml2xmlin/icmpv6-test.xml rename to tests/nwfilterxml2xmlin/icmpv6-test-invalid.xml diff --git a/tests/nwfilterxml2xmlin/ip-test.xml b/tests/nwfilterxml2xmlin/ip-test-invalid.xml similarity index 100% rename from tests/nwfilterxml2xmlin/ip-test.xml rename to tests/nwfilterxml2xmlin/ip-test-invalid.xml diff --git a/tests/nwfilterxml2xmlin/ipv6-test.xml b/tests/nwfilterxml2xmlin/ipv6-test-invalid.xml similarity index 100% rename from tests/nwfilterxml2xmlin/ipv6-test.xml rename to tests/nwfilterxml2xmlin/ipv6-test-invalid.xml diff --git a/tests/nwfilterxml2xmlin/mac-test.xml b/tests/nwfilterxml2xmlin/mac-test-invalid.xml similarity index 100% rename from tests/nwfilterxml2xmlin/mac-test.xml rename to tests/nwfilterxml2xmlin/mac-test-invalid.xml diff --git a/tests/nwfilterxml2xmlin/rarp-test.xml b/tests/nwfilterxml2xmlin/rarp-test-invalid.xml similarity index 100% rename from tests/nwfilterxml2xmlin/rarp-test.xml rename to tests/nwfilterxml2xmlin/rarp-test-invalid.xml diff --git a/tests/nwfilterxml2xmlin/sctp-ipv6-test.xml b/tests/nwfilterxml2xmlin/sctp-ipv6-test-invalid.xml similarity index 100% rename from tests/nwfilterxml2xmlin/sctp-ipv6-test.xml rename to tests/nwfilterxml2xmlin/sctp-ipv6-test-invalid.xml diff --git a/tests/nwfilterxml2xmlin/sctp-test.xml b/tests/nwfilterxml2xmlin/sctp-test-invalid.xml similarity index 100% rename from tests/nwfilterxml2xmlin/sctp-test.xml rename to tests/nwfilterxml2xmlin/sctp-test-invalid.xml diff --git a/tests/nwfilterxml2xmlin/tcp-ipv6-test.xml b/tests/nwfilterxml2xmlin/tcp-ipv6-test-invalid.xml similarity index 100% rename from tests/nwfilterxml2xmlin/tcp-ipv6-test.xml rename to tests/nwfilterxml2xmlin/tcp-ipv6-test-invalid.xml diff --git a/tests/nwfilterxml2xmlin/tcp-test.xml b/tests/nwfilterxml2xmlin/tcp-test-invalid.xml similarity index 100% rename from tests/nwfilterxml2xmlin/tcp-test.xml rename to tests/nwfilterxml2xmlin/tcp-test-invalid.xml diff --git a/tests/nwfilterxml2xmlin/udp-ipv6-test.xml b/tests/nwfilterxml2xmlin/udp-ipv6-test-invalid.xml similarity index 100% rename from tests/nwfilterxml2xmlin/udp-ipv6-test.xml rename to tests/nwfilterxml2xmlin/udp-ipv6-test-invalid.xml diff --git a/tests/nwfilterxml2xmlin/udp-test.xml b/tests/nwfilterxml2xmlin/udp-test-invalid.xml similarity index 100% rename from tests/nwfilterxml2xmlin/udp-test.xml rename to tests/nwfilterxml2xmlin/udp-test-invalid.xml diff --git a/tests/nwfilterxml2xmlin/udplite-ipv6-test.xml b/tests/nwfilterxml2xmlin/udplite-ipv6-test-invalid.xml similarity index 100% rename from tests/nwfilterxml2xmlin/udplite-ipv6-test.xml rename to tests/nwfilterxml2xmlin/udplite-ipv6-test-invalid.xml diff --git a/tests/nwfilterxml2xmlin/vlan-test.xml b/tests/nwfilterxml2xmlin/vlan-test-invalid.xml similarity index 100% rename from tests/nwfilterxml2xmlin/vlan-test.xml rename to tests/nwfilterxml2xmlin/vlan-test-invalid.xml diff --git a/tests/nwfilterxml2xmltest.c b/tests/nwfilterxml2xmltest.c index 52a4af12cc..9def1e2634 100644 --- a/tests/nwfilterxml2xmltest.c +++ b/tests/nwfilterxml2xmltest.c @@ -89,32 +89,32 @@ mymain(void) ret = -1; \ } while (0) - DO_TEST("mac-test", true); - DO_TEST("vlan-test", true); + DO_TEST("mac-test-invalid", true); + DO_TEST("vlan-test-invalid", true); DO_TEST("stp-test", false); - DO_TEST("arp-test", true); - DO_TEST("rarp-test", true); - DO_TEST("ip-test", true); - DO_TEST("ipv6-test", true); - - DO_TEST("tcp-test", true); - DO_TEST("udp-test", true); - DO_TEST("icmp-test", true); + DO_TEST("arp-test-invalid", true); + DO_TEST("rarp-test-invalid", true); + DO_TEST("ip-test-invalid", true); + DO_TEST("ipv6-test-invalid", true); + + DO_TEST("tcp-test-invalid", true); + DO_TEST("udp-test-invalid", true); + DO_TEST("icmp-test-invalid", true); DO_TEST("igmp-test", false); - DO_TEST("sctp-test", true); + DO_TEST("sctp-test-invalid", true); DO_TEST("udplite-test", false); DO_TEST("esp-test", false); DO_TEST("ah-test", false); DO_TEST("all-test", false); - DO_TEST("tcp-ipv6-test", true); - DO_TEST("udp-ipv6-test", true); - DO_TEST("icmpv6-test", true); - DO_TEST("sctp-ipv6-test", true); - DO_TEST("udplite-ipv6-test", true); - DO_TEST("esp-ipv6-test", true); - DO_TEST("ah-ipv6-test", true); - DO_TEST("all-ipv6-test", true); + DO_TEST("tcp-ipv6-test-invalid", true); + DO_TEST("udp-ipv6-test-invalid", true); + DO_TEST("icmpv6-test-invalid", true); + DO_TEST("sctp-ipv6-test-invalid", true); + DO_TEST("udplite-ipv6-test-invalid", true); + DO_TEST("esp-ipv6-test-invalid", true); + DO_TEST("ah-ipv6-test-invalid", true); + DO_TEST("all-ipv6-test-invalid", true); DO_TEST("ref-test", false); DO_TEST("ref-rule-test", false); @@ -125,14 +125,14 @@ mymain(void) DO_TEST("conntrack-test", false); - DO_TEST("hex-data-test", true); + DO_TEST("hex-data-test-invalid", true); - DO_TEST("comment-test", true); + DO_TEST("comment-test-invalid", true); DO_TEST("example-1", false); DO_TEST("example-2", false); - DO_TEST("chain_prefixtest1", true); /* derived from arp-test */ + DO_TEST("chain_prefixtest1-invalid", true); /* derived from arp-test */ DO_TEST("attr-value-test", false); DO_TEST("iter-test1", false); -- 2.26.2

The 'vmware' private namespace wasn't present in our schema definition making all XMLs having the <datacenterpath> element invalid. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- docs/schemas/domaincommon.rng | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 7d4b105981..3ebffd9db3 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -90,6 +90,9 @@ <optional> <ref name="xencmdline"/> </optional> + <optional> + <ref name="vmwaredatacenterpath"/> + </optional> </interleave> </element> </define> @@ -6823,6 +6826,16 @@ </element> </define> + <!-- + Optional hypervisor extensions in their own namespace: + vmware + --> + <define name="vmwaredatacenterpath"> + <element name="datacenterpath" ns="http://libvirt.org/schemas/domain/vmware/1.0"> + <text/> + </element> + </define> + <!-- Type library --> -- 2.26.2

vmware's network names can contain space and they are used as bridge source. Modify the schema to allow it. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- docs/schemas/domaincommon.rng | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 3ebffd9db3..41c256b653 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -2879,7 +2879,9 @@ <define name="interface-bridge-attributes"> <attribute name="bridge"> - <ref name="deviceName"/> + <data type="string"> + <param name="pattern">[a-zA-Z0-9_\.\-\\:/ ]*</param> + </data> </attribute> <optional> <attribute name="macTableManager"> -- 2.26.2

The vmx tests use fake paths for files which in some cases didn't start with a /. Since libvirt's schema mandates full paths and the representation used in the tests is only internal to the tests we'll add a leading / to the paths to conform to the schema. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml | 2 +- tests/vmx2xmldata/vmx2xml-case-insensitive-2.xml | 2 +- tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml | 2 +- tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml | 2 +- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-1.xml | 2 +- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml | 6 +++--- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml | 6 +++--- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-4.xml | 8 ++++---- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml | 4 ++-- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-6.xml | 2 +- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-7.xml | 2 +- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.xml | 6 +++--- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-9.xml | 2 +- tests/vmx2xmldata/vmx2xml-floppy-file.xml | 4 ++-- tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml | 2 +- tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-1.xml | 2 +- tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-2.xml | 2 +- tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-3.xml | 2 +- tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-4.xml | 2 +- tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml | 2 +- tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml | 2 +- tests/vmx2xmldata/vmx2xml-harddisk-transient.xml | 2 +- tests/vmx2xmldata/vmx2xml-parallel-file.xml | 2 +- tests/vmx2xmldata/vmx2xml-scsi-driver.xml | 8 ++++---- tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml | 2 +- tests/vmx2xmldata/vmx2xml-serial-file.xml | 4 ++-- tests/vmx2xmltest.c | 4 ++-- tests/xml2vmxdata/xml2vmx-cdrom-ide-file.xml | 2 +- tests/xml2vmxdata/xml2vmx-cdrom-scsi-file.xml | 2 +- tests/xml2vmxdata/xml2vmx-esx-in-the-wild-1.xml | 2 +- tests/xml2vmxdata/xml2vmx-esx-in-the-wild-2.xml | 6 +++--- tests/xml2vmxdata/xml2vmx-esx-in-the-wild-3.xml | 6 +++--- tests/xml2vmxdata/xml2vmx-esx-in-the-wild-4.xml | 8 ++++---- tests/xml2vmxdata/xml2vmx-esx-in-the-wild-5.xml | 4 ++-- tests/xml2vmxdata/xml2vmx-esx-in-the-wild-6.xml | 2 +- tests/xml2vmxdata/xml2vmx-esx-in-the-wild-7.xml | 2 +- tests/xml2vmxdata/xml2vmx-esx-in-the-wild-9.xml | 2 +- tests/xml2vmxdata/xml2vmx-floppy-file.xml | 4 ++-- tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.xml | 2 +- tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-1.xml | 2 +- tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-2.xml | 2 +- tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-3.xml | 2 +- tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-4.xml | 2 +- tests/xml2vmxdata/xml2vmx-harddisk-ide-file.xml | 2 +- tests/xml2vmxdata/xml2vmx-harddisk-scsi-file.xml | 2 +- tests/xml2vmxdata/xml2vmx-parallel-file.xml | 2 +- tests/xml2vmxdata/xml2vmx-scsi-driver.xml | 8 ++++---- tests/xml2vmxdata/xml2vmx-scsi-writethrough.xml | 2 +- tests/xml2vmxdata/xml2vmx-serial-file.xml | 2 +- tests/xml2vmxtest.c | 4 ++-- 50 files changed, 79 insertions(+), 79 deletions(-) diff --git a/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml b/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml index 7cb6413941..97fa300c18 100644 --- a/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml +++ b/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml @@ -16,7 +16,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/FEDORA11.VMDK'/> + <source file='/[datastore] directory/FEDORA11.VMDK'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-case-insensitive-2.xml b/tests/vmx2xmldata/vmx2xml-case-insensitive-2.xml index 188c3f3cd5..499eb1ec38 100644 --- a/tests/vmx2xmldata/vmx2xml-case-insensitive-2.xml +++ b/tests/vmx2xmldata/vmx2xml-case-insensitive-2.xml @@ -16,7 +16,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/fedora11.vmdk'/> + <source file='/[datastore] directory/fedora11.vmdk'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml b/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml index 7ca8ff729a..a85cb42dce 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml +++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml @@ -12,7 +12,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='cdrom'> - <source file='[datastore] directory/cdrom.iso'/> + <source file='/[datastore] directory/cdrom.iso'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml index 5765232bc1..29111fb7b6 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml +++ b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml @@ -12,7 +12,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='cdrom'> - <source file='[datastore] directory/cdrom.iso'/> + <source file='/[datastore] directory/cdrom.iso'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-1.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-1.xml index c15275ccb9..9970cb6e8a 100644 --- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-1.xml +++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-1.xml @@ -16,7 +16,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/Fedora11.vmdk'/> + <source file='/[datastore] directory/Fedora11.vmdk'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml index b079808363..0422c401f8 100644 --- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml +++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml @@ -14,12 +14,12 @@ <devices> <disk type='file' device='disk'> <driver cache='writethrough'/> - <source file='[datastore] directory/Debian1.vmdk'/> + <source file='/[datastore] directory/Debian1.vmdk'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> - <source file='[datastore] directory/Debian1-cdrom.iso'/> + <source file='/[datastore] directory/Debian1-cdrom.iso'/> <target dev='sdp' bus='scsi'/> <address type='drive' controller='1' bus='0' target='0' unit='0'/> </disk> @@ -34,7 +34,7 @@ <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk> <disk type='file' device='disk'> - <source file='[datastore] directory/Debian1-IDE.vmdk'/> + <source file='/[datastore] directory/Debian1-IDE.vmdk'/> <target dev='hdd' bus='ide'/> <address type='drive' controller='0' bus='1' target='0' unit='1'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml index d05318c7d8..881d0c2970 100644 --- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml +++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml @@ -13,17 +13,17 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/Debian2.vmdk'/> + <source file='/[datastore] directory/Debian2.vmdk'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> - <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] Isos/debian-testing-amd64-netinst.iso'/> + <source file='/[498076b2-02796c1a-ef5b-000ae484a6a3] Isos/debian-testing-amd64-netinst.iso'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='floppy'> - <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] Debian2/dummy.flp'/> + <source file='/[498076b2-02796c1a-ef5b-000ae484a6a3] Debian2/dummy.flp'/> <target dev='fdb' bus='fdc'/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-4.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-4.xml index a8a2ac6f97..0a67ba9ed1 100644 --- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-4.xml +++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-4.xml @@ -16,7 +16,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/virtMonServ1.vmdk'/> + <source file='/[datastore] directory/virtMonServ1.vmdk'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> @@ -30,15 +30,15 @@ <source bridge='VM Switch 2'/> </interface> <serial type='file'> - <source path='[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/serial1.file'/> + <source path='/[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/serial1.file'/> <target port='0'/> </serial> <parallel type='file'> - <source path='[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/parallel1.file'/> + <source path='/[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/parallel1.file'/> <target port='0'/> </parallel> <console type='file'> - <source path='[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/serial1.file'/> + <source path='/[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/serial1.file'/> <target type='serial' port='0'/> </console> <video> diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml index 82643e9ffe..a79d6a33bf 100644 --- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml +++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml @@ -20,12 +20,12 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/vmtest-000001.vmdk'/> + <source file='/[datastore] directory/vmtest-000001.vmdk'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> - <source file='[4af0231d-1eff559a-6369-0024e84773b6] isos/CentOS-5.5-x86_64-bin-DVD-1of2.iso'/> + <source file='/[4af0231d-1eff559a-6369-0024e84773b6] isos/CentOS-5.5-x86_64-bin-DVD-1of2.iso'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-6.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-6.xml index 913bfedf30..8c10c80931 100644 --- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-6.xml +++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-6.xml @@ -13,7 +13,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/el6-test-000001.vmdk'/> + <source file='/[datastore] directory/el6-test-000001.vmdk'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-7.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-7.xml index 91913a2918..1e01608b54 100644 --- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-7.xml +++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-7.xml @@ -13,7 +13,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/esx-rhel6-mini.vmdk'/> + <source file='/[datastore] directory/esx-rhel6-mini.vmdk'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.xml index 8276457bb3..70e94b4da8 100644 --- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.xml +++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.xml @@ -19,18 +19,18 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/RHEL7_6.vmdk'/> + <source file='/[datastore] directory/RHEL7_6.vmdk'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='disk'> - <source file='[datastore] directory/RHEL7_6_1.vmdk'/> + <source file='/[datastore] directory/RHEL7_6_1.vmdk'/> <target dev='sdb' bus='scsi'/> <transient/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk> <disk type='file' device='disk'> - <source file='[5669422e-699d77db-c144-00e0815e303e] block4/block4.vmdk'/> + <source file='/[5669422e-699d77db-c144-00e0815e303e] block4/block4.vmdk'/> <target dev='sdc' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='2'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-9.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-9.xml index 66eca400dd..56f079d275 100644 --- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-9.xml +++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-9.xml @@ -20,7 +20,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/v2v-windows-kkulkarn.vmdk'/> + <source file='/[datastore] directory/v2v-windows-kkulkarn.vmdk'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-floppy-file.xml b/tests/vmx2xmldata/vmx2xml-floppy-file.xml index 6699f15602..aaf1f85881 100644 --- a/tests/vmx2xmldata/vmx2xml-floppy-file.xml +++ b/tests/vmx2xmldata/vmx2xml-floppy-file.xml @@ -12,12 +12,12 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='floppy'> - <source file='[datastore] directory/floppy.flp'/> + <source file='/[datastore] directory/floppy.flp'/> <target dev='fda' bus='fdc'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='floppy'> - <source file='[datastore] directory/floppy'/> + <source file='/[datastore] directory/floppy'/> <target dev='fdb' bus='fdc'/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml b/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml index 2dd46eb2b1..8a36b9a317 100644 --- a/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml +++ b/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml @@ -13,7 +13,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/ATTM_VM.vmdk'/> + <source file='/[datastore] directory/ATTM_VM.vmdk'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-1.xml b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-1.xml index 62ec191c82..3a4ccd4e55 100644 --- a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-1.xml +++ b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-1.xml @@ -13,7 +13,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/Debian-System1-0-cl2.vmdk'/> + <source file='/[datastore] directory/Debian-System1-0-cl2.vmdk'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-2.xml b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-2.xml index 906e4657ca..9b504c9dee 100644 --- a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-2.xml +++ b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-2.xml @@ -13,7 +13,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/Debian-System1-0-cl3.vmdk'/> + <source file='/[datastore] directory/Debian-System1-0-cl3.vmdk'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-3.xml b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-3.xml index 61812851e1..f6a0690449 100644 --- a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-3.xml +++ b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-3.xml @@ -13,7 +13,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/Debian-System1-0-cl1.vmdk'/> + <source file='/[datastore] directory/Debian-System1-0-cl1.vmdk'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-4.xml b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-4.xml index a65a7d137f..7aec2a1011 100644 --- a/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-4.xml +++ b/tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-4.xml @@ -13,7 +13,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/Debian-System1-0-cl2.vmdk'/> + <source file='/[datastore] directory/Debian-System1-0-cl2.vmdk'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml b/tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml index d452e6ed99..56bcaca512 100644 --- a/tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml +++ b/tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml @@ -12,7 +12,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/harddisk.vmdk'/> + <source file='/[datastore] directory/harddisk.vmdk'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml b/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml index 64b89c6530..d08e233757 100644 --- a/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml +++ b/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml @@ -12,7 +12,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/harddisk.vmdk'/> + <source file='/[datastore] directory/harddisk.vmdk'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-harddisk-transient.xml b/tests/vmx2xmldata/vmx2xml-harddisk-transient.xml index f61fb21773..7066b2309a 100644 --- a/tests/vmx2xmldata/vmx2xml-harddisk-transient.xml +++ b/tests/vmx2xmldata/vmx2xml-harddisk-transient.xml @@ -12,7 +12,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/harddisk.vmdk'/> + <source file='/[datastore] directory/harddisk.vmdk'/> <target dev='hda' bus='ide'/> <transient/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> diff --git a/tests/vmx2xmldata/vmx2xml-parallel-file.xml b/tests/vmx2xmldata/vmx2xml-parallel-file.xml index d7ec0cf1a2..037e6aebf1 100644 --- a/tests/vmx2xmldata/vmx2xml-parallel-file.xml +++ b/tests/vmx2xmldata/vmx2xml-parallel-file.xml @@ -12,7 +12,7 @@ <on_crash>destroy</on_crash> <devices> <parallel type='file'> - <source path='[datastore] directory/parallel0.file'/> + <source path='/[datastore] directory/parallel0.file'/> <target port='0'/> </parallel> <video> diff --git a/tests/vmx2xmldata/vmx2xml-scsi-driver.xml b/tests/vmx2xmldata/vmx2xml-scsi-driver.xml index 1a057df428..fa1cd5d84d 100644 --- a/tests/vmx2xmldata/vmx2xml-scsi-driver.xml +++ b/tests/vmx2xmldata/vmx2xml-scsi-driver.xml @@ -12,22 +12,22 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/harddisk1.vmdk'/> + <source file='/[datastore] directory/harddisk1.vmdk'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='disk'> - <source file='[datastore] directory/harddisk2.vmdk'/> + <source file='/[datastore] directory/harddisk2.vmdk'/> <target dev='sdp' bus='scsi'/> <address type='drive' controller='1' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='disk'> - <source file='[datastore] directory/harddisk3.vmdk'/> + <source file='/[datastore] directory/harddisk3.vmdk'/> <target dev='sdae' bus='scsi'/> <address type='drive' controller='2' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='disk'> - <source file='[datastore] directory/harddisk4.vmdk'/> + <source file='/[datastore] directory/harddisk4.vmdk'/> <target dev='sdat' bus='scsi'/> <address type='drive' controller='3' bus='0' target='0' unit='0'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml b/tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml index 95accb104e..188748e8e2 100644 --- a/tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml +++ b/tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml @@ -13,7 +13,7 @@ <devices> <disk type='file' device='disk'> <driver cache='writethrough'/> - <source file='[datastore] directory/harddisk.vmdk'/> + <source file='/[datastore] directory/harddisk.vmdk'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> diff --git a/tests/vmx2xmldata/vmx2xml-serial-file.xml b/tests/vmx2xmldata/vmx2xml-serial-file.xml index 84618c321c..5e08e7ffe6 100644 --- a/tests/vmx2xmldata/vmx2xml-serial-file.xml +++ b/tests/vmx2xmldata/vmx2xml-serial-file.xml @@ -12,11 +12,11 @@ <on_crash>destroy</on_crash> <devices> <serial type='file'> - <source path='[datastore] directory/serial0.file'/> + <source path='/[datastore] directory/serial0.file'/> <target port='0'/> </serial> <console type='file'> - <source path='[datastore] directory/serial0.file'/> + <source path='/[datastore] directory/serial0.file'/> <target type='serial' port='0'/> </console> <video> diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c index 1966aed6fe..f06e74ebcc 100644 --- a/tests/vmx2xmltest.c +++ b/tests/vmx2xmltest.c @@ -148,7 +148,7 @@ testParseVMXFileName(const char *fileName, void *opaque G_GNUC_UNUSED) goto cleanup; } - src = g_strdup_printf("[%s] %s", datastoreName, directoryAndFileName); + src = g_strdup_printf("/[%s] %s", datastoreName, directoryAndFileName); } else if (STRPREFIX(fileName, "/")) { /* Found absolute path referencing a file outside a datastore */ src = g_strdup(fileName); @@ -157,7 +157,7 @@ testParseVMXFileName(const char *fileName, void *opaque G_GNUC_UNUSED) src = NULL; } else { /* Found single file name referencing a file inside a datastore */ - src = g_strdup_printf("[datastore] directory/%s", fileName); + src = g_strdup_printf("/[datastore] directory/%s", fileName); } cleanup: diff --git a/tests/xml2vmxdata/xml2vmx-cdrom-ide-file.xml b/tests/xml2vmxdata/xml2vmx-cdrom-ide-file.xml index 0ea16501ae..331ee64dc4 100644 --- a/tests/xml2vmxdata/xml2vmx-cdrom-ide-file.xml +++ b/tests/xml2vmxdata/xml2vmx-cdrom-ide-file.xml @@ -7,7 +7,7 @@ </os> <devices> <disk type='file' device='cdrom'> - <source file='[testing] isos/cdrom.iso'/> + <source file='/[testing] isos/cdrom.iso'/> <target dev='hda' bus='ide'/> </disk> </devices> diff --git a/tests/xml2vmxdata/xml2vmx-cdrom-scsi-file.xml b/tests/xml2vmxdata/xml2vmx-cdrom-scsi-file.xml index 82d2d7ae92..480326eefa 100644 --- a/tests/xml2vmxdata/xml2vmx-cdrom-scsi-file.xml +++ b/tests/xml2vmxdata/xml2vmx-cdrom-scsi-file.xml @@ -7,7 +7,7 @@ </os> <devices> <disk type='file' device='cdrom'> - <source file='[testing] isos/cdrom.iso'/> + <source file='/[testing] isos/cdrom.iso'/> <target dev='sda' bus='scsi'/> </disk> </devices> diff --git a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-1.xml b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-1.xml index 0c7dfccb0d..2229ac8c3d 100644 --- a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-1.xml +++ b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-1.xml @@ -17,7 +17,7 @@ <devices> <disk type='file' device='disk'> <driver name='lsilogic'/> - <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] Fedora11/Fedora11.vmdk'/> + <source file='/[498076b2-02796c1a-ef5b-000ae484a6a3] Fedora11/Fedora11.vmdk'/> <target dev='sda' bus='scsi'/> </disk> <interface type='bridge'> diff --git a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-2.xml b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-2.xml index affb5cf046..62f0480203 100644 --- a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-2.xml +++ b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-2.xml @@ -14,12 +14,12 @@ <devices> <disk type='file' device='disk'> <driver name='lsilogic' cache='writethrough'/> - <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] virtDebian1/Debian1.vmdk'/> + <source file='/[498076b2-02796c1a-ef5b-000ae484a6a3] virtDebian1/Debian1.vmdk'/> <target dev='sda' bus='scsi'/> </disk> <disk type='file' device='cdrom'> <driver name='buslogic'/> - <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] virtDebian1/Debian1-cdrom.iso'/> + <source file='/[498076b2-02796c1a-ef5b-000ae484a6a3] virtDebian1/Debian1-cdrom.iso'/> <target dev='sdp' bus='scsi'/> </disk> <disk type='file' device='cdrom'> @@ -31,7 +31,7 @@ <target dev='hdb' bus='ide'/> </disk> <disk type='file' device='disk'> - <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] virtDebian1/Debian1-IDE.vmdk'/> + <source file='/[498076b2-02796c1a-ef5b-000ae484a6a3] virtDebian1/Debian1-IDE.vmdk'/> <target dev='hdd' bus='ide'/> </disk> <disk type='block' device='floppy'> diff --git a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-3.xml b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-3.xml index 4d24e0da92..6583bc6fb7 100644 --- a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-3.xml +++ b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-3.xml @@ -14,15 +14,15 @@ <devices> <disk type='file' device='disk'> <driver name='lsilogic'/> - <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] Debian2/Debian2.vmdk'/> + <source file='/[498076b2-02796c1a-ef5b-000ae484a6a3] Debian2/Debian2.vmdk'/> <target dev='sda' bus='scsi'/> </disk> <disk type='file' device='cdrom'> - <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] Isos/debian-testing-amd64-netinst.iso'/> + <source file='/[498076b2-02796c1a-ef5b-000ae484a6a3] Isos/debian-testing-amd64-netinst.iso'/> <target dev='hda' bus='ide'/> </disk> <disk type='file' device='floppy'> - <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] Debian2/dummy.flp'/> + <source file='/[498076b2-02796c1a-ef5b-000ae484a6a3] Debian2/dummy.flp'/> <target dev='fdb' bus='fdc'/> </disk> <interface type='bridge'> diff --git a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-4.xml b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-4.xml index 277bac479c..34e994a451 100644 --- a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-4.xml +++ b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-4.xml @@ -17,7 +17,7 @@ <devices> <disk type='file' device='disk'> <driver name='lsilogic'/> - <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/virtMonServ1.vmdk'/> + <source file='/[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/virtMonServ1.vmdk'/> <target dev='sda' bus='scsi'/> </disk> <interface type='bridge'> @@ -29,15 +29,15 @@ <source bridge='VM Switch 2'/> </interface> <serial type='file'> - <source path='[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/serial1.file'/> + <source path='/[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/serial1.file'/> <target port='0'/> </serial> <parallel type='file'> - <source path='[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/parallel1.file'/> + <source path='/[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/parallel1.file'/> <target port='0'/> </parallel> <console type='file'> - <source path='[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/serial1.file'/> + <source path='/[498076b2-02796c1a-ef5b-000ae484a6a3] virtMonServ1/serial1.file'/> <target port='0'/> </console> </devices> diff --git a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-5.xml b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-5.xml index 4d1e5b8e54..11bdff5d70 100644 --- a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-5.xml +++ b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-5.xml @@ -20,12 +20,12 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/vmtest-000001.vmdk'/> + <source file='/[datastore] directory/vmtest-000001.vmdk'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' unit='0'/> </disk> <disk type='file' device='cdrom'> - <source file='[4af0231d-1eff559a-6369-0024e84773b6] isos/CentOS-5.5-x86_64-bin-DVD-1of2.iso'/> + <source file='/[4af0231d-1eff559a-6369-0024e84773b6] isos/CentOS-5.5-x86_64-bin-DVD-1of2.iso'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' unit='0'/> </disk> diff --git a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-6.xml b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-6.xml index fa416a9dea..4b66f8be75 100644 --- a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-6.xml +++ b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-6.xml @@ -13,7 +13,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/el6-test-000001.vmdk'/> + <source file='/[datastore] directory/el6-test-000001.vmdk'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' unit='0'/> </disk> diff --git a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-7.xml b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-7.xml index 5180a99f83..6917fa2cdc 100644 --- a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-7.xml +++ b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-7.xml @@ -13,7 +13,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/esx-rhel6-mini.vmdk'/> + <source file='/[datastore] directory/esx-rhel6-mini.vmdk'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> diff --git a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-9.xml b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-9.xml index f1fe6dd4c9..d9d6618b5a 100644 --- a/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-9.xml +++ b/tests/xml2vmxdata/xml2vmx-esx-in-the-wild-9.xml @@ -20,7 +20,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/v2v-windows-kkulkarn.vmdk'/> + <source file='/[datastore] directory/v2v-windows-kkulkarn.vmdk'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> diff --git a/tests/xml2vmxdata/xml2vmx-floppy-file.xml b/tests/xml2vmxdata/xml2vmx-floppy-file.xml index 119113abdd..86d76e02ae 100644 --- a/tests/xml2vmxdata/xml2vmx-floppy-file.xml +++ b/tests/xml2vmxdata/xml2vmx-floppy-file.xml @@ -7,11 +7,11 @@ </os> <devices> <disk type='file' device='floppy'> - <source file='[testing] floppy.flp'/> + <source file='/[testing] floppy.flp'/> <target dev='fda' bus='fdc'/> </disk> <disk type='file' device='floppy'> - <source file='[testing] floppy1'/> + <source file='/[testing] floppy1'/> <target dev='fdb' bus='fdc'/> </disk> </devices> diff --git a/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.xml b/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.xml index 0bfc7e88af..ce24f10448 100644 --- a/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.xml +++ b/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.xml @@ -13,7 +13,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/ATTM_VM.vmdk'/> + <source file='/[datastore] directory/ATTM_VM.vmdk'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> diff --git a/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-1.xml b/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-1.xml index 56b98f7cb9..bafa776bb2 100644 --- a/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-1.xml +++ b/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-1.xml @@ -13,7 +13,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[storage] Server1/Debian-System1-0-cl2.vmdk'/> + <source file='/[storage] Server1/Debian-System1-0-cl2.vmdk'/> <target dev='hda' bus='ide'/> </disk> <interface type='bridge'> diff --git a/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-2.xml b/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-2.xml index a7732b74db..fdc8c67351 100644 --- a/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-2.xml +++ b/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-2.xml @@ -13,7 +13,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[storage] Server2/Debian-System1-0-cl3.vmdk'/> + <source file='/[storage] Server2/Debian-System1-0-cl3.vmdk'/> <target dev='hda' bus='ide'/> </disk> <interface type='bridge'> diff --git a/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-3.xml b/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-3.xml index e4fc5b61a6..4de9883a2a 100644 --- a/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-3.xml +++ b/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-3.xml @@ -13,7 +13,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[storage] Router/Debian-System1-0-cl1.vmdk'/> + <source file='/[storage] Router/Debian-System1-0-cl1.vmdk'/> <target dev='hda' bus='ide'/> </disk> <interface type='bridge'> diff --git a/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-4.xml b/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-4.xml index 7442025b61..a68ff3d14f 100644 --- a/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-4.xml +++ b/tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-4.xml @@ -13,7 +13,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[storage] Client/Debian-System1-0-cl2.vmdk'/> + <source file='/[storage] Client/Debian-System1-0-cl2.vmdk'/> <target dev='hda' bus='ide'/> </disk> <interface type='bridge'> diff --git a/tests/xml2vmxdata/xml2vmx-harddisk-ide-file.xml b/tests/xml2vmxdata/xml2vmx-harddisk-ide-file.xml index e57e249dc1..313dffb603 100644 --- a/tests/xml2vmxdata/xml2vmx-harddisk-ide-file.xml +++ b/tests/xml2vmxdata/xml2vmx-harddisk-ide-file.xml @@ -7,7 +7,7 @@ </os> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/harddisk.vmdk'/> + <source file='/[datastore] directory/harddisk.vmdk'/> <target dev='hda' bus='ide'/> </disk> </devices> diff --git a/tests/xml2vmxdata/xml2vmx-harddisk-scsi-file.xml b/tests/xml2vmxdata/xml2vmx-harddisk-scsi-file.xml index 70a9b57495..9d3de8164c 100644 --- a/tests/xml2vmxdata/xml2vmx-harddisk-scsi-file.xml +++ b/tests/xml2vmxdata/xml2vmx-harddisk-scsi-file.xml @@ -7,7 +7,7 @@ </os> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/harddisk.vmdk'/> + <source file='/[datastore] directory/harddisk.vmdk'/> <target dev='sda' bus='scsi'/> </disk> </devices> diff --git a/tests/xml2vmxdata/xml2vmx-parallel-file.xml b/tests/xml2vmxdata/xml2vmx-parallel-file.xml index 8f686ddde5..0308c7856d 100644 --- a/tests/xml2vmxdata/xml2vmx-parallel-file.xml +++ b/tests/xml2vmxdata/xml2vmx-parallel-file.xml @@ -7,7 +7,7 @@ </os> <devices> <parallel type='file'> - <source path='[datastore] directory/parallel0.file'/> + <source path='/[datastore] directory/parallel0.file'/> <target port='0'/> </parallel> </devices> diff --git a/tests/xml2vmxdata/xml2vmx-scsi-driver.xml b/tests/xml2vmxdata/xml2vmx-scsi-driver.xml index 360d7d23cc..d6f3c60f8d 100644 --- a/tests/xml2vmxdata/xml2vmx-scsi-driver.xml +++ b/tests/xml2vmxdata/xml2vmx-scsi-driver.xml @@ -8,22 +8,22 @@ <devices> <disk type='file' device='disk'> <driver name='buslogic'/> - <source file='[datastore] directory/harddisk1.vmdk'/> + <source file='/[datastore] directory/harddisk1.vmdk'/> <target dev='sda' bus='scsi'/> </disk> <disk type='file' device='disk'> <driver name='lsilogic'/> - <source file='[datastore] directory/harddisk2.vmdk'/> + <source file='/[datastore] directory/harddisk2.vmdk'/> <target dev='sdp' bus='scsi'/> </disk> <disk type='file' device='disk'> <driver name='lsisas1068'/> - <source file='[datastore] directory/harddisk3.vmdk'/> + <source file='/[datastore] directory/harddisk3.vmdk'/> <target dev='sdae' bus='scsi'/> </disk> <disk type='file' device='disk'> <driver name='vmpvscsi'/> - <source file='[datastore] directory/harddisk4.vmdk'/> + <source file='/[datastore] directory/harddisk4.vmdk'/> <target dev='sdat' bus='scsi'/> </disk> </devices> diff --git a/tests/xml2vmxdata/xml2vmx-scsi-writethrough.xml b/tests/xml2vmxdata/xml2vmx-scsi-writethrough.xml index d0b17029fa..b1f48f206f 100644 --- a/tests/xml2vmxdata/xml2vmx-scsi-writethrough.xml +++ b/tests/xml2vmxdata/xml2vmx-scsi-writethrough.xml @@ -8,7 +8,7 @@ <devices> <disk type='file' device='disk'> <driver name='buslogic' cache='writethrough'/> - <source file='[datastore] directory/harddisk.vmdk'/> + <source file='/[datastore] directory/harddisk.vmdk'/> <target dev='sda' bus='scsi'/> </disk> </devices> diff --git a/tests/xml2vmxdata/xml2vmx-serial-file.xml b/tests/xml2vmxdata/xml2vmx-serial-file.xml index 647a3ca550..4c8157e3b5 100644 --- a/tests/xml2vmxdata/xml2vmx-serial-file.xml +++ b/tests/xml2vmxdata/xml2vmx-serial-file.xml @@ -7,7 +7,7 @@ </os> <devices> <serial type='file'> - <source path='[datastore] directory/serial0.file'/> + <source path='/[datastore] directory/serial0.file'/> <target port='0'/> </serial> </devices> diff --git a/tests/xml2vmxtest.c b/tests/xml2vmxtest.c index b74fda29ef..85cf88cec4 100644 --- a/tests/xml2vmxtest.c +++ b/tests/xml2vmxtest.c @@ -148,12 +148,12 @@ testFormatVMXFileName(const char *src, void *opaque G_GNUC_UNUSED) char *directoryAndFileName = NULL; char *absolutePath = NULL; - if (STRPREFIX(src, "[")) { + if (STRPREFIX(src, "/[")) { /* Found potential datastore path */ copyOfDatastorePath = g_strdup(src); /* Expected format: '[<datastore>] <path>' where <path> is optional */ - if ((tmp = STRSKIP(copyOfDatastorePath, "[")) == NULL || *tmp == ']' || + if ((tmp = STRSKIP(copyOfDatastorePath, "/[")) == NULL || *tmp == ']' || (datastoreName = strtok_r(tmp, "]", &saveptr)) == NULL) { goto cleanup; } -- 2.26.2

On Thursday, 8 October 2020 09:55:32 CEST Peter Krempa wrote:
The vmx tests use fake paths for files which in some cases didn't start with a /. Since libvirt's schema mandates full paths and the representation used in the tests is only internal to the tests we'll add a leading / to the paths to conform to the schema.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml | 2 +- tests/vmx2xmldata/vmx2xml-case-insensitive-2.xml | 2 +- tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml | 2 +- tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml | 2 +- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-1.xml | 2 +- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml | 6 +++--- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml | 6 +++--- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-4.xml | 8 ++++---- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml | 4 ++-- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-6.xml | 2 +- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-7.xml | 2 +- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.xml | 6 +++--- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-9.xml | 2 +- tests/vmx2xmldata/vmx2xml-floppy-file.xml | 4 ++-- tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml | 2 +- tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-1.xml | 2 +- tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-2.xml | 2 +- tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-3.xml | 2 +- tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-4.xml | 2 +- tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml | 2 +- tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml | 2 +- tests/vmx2xmldata/vmx2xml-harddisk-transient.xml | 2 +- tests/vmx2xmldata/vmx2xml-parallel-file.xml | 2 +- tests/vmx2xmldata/vmx2xml-scsi-driver.xml | 8 ++++---- tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml | 2 +- tests/vmx2xmldata/vmx2xml-serial-file.xml | 4 ++-- tests/vmx2xmltest.c | 4 ++-- tests/xml2vmxdata/xml2vmx-cdrom-ide-file.xml | 2 +- tests/xml2vmxdata/xml2vmx-cdrom-scsi-file.xml | 2 +- tests/xml2vmxdata/xml2vmx-esx-in-the-wild-1.xml | 2 +- tests/xml2vmxdata/xml2vmx-esx-in-the-wild-2.xml | 6 +++--- tests/xml2vmxdata/xml2vmx-esx-in-the-wild-3.xml | 6 +++--- tests/xml2vmxdata/xml2vmx-esx-in-the-wild-4.xml | 8 ++++---- tests/xml2vmxdata/xml2vmx-esx-in-the-wild-5.xml | 4 ++-- tests/xml2vmxdata/xml2vmx-esx-in-the-wild-6.xml | 2 +- tests/xml2vmxdata/xml2vmx-esx-in-the-wild-7.xml | 2 +- tests/xml2vmxdata/xml2vmx-esx-in-the-wild-9.xml | 2 +- tests/xml2vmxdata/xml2vmx-floppy-file.xml | 4 ++-- tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.xml | 2 +- tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-1.xml | 2 +- tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-2.xml | 2 +- tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-3.xml | 2 +- tests/xml2vmxdata/xml2vmx-gsx-in-the-wild-4.xml | 2 +- tests/xml2vmxdata/xml2vmx-harddisk-ide-file.xml | 2 +- tests/xml2vmxdata/xml2vmx-harddisk-scsi-file.xml | 2 +- tests/xml2vmxdata/xml2vmx-parallel-file.xml | 2 +- tests/xml2vmxdata/xml2vmx-scsi-driver.xml | 8 ++++---- tests/xml2vmxdata/xml2vmx-scsi-writethrough.xml | 2 +- tests/xml2vmxdata/xml2vmx-serial-file.xml | 2 +- tests/xml2vmxtest.c | 4 ++-- 50 files changed, 79 insertions(+), 79 deletions(-)
diff --git a/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml b/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml index 7cb6413941..97fa300c18 100644 --- a/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml +++ b/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml @@ -16,7 +16,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/FEDORA11.VMDK'/> + <source file='/[datastore] directory/FEDORA11.VMDK'/>
The real XMLs of VMware guests have disks paths like '[datastore] path/to/file.vmx'. The proposed change will make these XMLs unusable as real XMLs, and some of them were actually real XMLs. Even if these files are just tests, I don't think this is correct to make them different than real XMLs. If the schema does not support file='[datastore] path/to/file.vmx', IMHO that's the schema itself what needs to be fixed, not example/test XMLs... -- Pino Toscano

On Thu, Oct 08, 2020 at 10:17:22 +0200, Pino Toscano wrote:
On Thursday, 8 October 2020 09:55:32 CEST Peter Krempa wrote:
The vmx tests use fake paths for files which in some cases didn't start with a /. Since libvirt's schema mandates full paths and the representation used in the tests is only internal to the tests we'll add a leading / to the paths to conform to the schema.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> ---
[...]
diff --git a/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml b/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml index 7cb6413941..97fa300c18 100644 --- a/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml +++ b/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml @@ -16,7 +16,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/FEDORA11.VMDK'/> + <source file='/[datastore] directory/FEDORA11.VMDK'/>
The real XMLs of VMware guests have disks paths like '[datastore] path/to/file.vmx'. The proposed change will make these XMLs unusable as real XMLs, and some of them were actually real XMLs.
Even if these files are just tests, I don't think this is correct to make them different than real XMLs.
If the schema does not support file='[datastore] path/to/file.vmx', IMHO that's the schema itself what needs to be fixed, not example/test XMLs...
Okay that's extremely weird then. I must say I looked into the real parser since for some reason we have a separate implementation in the tests (also weird) but didn't notice that this was done also for real files. The real question then is. Why didn't anybody complain yet?!? The schema mandating a leading slash is there amost forever so vmware XMLs must have been invalid for all that time.

On Thu, Oct 08, 2020 at 10:26:43AM +0200, Peter Krempa wrote:
On Thu, Oct 08, 2020 at 10:17:22 +0200, Pino Toscano wrote:
On Thursday, 8 October 2020 09:55:32 CEST Peter Krempa wrote:
The vmx tests use fake paths for files which in some cases didn't start with a /. Since libvirt's schema mandates full paths and the representation used in the tests is only internal to the tests we'll add a leading / to the paths to conform to the schema.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> ---
[...]
diff --git a/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml b/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml index 7cb6413941..97fa300c18 100644 --- a/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml +++ b/tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml @@ -16,7 +16,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <source file='[datastore] directory/FEDORA11.VMDK'/> + <source file='/[datastore] directory/FEDORA11.VMDK'/>
The real XMLs of VMware guests have disks paths like '[datastore] path/to/file.vmx'. The proposed change will make these XMLs unusable as real XMLs, and some of them were actually real XMLs.
Even if these files are just tests, I don't think this is correct to make them different than real XMLs.
If the schema does not support file='[datastore] path/to/file.vmx', IMHO that's the schema itself what needs to be fixed, not example/test XMLs...
Okay that's extremely weird then. I must say I looked into the real parser since for some reason we have a separate implementation in the tests (also weird) but didn't notice that this was done also for real files.
The real question then is. Why didn't anybody complain yet?!? The schema mandating a leading slash is there amost forever so vmware XMLs must have been invalid for all that time.
My guess is because CreateXML is not used and for read access it cannot fail because the XML is generated in libvirt and "sent" to the client/caller. It could have probably been something like: <source datastore="ds1" file="/directory/file.ext"/> but it's too late (and worthless IMNSHO) to do that now.

Our vmware driver chose to format disk paths starting with a square bracket. This would not conform to the RNG schema for disk source. Modify the schema to allow these since it's around for some time. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- Consider this as replacement for the original patch 18. Just add an alternative to the path. docs/schemas/basictypes.rng | 6 ++++++ docs/schemas/domaincommon.rng | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/schemas/basictypes.rng b/docs/schemas/basictypes.rng index b1fb939aff..42e94c40e9 100644 --- a/docs/schemas/basictypes.rng +++ b/docs/schemas/basictypes.rng @@ -303,6 +303,12 @@ </data> </define> + <define name="vmwarePath"> + <data type="string"> + <param name="pattern">\[.+\] .+</param> + </data> + </define> + <define name="absDirPath"> <data type="string"> <param name="pattern">/.*</param> diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 41c256b653..a08497eea2 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1651,7 +1651,10 @@ <interleave> <optional> <attribute name="file"> - <ref name="absFilePath"/> + <choice> + <ref name="absFilePath"/> + <ref name="vmwarePath"/> + </choice> </attribute> </optional> <ref name="diskSourceCommon"/> -- 2.26.2

On Thursday, 8 October 2020 10:47:16 CEST Peter Krempa wrote:
Our vmware driver chose to format disk paths starting with a square bracket. This would not conform to the RNG schema for disk source. Modify the schema to allow these since it's around for some time.
s/VMWARE/VMware/ in the first line of the commit message. Also, the format is not a real path: it's the datastore where the VM is stored, followed by the relative path in it. This is also documented: https://libvirt.org/drvesx.html#datastore
diff --git a/docs/schemas/basictypes.rng b/docs/schemas/basictypes.rng index b1fb939aff..42e94c40e9 100644 --- a/docs/schemas/basictypes.rng +++ b/docs/schemas/basictypes.rng @@ -303,6 +303,12 @@ </data> </define>
+ <define name="vmwarePath"> + <data type="string"> + <param name="pattern">\[.+\] .+</param>
Let's make the datastore part slightly more strict: <param name="pattern">\[[^\]+\] .+</param> So it should work also with a greedy validator. With the above changes: Reviewed-by: Pino Toscano <ptoscano@redhat.com> -- Pino Toscano

<name> is mandatory for a domain XML. Add 'displayName' for all the test cases which were missing them so that <name> is parsed correctly. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/vmx2xmldata/vmx2xml-annotation.vmx | 1 + tests/vmx2xmldata/vmx2xml-annotation.xml | 1 + tests/vmx2xmldata/vmx2xml-case-insensitive-1.vmx | 1 + tests/vmx2xmldata/vmx2xml-case-insensitive-2.vmx | 1 + tests/vmx2xmldata/vmx2xml-cdrom-ide-device.vmx | 1 + tests/vmx2xmldata/vmx2xml-cdrom-ide-device.xml | 1 + tests/vmx2xmldata/vmx2xml-cdrom-ide-empty-2.vmx | 1 + tests/vmx2xmldata/vmx2xml-cdrom-ide-empty-2.xml | 1 + tests/vmx2xmldata/vmx2xml-cdrom-ide-empty.vmx | 1 + tests/vmx2xmldata/vmx2xml-cdrom-ide-empty.xml | 1 + tests/vmx2xmldata/vmx2xml-cdrom-ide-file.vmx | 1 + tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml | 1 + tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-auto-detect.vmx | 1 + tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-auto-detect.xml | 1 + tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-device.vmx | 1 + tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-device.xml | 1 + tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.vmx | 1 + tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.xml | 1 + tests/vmx2xmldata/vmx2xml-cdrom-scsi-empty.vmx | 1 + tests/vmx2xmldata/vmx2xml-cdrom-scsi-empty.xml | 1 + tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.vmx | 1 + tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml | 1 + tests/vmx2xmldata/vmx2xml-cdrom-scsi-passthru.vmx | 1 + tests/vmx2xmldata/vmx2xml-cdrom-scsi-passthru.xml | 1 + tests/vmx2xmldata/vmx2xml-cdrom-scsi-raw-auto-detect.vmx | 1 + tests/vmx2xmldata/vmx2xml-cdrom-scsi-raw-auto-detect.xml | 1 + tests/vmx2xmldata/vmx2xml-cdrom-scsi-raw-device.vmx | 1 + tests/vmx2xmldata/vmx2xml-cdrom-scsi-raw-device.xml | 1 + tests/vmx2xmldata/vmx2xml-datacenterpath.vmx | 1 + tests/vmx2xmldata/vmx2xml-datacenterpath.xml | 1 + tests/vmx2xmldata/vmx2xml-ethernet-bridged.vmx | 1 + tests/vmx2xmldata/vmx2xml-ethernet-bridged.xml | 1 + tests/vmx2xmldata/vmx2xml-ethernet-custom.vmx | 1 + tests/vmx2xmldata/vmx2xml-ethernet-custom.xml | 1 + tests/vmx2xmldata/vmx2xml-ethernet-e1000.vmx | 1 + tests/vmx2xmldata/vmx2xml-ethernet-e1000.xml | 1 + tests/vmx2xmldata/vmx2xml-ethernet-generated.vmx | 1 + tests/vmx2xmldata/vmx2xml-ethernet-generated.xml | 1 + tests/vmx2xmldata/vmx2xml-ethernet-nat.vmx | 1 + tests/vmx2xmldata/vmx2xml-ethernet-nat.xml | 1 + tests/vmx2xmldata/vmx2xml-ethernet-other.vmx | 1 + tests/vmx2xmldata/vmx2xml-ethernet-other.xml | 1 + tests/vmx2xmldata/vmx2xml-ethernet-static.vmx | 1 + tests/vmx2xmldata/vmx2xml-ethernet-static.xml | 1 + tests/vmx2xmldata/vmx2xml-ethernet-vmxnet2.vmx | 1 + tests/vmx2xmldata/vmx2xml-ethernet-vmxnet2.xml | 1 + tests/vmx2xmldata/vmx2xml-ethernet-vpx.vmx | 1 + tests/vmx2xmldata/vmx2xml-ethernet-vpx.xml | 1 + tests/vmx2xmldata/vmx2xml-firmware-efi.vmx | 1 + tests/vmx2xmldata/vmx2xml-firmware-efi.xml | 1 + tests/vmx2xmldata/vmx2xml-floppy-device.vmx | 1 + tests/vmx2xmldata/vmx2xml-floppy-device.xml | 1 + tests/vmx2xmldata/vmx2xml-floppy-file.vmx | 1 + tests/vmx2xmldata/vmx2xml-floppy-file.xml | 1 + tests/vmx2xmldata/vmx2xml-graphics-vnc.vmx | 1 + tests/vmx2xmldata/vmx2xml-graphics-vnc.xml | 1 + tests/vmx2xmldata/vmx2xml-harddisk-ide-file.vmx | 1 + tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml | 1 + tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.vmx | 1 + tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml | 1 + tests/vmx2xmldata/vmx2xml-harddisk-transient.vmx | 1 + tests/vmx2xmldata/vmx2xml-harddisk-transient.xml | 1 + tests/vmx2xmldata/vmx2xml-minimal-64bit.vmx | 1 + tests/vmx2xmldata/vmx2xml-minimal-64bit.xml | 1 + tests/vmx2xmldata/vmx2xml-minimal.vmx | 1 + tests/vmx2xmldata/vmx2xml-minimal.xml | 1 + tests/vmx2xmldata/vmx2xml-parallel-device.vmx | 1 + tests/vmx2xmldata/vmx2xml-parallel-device.xml | 1 + tests/vmx2xmldata/vmx2xml-parallel-file.vmx | 1 + tests/vmx2xmldata/vmx2xml-parallel-file.xml | 1 + tests/vmx2xmldata/vmx2xml-scsi-driver.vmx | 1 + tests/vmx2xmldata/vmx2xml-scsi-driver.xml | 1 + tests/vmx2xmldata/vmx2xml-scsi-writethrough.vmx | 1 + tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml | 1 + tests/vmx2xmldata/vmx2xml-serial-device.vmx | 1 + tests/vmx2xmldata/vmx2xml-serial-device.xml | 1 + tests/vmx2xmldata/vmx2xml-serial-file.vmx | 1 + tests/vmx2xmldata/vmx2xml-serial-file.xml | 1 + tests/vmx2xmldata/vmx2xml-serial-network-client.vmx | 1 + tests/vmx2xmldata/vmx2xml-serial-network-client.xml | 1 + tests/vmx2xmldata/vmx2xml-serial-network-server.vmx | 1 + tests/vmx2xmldata/vmx2xml-serial-network-server.xml | 1 + tests/vmx2xmldata/vmx2xml-serial-pipe-client-app.vmx | 1 + tests/vmx2xmldata/vmx2xml-serial-pipe-client-vm.vmx | 1 + tests/vmx2xmldata/vmx2xml-serial-pipe-server-app.vmx | 1 + tests/vmx2xmldata/vmx2xml-serial-pipe-server-vm.vmx | 1 + tests/vmx2xmldata/vmx2xml-serial-pipe.xml | 1 + tests/vmx2xmldata/vmx2xml-sharedfolder.vmx | 1 + tests/vmx2xmldata/vmx2xml-sharedfolder.xml | 1 + tests/vmx2xmldata/vmx2xml-smbios.vmx | 1 + tests/vmx2xmldata/vmx2xml-smbios.xml | 1 + tests/vmx2xmldata/vmx2xml-svga.vmx | 1 + tests/vmx2xmldata/vmx2xml-svga.xml | 1 + 93 files changed, 93 insertions(+) diff --git a/tests/vmx2xmldata/vmx2xml-annotation.vmx b/tests/vmx2xmldata/vmx2xml-annotation.vmx index 405b73cbfa..35dbc1335e 100644 --- a/tests/vmx2xmldata/vmx2xml-annotation.vmx +++ b/tests/vmx2xmldata/vmx2xml-annotation.vmx @@ -1,3 +1,4 @@ config.version = "8" virtualHW.version = "4" annotation = "Some |7Ctext|7C to test the |22escaping|22: |7C|7C|22|22|7C|7C|22|7C |45|73|63|61|70|65|64|21" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-annotation.xml b/tests/vmx2xmldata/vmx2xml-annotation.xml index 9d99fd288b..3e7a0e129a 100644 --- a/tests/vmx2xmldata/vmx2xml-annotation.xml +++ b/tests/vmx2xmldata/vmx2xml-annotation.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <description>Some |text| to test the "escaping": ||""||"| Escaped!</description> <memory unit='KiB'>32768</memory> diff --git a/tests/vmx2xmldata/vmx2xml-case-insensitive-1.vmx b/tests/vmx2xmldata/vmx2xml-case-insensitive-1.vmx index 8641c5c01b..dd069b378d 100644 --- a/tests/vmx2xmldata/vmx2xml-case-insensitive-1.vmx +++ b/tests/vmx2xmldata/vmx2xml-case-insensitive-1.vmx @@ -49,3 +49,4 @@ UUID.LOCATION = "56 4D B5 06 A2 BD FB EB-AE 86 F7 D8 49 27 D0 C4" SCHED.CPU.MAX = "UNLIMITED" SCHED.SWAP.DERIVEDNAME = "/VMFS/VOLUMES/498076B2-02796C1A-EF5B-000AE484A6A3/FEDORA11/FEDORA11-7DE040D8.VSWP" TOOLS.REMINDINSTALL = "TRUE" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-case-insensitive-2.vmx b/tests/vmx2xmldata/vmx2xml-case-insensitive-2.vmx index a485d03cd9..e37e0b9369 100644 --- a/tests/vmx2xmldata/vmx2xml-case-insensitive-2.vmx +++ b/tests/vmx2xmldata/vmx2xml-case-insensitive-2.vmx @@ -49,3 +49,4 @@ uuid.location = "56 4d b5 06 a2 bd fb eb-ae 86 f7 d8 49 27 d0 c4" sched.cpu.max = "unlimited" sched.swap.derivedname = "/vmfs/volumes/498076b2-02796c1a-ef5b-000ae484a6a3/fedora11/fedora11-7de040d8.vswp" tools.remindinstall = "true" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-device.vmx b/tests/vmx2xmldata/vmx2xml-cdrom-ide-device.vmx index dc789d257e..3b60bd18f5 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-ide-device.vmx +++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-device.vmx @@ -4,3 +4,4 @@ guestOS = "other" ide0:0.present = "true" ide0:0.deviceType = "atapi-cdrom" ide0:0.fileName = "/dev/scd0" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-device.xml b/tests/vmx2xmldata/vmx2xml-cdrom-ide-device.xml index d8bba13385..e5a242d1f4 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-ide-device.xml +++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-device.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty-2.vmx b/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty-2.vmx index 36286cb20f..7ea8fb96de 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty-2.vmx +++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty-2.vmx @@ -2,3 +2,4 @@ config.version = "8" virtualHW.version = "4" ide0:0.present = "true" ide0:0.deviceType = "atapi-cdrom" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty-2.xml b/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty-2.xml index af4a5ff9f6..6af0ee0704 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty-2.xml +++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty-2.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty.vmx b/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty.vmx index 62fdb3d18d..c61b0eeb10 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty.vmx +++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty.vmx @@ -3,3 +3,4 @@ virtualHW.version = "4" ide0:0.present = "true" ide0:0.deviceType = "cdrom-image" ide0:0.fileName = "emptyBackingString" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty.xml b/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty.xml index b11fe272b6..93670e7eb4 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty.xml +++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.vmx b/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.vmx index edd3999d0e..adc57f4374 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.vmx +++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.vmx @@ -3,3 +3,4 @@ virtualHW.version = "4" ide0:0.present = "true" ide0:0.deviceType = "cdrom-image" ide0:0.fileName = "cdrom.iso" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml b/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml index a85cb42dce..7479f7ccf6 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml +++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-auto-detect.vmx b/tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-auto-detect.vmx index b2c4caf20f..0e24927960 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-auto-detect.vmx +++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-auto-detect.vmx @@ -3,3 +3,4 @@ virtualHW.version = "4" ide0:0.present = "true" ide0:0.deviceType = "cdrom-raw" ide0:0.fileName = "auto detect" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-auto-detect.xml b/tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-auto-detect.xml index 68ad26dc6f..392d580ffa 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-auto-detect.xml +++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-auto-detect.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-device.vmx b/tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-device.vmx index 164811140f..5ec66522c8 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-device.vmx +++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-device.vmx @@ -3,3 +3,4 @@ virtualHW.version = "4" ide0:0.present = "true" ide0:0.deviceType = "cdrom-raw" ide0:0.fileName = "/dev/scd0" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-device.xml b/tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-device.xml index 679cdb154b..c7cba73aa8 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-device.xml +++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-device.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.vmx b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.vmx index 721068aded..5991b71b16 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.vmx +++ b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.vmx @@ -4,3 +4,4 @@ scsi0.present = "true" scsi0:0.present = "true" scsi0:0.deviceType = "atapi-cdrom" scsi0:0.fileName = "/dev/scd0" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.xml b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.xml index cf1275c829..9e5a985788 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.xml +++ b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-empty.vmx b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-empty.vmx index 3c6036ab2b..c08f4cc8ff 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-empty.vmx +++ b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-empty.vmx @@ -4,3 +4,4 @@ scsi0.present = "true" scsi0:0.present = "true" scsi0:0.deviceType = "cdrom-image" scsi0:0.fileName = "emptyBackingString" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-empty.xml b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-empty.xml index 20452522d8..3678ef38b0 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-empty.xml +++ b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-empty.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.vmx b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.vmx index 3422e0b6d9..91acf931aa 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.vmx +++ b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.vmx @@ -4,3 +4,4 @@ scsi0.present = "true" scsi0:0.present = "true" scsi0:0.deviceType = "cdrom-image" scsi0:0.fileName = "cdrom.iso" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml index 29111fb7b6..d10f6ed43d 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml +++ b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-passthru.vmx b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-passthru.vmx index fb7ea724ab..7898304fef 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-passthru.vmx +++ b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-passthru.vmx @@ -4,3 +4,4 @@ scsi0.present = "true" scsi0:0.present = "true" scsi0:0.deviceType = "scsi-passthru" scsi0:0.fileName = "/vmfs/devices/cdrom/mpx.vmhba32:C0:T0:L0" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-passthru.xml b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-passthru.xml index 46e27bce71..b851e73b3b 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-passthru.xml +++ b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-passthru.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-raw-auto-detect.vmx b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-raw-auto-detect.vmx index 0209b291e6..d92af1fd1d 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-raw-auto-detect.vmx +++ b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-raw-auto-detect.vmx @@ -4,3 +4,4 @@ scsi0.present = "true" scsi0:0.present = "true" scsi0:0.deviceType = "cdrom-raw" scsi0:0.fileName = "auto detect" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-raw-auto-detect.xml b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-raw-auto-detect.xml index 9d706b5d04..497066972d 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-raw-auto-detect.xml +++ b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-raw-auto-detect.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-raw-device.vmx b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-raw-device.vmx index 773b7432ea..42817946fc 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-raw-device.vmx +++ b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-raw-device.vmx @@ -4,3 +4,4 @@ scsi0.present = "true" scsi0:0.present = "true" scsi0:0.deviceType = "cdrom-raw" scsi0:0.fileName = "/dev/scd0" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-raw-device.xml b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-raw-device.xml index 9052327dcd..d7d881e4a6 100644 --- a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-raw-device.xml +++ b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-raw-device.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-datacenterpath.vmx b/tests/vmx2xmldata/vmx2xml-datacenterpath.vmx index a8e5db3746..bc17daa772 100644 --- a/tests/vmx2xmldata/vmx2xml-datacenterpath.vmx +++ b/tests/vmx2xmldata/vmx2xml-datacenterpath.vmx @@ -1,2 +1,3 @@ config.version = "8" virtualHW.version = "4" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-datacenterpath.xml b/tests/vmx2xmldata/vmx2xml-datacenterpath.xml index 7d458c5c8e..19920f81f7 100644 --- a/tests/vmx2xmldata/vmx2xml-datacenterpath.xml +++ b/tests/vmx2xmldata/vmx2xml-datacenterpath.xml @@ -1,4 +1,5 @@ <domain type='vmware' xmlns:vmware='http://libvirt.org/schemas/domain/vmware/1.0'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-bridged.vmx b/tests/vmx2xmldata/vmx2xml-ethernet-bridged.vmx index 8b7a5b3bf3..2c80db33b0 100644 --- a/tests/vmx2xmldata/vmx2xml-ethernet-bridged.vmx +++ b/tests/vmx2xmldata/vmx2xml-ethernet-bridged.vmx @@ -5,3 +5,4 @@ ethernet0.networkName = "VM Network" ethernet0.connectionType = "bridged" ethernet0.addressType = "static" ethernet0.address = "00:50:56:11:22:33" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-bridged.xml b/tests/vmx2xmldata/vmx2xml-ethernet-bridged.xml index fac5cd7bd5..84dc0d2ba2 100644 --- a/tests/vmx2xmldata/vmx2xml-ethernet-bridged.xml +++ b/tests/vmx2xmldata/vmx2xml-ethernet-bridged.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-custom.vmx b/tests/vmx2xmldata/vmx2xml-ethernet-custom.vmx index bab8aa1784..9dca6bbf7f 100644 --- a/tests/vmx2xmldata/vmx2xml-ethernet-custom.vmx +++ b/tests/vmx2xmldata/vmx2xml-ethernet-custom.vmx @@ -6,3 +6,4 @@ ethernet0.connectionType = "custom" ethernet0.vnet = "vmnet7" ethernet0.addressType = "static" ethernet0.address = "00:50:56:11:22:33" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-custom.xml b/tests/vmx2xmldata/vmx2xml-ethernet-custom.xml index ce63c24127..a3c6f03f31 100644 --- a/tests/vmx2xmldata/vmx2xml-ethernet-custom.xml +++ b/tests/vmx2xmldata/vmx2xml-ethernet-custom.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-e1000.vmx b/tests/vmx2xmldata/vmx2xml-ethernet-e1000.vmx index eb7c4844db..e31dc2c674 100644 --- a/tests/vmx2xmldata/vmx2xml-ethernet-e1000.vmx +++ b/tests/vmx2xmldata/vmx2xml-ethernet-e1000.vmx @@ -6,3 +6,4 @@ ethernet0.networkName = "VM Network" ethernet0.connectionType = "bridged" ethernet0.addressType = "static" ethernet0.address = "00:50:56:11:22:33" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-e1000.xml b/tests/vmx2xmldata/vmx2xml-ethernet-e1000.xml index 534d35e352..6ab739a0ba 100644 --- a/tests/vmx2xmldata/vmx2xml-ethernet-e1000.xml +++ b/tests/vmx2xmldata/vmx2xml-ethernet-e1000.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-generated.vmx b/tests/vmx2xmldata/vmx2xml-ethernet-generated.vmx index f27e0a008f..15c374b001 100644 --- a/tests/vmx2xmldata/vmx2xml-ethernet-generated.vmx +++ b/tests/vmx2xmldata/vmx2xml-ethernet-generated.vmx @@ -6,3 +6,4 @@ ethernet0.connectionType = "bridged" ethernet0.addressType = "generated" ethernet0.generatedAddress = "00:0C:29:11:22:33" ethernet0.generatedAddressOffset = "0" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-generated.xml b/tests/vmx2xmldata/vmx2xml-ethernet-generated.xml index 3fbc013f21..2d7cf93b54 100644 --- a/tests/vmx2xmldata/vmx2xml-ethernet-generated.xml +++ b/tests/vmx2xmldata/vmx2xml-ethernet-generated.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-nat.vmx b/tests/vmx2xmldata/vmx2xml-ethernet-nat.vmx index 701c3851fb..33aaf2b882 100644 --- a/tests/vmx2xmldata/vmx2xml-ethernet-nat.vmx +++ b/tests/vmx2xmldata/vmx2xml-ethernet-nat.vmx @@ -4,3 +4,4 @@ ethernet0.present = "true" ethernet0.connectionType = "nat" ethernet0.addressType = "static" ethernet0.address = "00:50:56:11:22:33" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-nat.xml b/tests/vmx2xmldata/vmx2xml-ethernet-nat.xml index af721e3059..f9939223be 100644 --- a/tests/vmx2xmldata/vmx2xml-ethernet-nat.xml +++ b/tests/vmx2xmldata/vmx2xml-ethernet-nat.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-other.vmx b/tests/vmx2xmldata/vmx2xml-ethernet-other.vmx index da46a70d46..4d1bf8fe41 100644 --- a/tests/vmx2xmldata/vmx2xml-ethernet-other.vmx +++ b/tests/vmx2xmldata/vmx2xml-ethernet-other.vmx @@ -6,3 +6,4 @@ ethernet0.connectionType = "bridged" ethernet0.checkMACAddress = "false" ethernet0.addressType = "static" ethernet0.address = "00:12:34:56:78:90" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-other.xml b/tests/vmx2xmldata/vmx2xml-ethernet-other.xml index ef324405d7..9cecc262fb 100644 --- a/tests/vmx2xmldata/vmx2xml-ethernet-other.xml +++ b/tests/vmx2xmldata/vmx2xml-ethernet-other.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-static.vmx b/tests/vmx2xmldata/vmx2xml-ethernet-static.vmx index 8b7a5b3bf3..2c80db33b0 100644 --- a/tests/vmx2xmldata/vmx2xml-ethernet-static.vmx +++ b/tests/vmx2xmldata/vmx2xml-ethernet-static.vmx @@ -5,3 +5,4 @@ ethernet0.networkName = "VM Network" ethernet0.connectionType = "bridged" ethernet0.addressType = "static" ethernet0.address = "00:50:56:11:22:33" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-static.xml b/tests/vmx2xmldata/vmx2xml-ethernet-static.xml index fac5cd7bd5..84dc0d2ba2 100644 --- a/tests/vmx2xmldata/vmx2xml-ethernet-static.xml +++ b/tests/vmx2xmldata/vmx2xml-ethernet-static.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-vmxnet2.vmx b/tests/vmx2xmldata/vmx2xml-ethernet-vmxnet2.vmx index 1c3f063365..3306925c07 100644 --- a/tests/vmx2xmldata/vmx2xml-ethernet-vmxnet2.vmx +++ b/tests/vmx2xmldata/vmx2xml-ethernet-vmxnet2.vmx @@ -7,3 +7,4 @@ ethernet0.networkName = "VM Network" ethernet0.connectionType = "bridged" ethernet0.addressType = "static" ethernet0.address = "00:50:56:11:22:33" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-vmxnet2.xml b/tests/vmx2xmldata/vmx2xml-ethernet-vmxnet2.xml index 54c9283989..8ba8f3d465 100644 --- a/tests/vmx2xmldata/vmx2xml-ethernet-vmxnet2.xml +++ b/tests/vmx2xmldata/vmx2xml-ethernet-vmxnet2.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-vpx.vmx b/tests/vmx2xmldata/vmx2xml-ethernet-vpx.vmx index b4d9172764..6ffefe2f76 100644 --- a/tests/vmx2xmldata/vmx2xml-ethernet-vpx.vmx +++ b/tests/vmx2xmldata/vmx2xml-ethernet-vpx.vmx @@ -5,3 +5,4 @@ ethernet0.networkName = "VM Network" ethernet0.connectionType = "bridged" ethernet0.addressType = "vpx" ethernet0.generatedAddress = "00:50:56:87:65:43" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-ethernet-vpx.xml b/tests/vmx2xmldata/vmx2xml-ethernet-vpx.xml index c75d52f5b2..3f10934359 100644 --- a/tests/vmx2xmldata/vmx2xml-ethernet-vpx.xml +++ b/tests/vmx2xmldata/vmx2xml-ethernet-vpx.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-firmware-efi.vmx b/tests/vmx2xmldata/vmx2xml-firmware-efi.vmx index dbb215a5db..93453b56f5 100644 --- a/tests/vmx2xmldata/vmx2xml-firmware-efi.vmx +++ b/tests/vmx2xmldata/vmx2xml-firmware-efi.vmx @@ -1,3 +1,4 @@ config.version = "8" virtualHW.version = "13" firmware = "efi" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-firmware-efi.xml b/tests/vmx2xmldata/vmx2xml-firmware-efi.xml index e21158cebf..fee707fe71 100644 --- a/tests/vmx2xmldata/vmx2xml-firmware-efi.xml +++ b/tests/vmx2xmldata/vmx2xml-firmware-efi.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-floppy-device.vmx b/tests/vmx2xmldata/vmx2xml-floppy-device.vmx index 6c6358d468..323a399b4e 100644 --- a/tests/vmx2xmldata/vmx2xml-floppy-device.vmx +++ b/tests/vmx2xmldata/vmx2xml-floppy-device.vmx @@ -3,3 +3,4 @@ virtualHW.version = "4" floppy0.present = "true" floppy0.fileType = "device" floppy0.fileName = "/dev/fd0" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-floppy-device.xml b/tests/vmx2xmldata/vmx2xml-floppy-device.xml index 3b1317249d..a1264f98a8 100644 --- a/tests/vmx2xmldata/vmx2xml-floppy-device.xml +++ b/tests/vmx2xmldata/vmx2xml-floppy-device.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-floppy-file.vmx b/tests/vmx2xmldata/vmx2xml-floppy-file.vmx index ff50117d16..71b63a1b5d 100644 --- a/tests/vmx2xmldata/vmx2xml-floppy-file.vmx +++ b/tests/vmx2xmldata/vmx2xml-floppy-file.vmx @@ -6,3 +6,4 @@ floppy0.fileName = "floppy.flp" floppy1.present = "true" floppy1.fileType = "file" floppy1.fileName = "floppy" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-floppy-file.xml b/tests/vmx2xmldata/vmx2xml-floppy-file.xml index aaf1f85881..79620211d0 100644 --- a/tests/vmx2xmldata/vmx2xml-floppy-file.xml +++ b/tests/vmx2xmldata/vmx2xml-floppy-file.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-graphics-vnc.vmx b/tests/vmx2xmldata/vmx2xml-graphics-vnc.vmx index bd3e55f7ab..9cba21f4f1 100644 --- a/tests/vmx2xmldata/vmx2xml-graphics-vnc.vmx +++ b/tests/vmx2xmldata/vmx2xml-graphics-vnc.vmx @@ -4,3 +4,4 @@ RemoteDisplay.vnc.enabled = "true" RemoteDisplay.vnc.port = "5903" RemoteDisplay.vnc.keymap = "de" RemoteDisplay.vnc.password = "password" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-graphics-vnc.xml b/tests/vmx2xmldata/vmx2xml-graphics-vnc.xml index 3c575798f4..15a9766403 100644 --- a/tests/vmx2xmldata/vmx2xml-graphics-vnc.xml +++ b/tests/vmx2xmldata/vmx2xml-graphics-vnc.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-harddisk-ide-file.vmx b/tests/vmx2xmldata/vmx2xml-harddisk-ide-file.vmx index a8c71f189b..480b5cd354 100644 --- a/tests/vmx2xmldata/vmx2xml-harddisk-ide-file.vmx +++ b/tests/vmx2xmldata/vmx2xml-harddisk-ide-file.vmx @@ -3,3 +3,4 @@ virtualHW.version = "4" ide0:0.present = "true" ide0:0.deviceType = "ata-hardDisk" ide0:0.fileName = "harddisk.vmdk" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml b/tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml index 56bcaca512..d253aff149 100644 --- a/tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml +++ b/tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.vmx b/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.vmx index 933707c984..b3f5a8c803 100644 --- a/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.vmx +++ b/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.vmx @@ -4,3 +4,4 @@ scsi0.present = "true" scsi0:0.present = "true" scsi0:0.deviceType = "scsi-hardDisk" scsi0:0.fileName = "harddisk.vmdk" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml b/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml index d08e233757..6ed690c348 100644 --- a/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml +++ b/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-harddisk-transient.vmx b/tests/vmx2xmldata/vmx2xml-harddisk-transient.vmx index 68ef3827f7..434a580f41 100644 --- a/tests/vmx2xmldata/vmx2xml-harddisk-transient.vmx +++ b/tests/vmx2xmldata/vmx2xml-harddisk-transient.vmx @@ -4,3 +4,4 @@ ide0:0.present = "true" ide0:0.deviceType = "ata-hardDisk" ide0:0.fileName = "harddisk.vmdk" ide0:0.mode = "independent-nonpersistent" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-harddisk-transient.xml b/tests/vmx2xmldata/vmx2xml-harddisk-transient.xml index 7066b2309a..66cd525655 100644 --- a/tests/vmx2xmldata/vmx2xml-harddisk-transient.xml +++ b/tests/vmx2xmldata/vmx2xml-harddisk-transient.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-minimal-64bit.vmx b/tests/vmx2xmldata/vmx2xml-minimal-64bit.vmx index 73d3972591..d83f2e2644 100644 --- a/tests/vmx2xmldata/vmx2xml-minimal-64bit.vmx +++ b/tests/vmx2xmldata/vmx2xml-minimal-64bit.vmx @@ -1,3 +1,4 @@ config.version = "8" virtualHW.version = "4" guestOS = "other-64" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-minimal-64bit.xml b/tests/vmx2xmldata/vmx2xml-minimal-64bit.xml index 42245d4ba0..d883116f27 100644 --- a/tests/vmx2xmldata/vmx2xml-minimal-64bit.xml +++ b/tests/vmx2xmldata/vmx2xml-minimal-64bit.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-minimal.vmx b/tests/vmx2xmldata/vmx2xml-minimal.vmx index a8e5db3746..bc17daa772 100644 --- a/tests/vmx2xmldata/vmx2xml-minimal.vmx +++ b/tests/vmx2xmldata/vmx2xml-minimal.vmx @@ -1,2 +1,3 @@ config.version = "8" virtualHW.version = "4" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-minimal.xml b/tests/vmx2xmldata/vmx2xml-minimal.xml index 122d59cd77..3d47fa972e 100644 --- a/tests/vmx2xmldata/vmx2xml-minimal.xml +++ b/tests/vmx2xmldata/vmx2xml-minimal.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-parallel-device.vmx b/tests/vmx2xmldata/vmx2xml-parallel-device.vmx index ee2eb749b6..4b499abaf0 100644 --- a/tests/vmx2xmldata/vmx2xml-parallel-device.vmx +++ b/tests/vmx2xmldata/vmx2xml-parallel-device.vmx @@ -3,3 +3,4 @@ virtualHW.version = "4" parallel0.present = "true" parallel0.fileType = "device" parallel0.fileName = "/dev/parallel0" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-parallel-device.xml b/tests/vmx2xmldata/vmx2xml-parallel-device.xml index 3c69198b93..bdf9cfd9d0 100644 --- a/tests/vmx2xmldata/vmx2xml-parallel-device.xml +++ b/tests/vmx2xmldata/vmx2xml-parallel-device.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-parallel-file.vmx b/tests/vmx2xmldata/vmx2xml-parallel-file.vmx index e91906a9d7..6c34c6b454 100644 --- a/tests/vmx2xmldata/vmx2xml-parallel-file.vmx +++ b/tests/vmx2xmldata/vmx2xml-parallel-file.vmx @@ -3,3 +3,4 @@ virtualHW.version = "4" parallel0.present = "true" parallel0.fileType = "file" parallel0.fileName = "parallel0.file" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-parallel-file.xml b/tests/vmx2xmldata/vmx2xml-parallel-file.xml index 037e6aebf1..9787e51bb5 100644 --- a/tests/vmx2xmldata/vmx2xml-parallel-file.xml +++ b/tests/vmx2xmldata/vmx2xml-parallel-file.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-scsi-driver.vmx b/tests/vmx2xmldata/vmx2xml-scsi-driver.vmx index 64d7c99d3a..91a76d2dd1 100644 --- a/tests/vmx2xmldata/vmx2xml-scsi-driver.vmx +++ b/tests/vmx2xmldata/vmx2xml-scsi-driver.vmx @@ -20,3 +20,4 @@ scsi2:0.fileName = "harddisk3.vmdk" scsi3:0.present = "true" scsi3:0.deviceType = "scsi-hardDisk" scsi3:0.fileName = "harddisk4.vmdk" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-scsi-driver.xml b/tests/vmx2xmldata/vmx2xml-scsi-driver.xml index fa1cd5d84d..cdf785da1f 100644 --- a/tests/vmx2xmldata/vmx2xml-scsi-driver.xml +++ b/tests/vmx2xmldata/vmx2xml-scsi-driver.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-scsi-writethrough.vmx b/tests/vmx2xmldata/vmx2xml-scsi-writethrough.vmx index 54ac49c914..a4a61b5fde 100644 --- a/tests/vmx2xmldata/vmx2xml-scsi-writethrough.vmx +++ b/tests/vmx2xmldata/vmx2xml-scsi-writethrough.vmx @@ -6,3 +6,4 @@ scsi0:0.present = "true" scsi0:0.deviceType = "scsi-hardDisk" scsi0:0.fileName = "harddisk.vmdk" scsi0:0.writeThrough = "true" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml b/tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml index 188748e8e2..747f9b0f6c 100644 --- a/tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml +++ b/tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-serial-device.vmx b/tests/vmx2xmldata/vmx2xml-serial-device.vmx index 927f408fbb..131c0de498 100644 --- a/tests/vmx2xmldata/vmx2xml-serial-device.vmx +++ b/tests/vmx2xmldata/vmx2xml-serial-device.vmx @@ -5,3 +5,4 @@ serial0.fileType = "device" serial0.fileName = "/dev/ttyS0" serial1.present = "true" serial1.fileName = "/dev/ttyS1" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-serial-device.xml b/tests/vmx2xmldata/vmx2xml-serial-device.xml index df25d66b98..165db89c8e 100644 --- a/tests/vmx2xmldata/vmx2xml-serial-device.xml +++ b/tests/vmx2xmldata/vmx2xml-serial-device.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-serial-file.vmx b/tests/vmx2xmldata/vmx2xml-serial-file.vmx index 2c3bc39628..e1ed2dd4db 100644 --- a/tests/vmx2xmldata/vmx2xml-serial-file.vmx +++ b/tests/vmx2xmldata/vmx2xml-serial-file.vmx @@ -3,3 +3,4 @@ virtualHW.version = "4" serial0.present = "true" serial0.fileType = "file" serial0.fileName = "serial0.file" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-serial-file.xml b/tests/vmx2xmldata/vmx2xml-serial-file.xml index 5e08e7ffe6..158b4940b4 100644 --- a/tests/vmx2xmldata/vmx2xml-serial-file.xml +++ b/tests/vmx2xmldata/vmx2xml-serial-file.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-serial-network-client.vmx b/tests/vmx2xmldata/vmx2xml-serial-network-client.vmx index 18cfc57c61..fefc27a586 100644 --- a/tests/vmx2xmldata/vmx2xml-serial-network-client.vmx +++ b/tests/vmx2xmldata/vmx2xml-serial-network-client.vmx @@ -4,3 +4,4 @@ serial0.present = "true" serial0.fileType = "network" serial0.fileName = "tcp://192.168.0.17:42001" serial0.network.endPoint = "client" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-serial-network-client.xml b/tests/vmx2xmldata/vmx2xml-serial-network-client.xml index 2e096434f5..19ec90a023 100644 --- a/tests/vmx2xmldata/vmx2xml-serial-network-client.xml +++ b/tests/vmx2xmldata/vmx2xml-serial-network-client.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-serial-network-server.vmx b/tests/vmx2xmldata/vmx2xml-serial-network-server.vmx index d4a9c41310..d7dd20f7f6 100644 --- a/tests/vmx2xmldata/vmx2xml-serial-network-server.vmx +++ b/tests/vmx2xmldata/vmx2xml-serial-network-server.vmx @@ -4,3 +4,4 @@ serial0.present = "true" serial0.fileType = "network" serial0.fileName = "telnets://0.0.0.0:42001" serial0.network.endPoint = "server" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-serial-network-server.xml b/tests/vmx2xmldata/vmx2xml-serial-network-server.xml index 65950e8cea..229ca10fb2 100644 --- a/tests/vmx2xmldata/vmx2xml-serial-network-server.xml +++ b/tests/vmx2xmldata/vmx2xml-serial-network-server.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-serial-pipe-client-app.vmx b/tests/vmx2xmldata/vmx2xml-serial-pipe-client-app.vmx index f104aab099..164502f08b 100644 --- a/tests/vmx2xmldata/vmx2xml-serial-pipe-client-app.vmx +++ b/tests/vmx2xmldata/vmx2xml-serial-pipe-client-app.vmx @@ -5,3 +5,4 @@ serial0.fileType = "pipe" serial0.fileName = "serial0.pipe" serial0.pipe.endPoint = "client" serial0.tryNoRxLoss = "true" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-serial-pipe-client-vm.vmx b/tests/vmx2xmldata/vmx2xml-serial-pipe-client-vm.vmx index 3b487ee5e3..1aeb9152d5 100644 --- a/tests/vmx2xmldata/vmx2xml-serial-pipe-client-vm.vmx +++ b/tests/vmx2xmldata/vmx2xml-serial-pipe-client-vm.vmx @@ -4,3 +4,4 @@ serial0.present = "true" serial0.fileType = "pipe" serial0.fileName = "serial0.pipe" serial0.pipe.endPoint = "client" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-serial-pipe-server-app.vmx b/tests/vmx2xmldata/vmx2xml-serial-pipe-server-app.vmx index 27ee3bc216..4a1bfe22a5 100644 --- a/tests/vmx2xmldata/vmx2xml-serial-pipe-server-app.vmx +++ b/tests/vmx2xmldata/vmx2xml-serial-pipe-server-app.vmx @@ -5,3 +5,4 @@ serial0.fileType = "pipe" serial0.fileName = "serial0.pipe" serial0.pipe.endPoint = "server" serial0.tryNoRxLoss = "true" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-serial-pipe-server-vm.vmx b/tests/vmx2xmldata/vmx2xml-serial-pipe-server-vm.vmx index b99c627eb6..b8f57d7068 100644 --- a/tests/vmx2xmldata/vmx2xml-serial-pipe-server-vm.vmx +++ b/tests/vmx2xmldata/vmx2xml-serial-pipe-server-vm.vmx @@ -4,3 +4,4 @@ serial0.present = "true" serial0.fileType = "pipe" serial0.fileName = "serial0.pipe" serial0.pipe.endPoint = "server" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-serial-pipe.xml b/tests/vmx2xmldata/vmx2xml-serial-pipe.xml index bd425e603e..59a5b978c2 100644 --- a/tests/vmx2xmldata/vmx2xml-serial-pipe.xml +++ b/tests/vmx2xmldata/vmx2xml-serial-pipe.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-sharedfolder.vmx b/tests/vmx2xmldata/vmx2xml-sharedfolder.vmx index e60fcd493b..6053c9dd89 100644 --- a/tests/vmx2xmldata/vmx2xml-sharedfolder.vmx +++ b/tests/vmx2xmldata/vmx2xml-sharedfolder.vmx @@ -7,3 +7,4 @@ sharedFolder0.enabled = "true" sharedFolder0.hostPath = "/path/to/shared" sharedFolder0.guestName = "shared" sharedFolder0.writeAccess = "true" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-sharedfolder.xml b/tests/vmx2xmldata/vmx2xml-sharedfolder.xml index 7fa3203161..f41ef71912 100644 --- a/tests/vmx2xmldata/vmx2xml-sharedfolder.xml +++ b/tests/vmx2xmldata/vmx2xml-sharedfolder.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-smbios.vmx b/tests/vmx2xmldata/vmx2xml-smbios.vmx index 16258b0bea..8fa9d3e08e 100644 --- a/tests/vmx2xmldata/vmx2xml-smbios.vmx +++ b/tests/vmx2xmldata/vmx2xml-smbios.vmx @@ -1,3 +1,4 @@ config.version = "8" virtualHW.version = "4" smbios.reflecthost = "true" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-smbios.xml b/tests/vmx2xmldata/vmx2xml-smbios.xml index 6773502633..53b5fd01b8 100644 --- a/tests/vmx2xmldata/vmx2xml-smbios.xml +++ b/tests/vmx2xmldata/vmx2xml-smbios.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> diff --git a/tests/vmx2xmldata/vmx2xml-svga.vmx b/tests/vmx2xmldata/vmx2xml-svga.vmx index 081d6cee0d..7ed953424c 100644 --- a/tests/vmx2xmldata/vmx2xml-svga.vmx +++ b/tests/vmx2xmldata/vmx2xml-svga.vmx @@ -1,3 +1,4 @@ config.version = "8" virtualHW.version = "4" svga.vramSize = "8388608" +displayName = "test" diff --git a/tests/vmx2xmldata/vmx2xml-svga.xml b/tests/vmx2xmldata/vmx2xml-svga.xml index da0f1a30e2..96dff16d37 100644 --- a/tests/vmx2xmldata/vmx2xml-svga.xml +++ b/tests/vmx2xmldata/vmx2xml-svga.xml @@ -1,4 +1,5 @@ <domain type='vmware'> + <name>test</name> <uuid>00000000-0000-0000-0000-000000000000</uuid> <memory unit='KiB'>32768</memory> <currentMemory unit='KiB'>32768</currentMemory> -- 2.26.2

Validate additional XML documents we use for internal testing. Specifically there's a lot of them belonging to the vmx and bhyve test suite which were not validated. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/virschematest.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/virschematest.c b/tests/virschematest.c index 0a1639bf44..50dcc5d9d7 100644 --- a/tests/virschematest.c +++ b/tests/virschematest.c @@ -231,6 +231,15 @@ static const struct testSchemaEntry schemaDomain[] = { { .dir = "tests/qemuhotplugtestdomains" }, { .dir = "examples/xml/test/", .dirRegex = "testdom.*" }, + { .dir = "tests/qemuhotplugtestcpus" }, + { .dir = "tests/securityselinuxlabeldata" }, + { .dir = "tests/domainconfdata" }, + { .dir = "tests/lxcconf2xmldata" }, + { .dir = "tests/qemumemlockdata" }, + { .dir = "tests/vmx2xmldata" }, + { .dir = "tests/xml2vmxdata" }, + { .dir = "tests/bhyveargv2xmldata" }, + { .dir = "tests/qemuagentdata" }, }; static const struct testSchemaEntry schemaDomainCaps[] = { -- 2.26.2

We weren't validating certain directories containing nwfilter, network and capability XML test files. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/virschematest.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/virschematest.c b/tests/virschematest.c index 50dcc5d9d7..6ce09d4737 100644 --- a/tests/virschematest.c +++ b/tests/virschematest.c @@ -213,6 +213,7 @@ testSchemaEntries(const char *schema, static const struct testSchemaEntry schemaCapability[] = { { .dir = "tests/capabilityschemadata" }, { .dir = "tests/vircaps2xmldata" }, + { .dir = "tests/qemucaps2xmloutdata" }, }; static const struct testSchemaEntry schemaDomain[] = { @@ -272,6 +273,8 @@ static const struct testSchemaEntry schemaNetwork[] = { { .dir = "tests/networkxml2confdata" }, { .dir = "examples/xml/test/", .dirRegex = "testnet.*" }, + { .dir = "tests/networkxml2xmlupdateout" }, + { .dir = "tests/networkxml2firewalldata" }, }; static const struct testSchemaEntry schemaNetworkport[] = { @@ -286,6 +289,8 @@ static const struct testSchemaEntry schemaNodedev[] = { static const struct testSchemaEntry schemaNwfilter[] = { { .dir = "tests/nwfilterxml2xmlout" }, { .dir = "src/nwfilter/xml" }, + { .dir = "tests/nwfilterxml2xmlin" }, + { .dir = "tests/nwfilterxml2firewalldata" }, }; static const struct testSchemaEntry schemaNwfilterbinding[] = { -- 2.26.2
participants (5)
-
Ján Tomko
-
Martin Kletzander
-
Peter Krempa
-
Pino Toscano
-
Roman Bogorodskiy