]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Fix use of VIR_TEST_DEBUG var when OOM testing is not enabled & surpress more valgrin...
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 9 Jul 2008 10:27:17 +0000 (10:27 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 9 Jul 2008 10:27:17 +0000 (10:27 +0000)
ChangeLog
tests/.valgrind.supp
tests/testutils.c

index d84720af2f19ff5c700367f913c5e113da459c1f..5be29ada1bf564593ede4770ad90450dd0bb1d67 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Wed Jul  9 11:25:44 BST 2008 Daniel P. Berrange <berrange@redhat.com>
+
+       * 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 <berrange@redhat.com>
 
        * tests/virshtest.c: Remove legacy debugging output
index f6900260bab7d57a0c14bfd7f394f6af54b051f2..dc5b7f82a249cfc9baac472aea13fa88cc04f669 100644 (file)
    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
+}
index 0f4232ad70804b26f5e805bff04370ce4958216f..571c1b961c03a45d0f8140910e3f48fc20fbf24c 100644 (file)
@@ -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;