From: Daniel P. Berrange Date: Wed, 9 Jul 2008 10:27:17 +0000 (+0000) Subject: Fix use of VIR_TEST_DEBUG var when OOM testing is not enabled & surpress more valgrin... X-Git-Tag: LIBVIRT_0_4_6~204 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c207f75890f2f2eab1a8ad0ac1862639694c74af;p=thirdparty%2Flibvirt.git Fix use of VIR_TEST_DEBUG var when OOM testing is not enabled & surpress more valgrind warnings --- diff --git a/ChangeLog b/ChangeLog index d84720af2f..5be29ada1b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Wed Jul 9 11:25:44 BST 2008 Daniel P. Berrange + + * tests/testutils.c: Ensure VIR_TEST_DEBUG is used even when + OOM testing is not compiled in + * tests/.valgrind.supp: Supress some bogus warnings caused by + global data we don't expect to ever free. + Wed Jul 9 11:16:44 BST 2008 Daniel P. Berrange * tests/virshtest.c: Remove legacy debugging output diff --git a/tests/.valgrind.supp b/tests/.valgrind.supp index f6900260ba..dc5b7f82a2 100644 --- a/tests/.valgrind.supp +++ b/tests/.valgrind.supp @@ -82,3 +82,81 @@ fun:reader_loop fun:main } +{ + xenDriverGlobalRegexes1 + Memcheck:Leak + fun:* + fun:regcomp + fun:xenHypervisorInit + fun:xenUnifiedRegister + fun:virInitialize + fun:virConnectOpenReadOnly + fun:testCompareHelper + fun:virtTestRun + fun:mymain + fun:virtTestMain +} +{ + xenDriverGlobalRegexes2 + Memcheck:Leak + fun:* + fun:* + fun:regcomp + fun:xenHypervisorInit + fun:xenUnifiedRegister + fun:virInitialize + fun:virConnectOpenReadOnly + fun:testCompareHelper + fun:virtTestRun + fun:mymain + fun:virtTestMain +} +{ + xenDriverGlobalRegexes3 + Memcheck:Leak + fun:* + fun:* + fun:* + fun:regcomp + fun:xenHypervisorInit + fun:xenUnifiedRegister + fun:virInitialize + fun:virConnectOpenReadOnly + fun:testCompareHelper + fun:virtTestRun + fun:mymain + fun:virtTestMain +} +{ + xenDriverGlobalRegexes4 + Memcheck:Leak + fun:* + fun:* + fun:* + fun:* + fun:regcomp + fun:xenHypervisorInit + fun:xenUnifiedRegister + fun:virInitialize + fun:virConnectOpenReadOnly + fun:testCompareHelper + fun:virtTestRun + fun:mymain + fun:virtTestMain +} +{ + libXMLGlobals1 + Memcheck:Leak + fun:malloc + fun:xmlNewMutex + fun:xmlInitGlobals + fun:xmlInitParser + fun:xmlParseDocument + obj:/usr/lib64/libxml2.so.2.6.32 + fun:virDomainDefParseString + fun:testOpen + fun:do_open + fun:testCompareHelper + fun:virtTestRun + fun:mymain +} diff --git a/tests/testutils.c b/tests/testutils.c index 0f4232ad70..571c1b961c 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -321,20 +321,24 @@ int virtTestMain(int argc, char **argv, int (*func)(int, char **)) { + char *debugStr; #if TEST_OOM int ret; int approxAlloc = 0; int n; - char *oomStr = NULL, *debugStr; + char *oomStr = NULL; int oomCount; int mp = 0; pid_t *workers; int worker = 0; +#endif + if ((debugStr = getenv("VIR_TEST_DEBUG")) != NULL) { if (virStrToLong_ui(debugStr, NULL, 10, &testDebug) < 0) testDebug = 0; } +#if TEST_OOM if ((oomStr = getenv("VIR_TEST_OOM")) != NULL) { if (virStrToLong_i(oomStr, NULL, 10, &oomCount) < 0) oomCount = 0;