mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Exercise the ABI stability check code in test suite
Any test suite which involves a virDomainDefPtr should call virDomainDefCheckABIStability with itself just as a basic sanity check that the identity-comparison always succeeds. This would have caught the recent NULL pointer access crash. Make sure we cope with def->name being NULL since the VMWare config parser produces NULL names. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
@@ -77,6 +77,11 @@ testCompareParseXML(const char *xmcfg, const char *xml, int xendConfigVersion)
|
||||
VIR_DOMAIN_XML_INACTIVE)))
|
||||
goto fail;
|
||||
|
||||
if (!virDomainDefCheckABIStability(def, def)) {
|
||||
fprintf(stderr, "ABI stability check failed on %s", xml);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (!(conf = xenFormatXM(conn, def, xendConfigVersion)))
|
||||
goto fail;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user