mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
tests: Rename virtTestLogContentAndReset to virTestLogContentAndReset.
This function doesn't follow our convention of naming functions.
This commit is contained in:
parent
327b844341
commit
d77e453a01
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user