summaryrefslogtreecommitdiffstats
path: root/tools/valgrind/valgrind_test.py
diff options
context:
space:
mode:
authortimurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-28 16:34:25 +0000
committertimurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-28 16:34:25 +0000
commitc3e86a745c23deccefd4503075fd890d5737b57f (patch)
tree7423d610783507b4cb6250d85b6acb1285eeb077 /tools/valgrind/valgrind_test.py
parent7cb331a9b2dd452363f6611a757a838afd3439da (diff)
downloadchromium_src-c3e86a745c23deccefd4503075fd890d5737b57f.zip
chromium_src-c3e86a745c23deccefd4503075fd890d5737b57f.tar.gz
chromium_src-c3e86a745c23deccefd4503075fd890d5737b57f.tar.bz2
This CL adds the facility of providing Linux- and
Darwin-specific ignore files to ThreadSanitizer. This is necessary because ThreadSanitizer cannot handle the dSYM files properly and the "src:*" ignore rules don't work on Mac. The ignores_mac file contains the rules that make ThreadSanitizer ignore the false positives reported on base::subtle::{NoBarrier_Load, Release_Store} This patch was prepared by Alexander Potapenko (cc'ed) Review URL: http://codereview.chromium.org/251017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27365 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/valgrind/valgrind_test.py')
-rwxr-xr-xtools/valgrind/valgrind_test.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/tools/valgrind/valgrind_test.py b/tools/valgrind/valgrind_test.py
index b87c06b..0a23088 100755
--- a/tools/valgrind/valgrind_test.py
+++ b/tools/valgrind/valgrind_test.py
@@ -398,9 +398,20 @@ class ThreadSanitizer(ValgrindTool):
raise RuntimeError, "Can't parse flag value (%s)" % flag_value
def ToolSpecificFlags(self):
- ret = ["--ignore=%s" % \
- os.path.join(self._source_dir,
- "tools", "valgrind", "tsan", "ignores.txt")]
+ ret = []
+
+ ignore_files = ["ignores.txt"]
+ platform_suffix = {
+ 'darwin': 'mac',
+ 'linux2': 'linux'
+ }[sys.platform]
+ ignore_files.append("ignores_%s.txt" % platform_suffix)
+ for ignore_file in ignore_files:
+ fullname = os.path.join(self._source_dir,
+ "tools", "valgrind", "tsan", ignore_file)
+ if os.path.exists(fullname):
+ ret += ["--ignore=%s" % fullname]
+
ret += ["--file-prefix-to-cut=%s/" % self._source_dir]
if self.EvalBoolFlag(self._options.pure_happens_before):