mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
test: Check return status for libxlxml2domconfigtest
Commit id d8e8b63d
introduced the test, but neglected to check for
error from virTestLoadFile in testCompareXMLToDomConfig.
Found by Coverity
Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Katerina Koukiou <kkoukiou@redhat.com>
This commit is contained in:
parent
30b2ebb284
commit
05c41f4f1d
@ -104,7 +104,9 @@ testCompareXMLToDomConfig(const char *xmlfile,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
virTestLoadFile(jsonfile, &tempjson);
|
||||
if (virTestLoadFile(jsonfile, &tempjson) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (libxl_domain_config_from_json(cfg->ctx, &expectconfig, tempjson) != 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
"Failed to create libxl_domain_config from JSON doc");
|
||||
|
Loading…
Reference in New Issue
Block a user