Commit cdcdc25d authored by aroben@apple.com's avatar aroben@apple.com

Ignore some leaks in frameworks we link against on Lion

Fixes <http://webkit.org/b/72609> Lion Leaks bot complains about a bunch of leaks that
aren't WebKit's fault

Reviewed by Antti Koivisto.

* Scripts/old-run-webkit-tests:
(countAndPrintLeaks):
* Scripts/webkitpy/layout_tests/port/leakdetector.py:
(LeakDetector._callstacks_to_exclude_from_leaks):
Added some call stacks to exclude on Lion that represent leaks in lower-level frameworks.

* Scripts/webkitpy/layout_tests/port/mac.py:
(MacPort.is_lion): Added.

* Scripts/webkitpy/layout_tests/port/mac_unittest.py:
(MacPortTest.test_is_version_methods): Added tests for the is_leopard/is_snowleopard/is_lion
methods.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent df772c12
2011-11-17 Adam Roben <aroben@apple.com>
Ignore some leaks in frameworks we link against on Lion
Fixes <http://webkit.org/b/72609> Lion Leaks bot complains about a bunch of leaks that
aren't WebKit's fault
Reviewed by Antti Koivisto.
* Scripts/old-run-webkit-tests:
(countAndPrintLeaks):
* Scripts/webkitpy/layout_tests/port/leakdetector.py:
(LeakDetector._callstacks_to_exclude_from_leaks):
Added some call stacks to exclude on Lion that represent leaks in lower-level frameworks.
* Scripts/webkitpy/layout_tests/port/mac.py:
(MacPort.is_lion): Added.
* Scripts/webkitpy/layout_tests/port/mac_unittest.py:
(MacPortTest.test_is_version_methods): Added tests for the is_leopard/is_snowleopard/is_lion
methods.
2011-11-17 Philippe Normand <pnormand@igalia.com>
[GTK] Disable ref tests
......@@ -1279,6 +1279,14 @@ sub countAndPrintLeaks($$$)
);
}
if (isLion()) {
push @callStacksToExclude, (
"FigByteFlumeCustomURLCreateWithURL", # <rdar://problem/10461926> leak in CoreMedia
"PDFPage\\(PDFPageInternal\\) pageLayoutIfAvail", # <rdar://problem/10462055> leak in PDFKit
"_NSCopyStyleRefForFocusRingStyleClip", # <rdar://problem/10462031> leak in AppKit
);
}
my $leaksTool = sourceDir() . "/Tools/Scripts/run-leaks";
my $excludeString = "--exclude-callstack '" . (join "' --exclude-callstack '", @callStacksToExclude) . "'";
$excludeString .= " --exclude-type '" . (join "' --exclude-type '", @typesToExclude) . "'" if @typesToExclude;
......
......@@ -76,6 +76,12 @@ class LeakDetector(object):
"glrCompExecuteKernel", # <rdar://problem/7815391> leak in graphics driver while using OpenGL
"NSNumberFormatter getObjectValue:forString:errorDescription:", # <rdar://problem/7149350> Leak in NSNumberFormatter
]
elif self._port.is_lion():
callstacks += [
"FigByteFlumeCustomURLCreateWithURL", # <rdar://problem/10461926> leak in CoreMedia
"PDFPage\(PDFPageInternal\) pageLayoutIfAvail", # <rdar://problem/10462055> leak in PDFKit
"_NSCopyStyleRefForFocusRingStyleClip", # <rdar://problem/10462031> leak in AppKit
]
return callstacks
def _leaks_args(self, pid):
......
......@@ -112,6 +112,10 @@ class MacPort(ApplePort):
def is_snowleopard(self):
return self._version == "snowleopard"
# Belongs on a Platform object.
def is_lion(self):
return self._version == "lion"
# Belongs on a Platform object.
def is_crash_reporter(self, process_name):
return re.search(r'ReportCrash', process_name)
......
......@@ -113,6 +113,22 @@ java/
self.assertRaises(AssertionError, self.assert_name, None, '10.3.1', 'should-raise-assertion-so-this-value-does-not-matter')
def test_is_version_methods(self):
leopard_port = self.make_port(port_name='mac-leopard', os_version_string='10.5.3')
self.assertTrue(leopard_port.is_leopard())
self.assertFalse(leopard_port.is_snowleopard())
self.assertFalse(leopard_port.is_lion())
snowleopard_port = self.make_port(port_name='mac-snowleopard', os_version_string='10.6.3')
self.assertFalse(snowleopard_port.is_leopard())
self.assertTrue(snowleopard_port.is_snowleopard())
self.assertFalse(snowleopard_port.is_lion())
lion_port = self.make_port(port_name='mac-lion', os_version_string='10.7.2')
self.assertFalse(lion_port.is_leopard())
self.assertFalse(lion_port.is_snowleopard())
self.assertTrue(lion_port.is_lion())
def test_setup_environ_for_server(self):
port = MacPort(MockHost(), options=MockOptions(leaks=True, guard_malloc=True))
env = port.setup_environ_for_server(port.driver_name())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment