mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
Don't clobber 'ret' in LXC XML test case
The testCompareXMLToXMLHelper method clobbered the 'ret' variable in several places leading to a failure to report OOM errors from the test suite. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
93ac954094
commit
3debed1bbd
@ -79,18 +79,23 @@ testCompareXMLToXMLHelper(const void *data)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (info->different) {
|
if (info->different) {
|
||||||
ret = testCompareXMLToXMLFiles(xml_in, xml_out, false);
|
if (testCompareXMLToXMLFiles(xml_in, xml_out, false) < 0)
|
||||||
|
goto cleanup;
|
||||||
} else {
|
} else {
|
||||||
ret = testCompareXMLToXMLFiles(xml_in, xml_in, false);
|
if (testCompareXMLToXMLFiles(xml_in, xml_in, false) < 0)
|
||||||
|
goto cleanup;
|
||||||
}
|
}
|
||||||
if (!info->inactive_only) {
|
if (!info->inactive_only) {
|
||||||
if (info->different) {
|
if (info->different) {
|
||||||
ret = testCompareXMLToXMLFiles(xml_in, xml_out, true);
|
if (testCompareXMLToXMLFiles(xml_in, xml_out, true) < 0)
|
||||||
|
goto cleanup;
|
||||||
} else {
|
} else {
|
||||||
ret = testCompareXMLToXMLFiles(xml_in, xml_in, true);
|
if (testCompareXMLToXMLFiles(xml_in, xml_in, true) < 0)
|
||||||
|
goto cleanup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(xml_in);
|
VIR_FREE(xml_in);
|
||||||
VIR_FREE(xml_out);
|
VIR_FREE(xml_out);
|
||||||
|
Loading…
Reference in New Issue
Block a user