提交 84494d2e 编写于 作者: D Daniel P. Berrange

Fix warning with OOM testing is disabled

上级 aa2bb9c8
Thu May 29 15:41:00 EST 2008 Daniel P. Berrange <berrange@redhat.com>
* tests/testutils.c: Fix warning when OOM testing is disabled
Thu May 29 15:25:00 EST 2008 Daniel P. Berrange <berrange@redhat.com>
* configure.in, scripts/*: Remove all coverage helper scripts
......
......@@ -287,15 +287,17 @@ int virtTestDifference(FILE *stream,
return 0;
}
#if TEST_OOM
static void
virtTestErrorFuncQuiet(void *data ATTRIBUTE_UNUSED,
virErrorPtr err ATTRIBUTE_UNUSED)
{ }
#endif
#if TEST_OOM_TRACE
static void
virtTestErrorHook(int n, void *data ATTRIBUTE_UNUSED)
{
#if TEST_OOM_TRACE
void *trace[30];
int ntrace = ARRAY_CARDINALITY(trace);
int i;
......@@ -311,8 +313,8 @@ virtTestErrorHook(int n, void *data ATTRIBUTE_UNUSED)
}
free(symbols);
}
#endif
}
#endif
int virtTestMain(int argc,
......@@ -352,9 +354,10 @@ int virtTestMain(int argc,
if (ret != EXIT_SUCCESS)
return EXIT_FAILURE;
#if TEST_OOM_TRACE
if (testDebug)
virAllocTestHook(virtTestErrorHook, NULL);
#endif
if (testOOM) {
/* Makes next test runs quiet... */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册