testCompareDomXML2XMLFiles: add parseFlags parameter

Allow testing XML parsing with different flags.
This commit is contained in:
Ján Tomko
2016-02-25 15:17:14 +01:00
parent e4f1be7eb6
commit 1d6dcec080
6 changed files with 11 additions and 7 deletions

View File

@@ -1054,13 +1054,16 @@ int
testCompareDomXML2XMLFiles(virCapsPtr caps, virDomainXMLOptionPtr xmlopt,
const char *infile, const char *outfile, bool live,
testCompareDomXML2XMLPreFormatCallback cb,
const void *opaque)
const void *opaque, unsigned int parseFlags)
{
char *actual = NULL;
int ret = -1;
virDomainDefPtr def = NULL;
unsigned int parse_flags = live ? 0 : VIR_DOMAIN_DEF_PARSE_INACTIVE;
unsigned int format_flags = VIR_DOMAIN_DEF_FORMAT_SECURE;
parse_flags |= parseFlags;
if (!live)
format_flags |= VIR_DOMAIN_DEF_FORMAT_INACTIVE;