tests: Rename virtTestLogContentAndReset to virTestLogContentAndReset.

This function doesn't follow our convention of naming functions.
This commit is contained in:
Tomáš Ryšavý 2016-05-26 17:01:58 +02:00 committed by John Ferlan
parent 327b844341
commit d77e453a01
5 changed files with 7 additions and 7 deletions

View File

@ -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) if (virAsprintf(&label, "CPU %s(%s): %s", apis[data->api], data->arch, name) < 0)
return -1; return -1;
tmp = virtTestLogContentAndReset(); tmp = virTestLogContentAndReset();
VIR_FREE(tmp); VIR_FREE(tmp);
if (virTestRun(label, cpuTest[data->api], data) < 0) { if (virTestRun(label, cpuTest[data->api], data) < 0) {
if (virTestGetDebug()) { if (virTestGetDebug()) {
char *log; char *log;
if ((log = virtTestLogContentAndReset()) && if ((log = virTestLogContentAndReset()) &&
strlen(log) > 0) strlen(log) > 0)
VIR_TEST_DEBUG("\n%s\n", log); VIR_TEST_DEBUG("\n%s\n", log);
VIR_FREE(log); VIR_FREE(log);

View File

@ -70,7 +70,7 @@ static int testCompareXMLToArgvFiles(const char *xmlfile,
goto fail; goto fail;
if (!virTestOOMActive()) { if (!virTestOOMActive()) {
if ((log = virtTestLogContentAndReset()) == NULL) if ((log = virTestLogContentAndReset()) == NULL)
goto fail; goto fail;
if (flags & FLAG_EXPECT_WARNING) { if (flags & FLAG_EXPECT_WARNING) {
if (*log) { if (*log) {

View File

@ -310,7 +310,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
virQEMUCapsFilterByMachineType(extraFlags, vm->def->os.machine); virQEMUCapsFilterByMachineType(extraFlags, vm->def->os.machine);
log = virtTestLogContentAndReset(); log = virTestLogContentAndReset();
VIR_FREE(log); VIR_FREE(log);
virResetLastError(); virResetLastError();
@ -353,7 +353,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
} }
if (!virTestOOMActive()) { if (!virTestOOMActive()) {
if (flags & FLAG_EXPECT_FAILURE) { if (flags & FLAG_EXPECT_FAILURE) {
if ((log = virtTestLogContentAndReset())) if ((log = virTestLogContentAndReset()))
VIR_TEST_DEBUG("Got expected error: \n%s", log); VIR_TEST_DEBUG("Got expected error: \n%s", log);
} }
virResetLastError(); virResetLastError();

View File

@ -768,7 +768,7 @@ virtTestLogClose(void *data)
/* Return a malloc'd string (possibly with strlen of 0) of all 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. */ * logged since the last call to this function, or NULL on failure. */
char * char *
virtTestLogContentAndReset(void) virTestLogContentAndReset(void)
{ {
char *ret; char *ret;

View File

@ -93,7 +93,7 @@ unsigned int virTestGetRegenerate(void);
fprintf(stderr, __VA_ARGS__); \ fprintf(stderr, __VA_ARGS__); \
} while (0) } while (0)
char *virtTestLogContentAndReset(void); char *virTestLogContentAndReset(void);
void virtTestQuiesceLibvirtErrors(bool always); void virtTestQuiesceLibvirtErrors(bool always);