提交 d77e453a 编写于 作者: T Tomáš Ryšavý 提交者: John Ferlan

tests: Rename virtTestLogContentAndReset to virTestLogContentAndReset.

This function doesn't follow our convention of naming functions.
上级 327b8443
......@@ -476,13 +476,13 @@ cpuTestRun(const char *name, const struct data *data)
if (virAsprintf(&label, "CPU %s(%s): %s", apis[data->api], data->arch, name) < 0)
return -1;
tmp = virtTestLogContentAndReset();
tmp = virTestLogContentAndReset();
VIR_FREE(tmp);
if (virTestRun(label, cpuTest[data->api], data) < 0) {
if (virTestGetDebug()) {
char *log;
if ((log = virtTestLogContentAndReset()) &&
if ((log = virTestLogContentAndReset()) &&
strlen(log) > 0)
VIR_TEST_DEBUG("\n%s\n", log);
VIR_FREE(log);
......
......@@ -70,7 +70,7 @@ static int testCompareXMLToArgvFiles(const char *xmlfile,
goto fail;
if (!virTestOOMActive()) {
if ((log = virtTestLogContentAndReset()) == NULL)
if ((log = virTestLogContentAndReset()) == NULL)
goto fail;
if (flags & FLAG_EXPECT_WARNING) {
if (*log) {
......
......@@ -310,7 +310,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
virQEMUCapsFilterByMachineType(extraFlags, vm->def->os.machine);
log = virtTestLogContentAndReset();
log = virTestLogContentAndReset();
VIR_FREE(log);
virResetLastError();
......@@ -353,7 +353,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
}
if (!virTestOOMActive()) {
if (flags & FLAG_EXPECT_FAILURE) {
if ((log = virtTestLogContentAndReset()))
if ((log = virTestLogContentAndReset()))
VIR_TEST_DEBUG("Got expected error: \n%s", log);
}
virResetLastError();
......
......@@ -768,7 +768,7 @@ virtTestLogClose(void *data)
/* Return a malloc'd string (possibly with strlen of 0) of all data
* logged since the last call to this function, or NULL on failure. */
char *
virtTestLogContentAndReset(void)
virTestLogContentAndReset(void)
{
char *ret;
......
......@@ -93,7 +93,7 @@ unsigned int virTestGetRegenerate(void);
fprintf(stderr, __VA_ARGS__); \
} while (0)
char *virtTestLogContentAndReset(void);
char *virTestLogContentAndReset(void);
void virtTestQuiesceLibvirtErrors(bool always);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册