mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +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)
|
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);
|
||||||
|
@ -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) {
|
||||||
|
@ -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();
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user