提交 3debed1b 编写于 作者: D Daniel P. Berrange

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: NDaniel P. Berrange <berrange@redhat.com>
上级 93ac9540
......@@ -79,18 +79,23 @@ testCompareXMLToXMLHelper(const void *data)
goto cleanup;
if (info->different) {
ret = testCompareXMLToXMLFiles(xml_in, xml_out, false);
if (testCompareXMLToXMLFiles(xml_in, xml_out, false) < 0)
goto cleanup;
} else {
ret = testCompareXMLToXMLFiles(xml_in, xml_in, false);
if (testCompareXMLToXMLFiles(xml_in, xml_in, false) < 0)
goto cleanup;
}
if (!info->inactive_only) {
if (info->different) {
ret = testCompareXMLToXMLFiles(xml_in, xml_out, true);
if (testCompareXMLToXMLFiles(xml_in, xml_out, true) < 0)
goto cleanup;
} else {
ret = testCompareXMLToXMLFiles(xml_in, xml_in, true);
if (testCompareXMLToXMLFiles(xml_in, xml_in, true) < 0)
goto cleanup;
}
}
ret = 0;
cleanup:
VIR_FREE(xml_in);
VIR_FREE(xml_out);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册