Bug 1227347 - Part 3 - Remove object-count leak suppression infrastructure. r=erahm, a=test-only
authorAndrew McCreight <continuation@gmail.com>
Tue, 26 Apr 2016 11:46:28 -0700
changeset 332727 623e6b615195618597f0737c4345b3f50aa59b4e
parent 332726 d1e136c93c6da69ec5db5c02e048f745ed91c17d
child 332728 b17fa0c2f2e4537942a5d91b543c825f124564fc
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerserahm, test-only
bugs1227347
milestone48.0a2
Bug 1227347 - Part 3 - Remove object-count leak suppression infrastructure. r=erahm, a=test-only
testing/mozbase/mozleak/mozleak/leaklog.py
--- a/testing/mozbase/mozleak/mozleak/leaklog.py
+++ b/testing/mozbase/mozleak/mozleak/leaklog.py
@@ -35,17 +35,16 @@ def process_single_leak_file(leakLogFile
                         r"(?P<name>[^|]+)\|"
                         r"\s*(?P<size>-?\d+)\s+(?P<bytesLeaked>-?\d+)\s*\|"
                         r"\s*-?\d+\s+(?P<numLeaked>-?\d+)")
     # The class name can contain spaces. We remove trailing whitespace later.
 
     log = log or _get_default_logger()
 
     processString = "%s process:" % processType
-    expectedLeaks = {}
     crashedOnPurpose = False
     totalBytesLeaked = None
     logAsWarning = False
     leakAnalysis = []
     leakedObjectAnalysis = []
     leakedObjectNames = []
     recordLeakedObjects = False
     with open(leakLogFileName, "r") as leaks:
@@ -87,27 +86,19 @@ def process_single_leak_file(leakLogFile
                 else:
                     recordLeakedObjects = False
             if size < 0 or bytesLeaked < 0 or numLeaked < 0:
                 leakAnalysis.append("TEST-UNEXPECTED-FAIL | leakcheck | %s negative leaks caught!"
                                     % processString)
                 logAsWarning = True
                 continue
             if name != "TOTAL" and numLeaked != 0 and recordLeakedObjects:
-                currExpectedLeak = expectedLeaks.get(name, 0)
-                if not expectedLeaks or numLeaked <= currExpectedLeak:
-                    if not expectedLeaks:
-                        leakedObjectNames.append(name)
-                    leakedObjectAnalysis.append("TEST-INFO | leakcheck | %s leaked %d %s"
-                                                % (processString, numLeaked, name))
-                else:
-                    leakedObjectNames.append(name)
-                    leakedObjectAnalysis.append("WARNING | leakcheck | %s leaked too many %s (expected %d, got %d)"
-                                                % (processString, name, currExpectedLeak, numLeaked))
-
+                leakedObjectNames.append(name)
+                leakedObjectAnalysis.append("TEST-INFO | leakcheck | %s leaked %d %s"
+                                            % (processString, numLeaked, name))
 
     leakAnalysis.extend(leakedObjectAnalysis)
     if logAsWarning:
         log.warning('\n'.join(leakAnalysis))
     else:
         log.info('\n'.join(leakAnalysis))
 
     logAsWarning = False
@@ -127,17 +118,17 @@ def process_single_leak_file(leakLogFile
                      % leakLogFileName)
         return
 
     if totalBytesLeaked == 0:
         log.info("TEST-PASS | leakcheck | %s no leaks detected!" %
                  processString)
         return
 
-    if totalBytesLeaked > leakThreshold or (expectedLeaks and leakedObjectNames):
+    if totalBytesLeaked > leakThreshold:
         logAsWarning = True
         # Fail the run if we're over the threshold (which defaults to 0)
         prefix = "TEST-UNEXPECTED-FAIL"
     else:
         prefix = "WARNING"
     # Create a comma delimited string of the first N leaked objects found,
     # to aid with bug summary matching in TBPL. Note: The order of the objects
     # had no significance (they're sorted alphabetically).