OLD | NEW |
1 # Copyright 2016 the V8 project authors. All rights reserved. | 1 # Copyright 2016 the V8 project authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """ | 5 """ |
6 Suppressions for V8 correctness fuzzer failures. | 6 Suppressions for V8 correctness fuzzer failures. |
7 | 7 |
8 We support three types of suppressions: | 8 We support three types of suppressions: |
9 1. Ignore test case by pattern. | 9 1. Ignore test case by pattern. |
10 Map a regular expression to a bug entry. A new failure will be reported | 10 Map a regular expression to a bug entry. A new failure will be reported |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 import itertools | 27 import itertools |
28 import re | 28 import re |
29 | 29 |
30 # Max line length for regular experessions checking for lines to ignore. | 30 # Max line length for regular experessions checking for lines to ignore. |
31 MAX_LINE_LENGTH = 512 | 31 MAX_LINE_LENGTH = 512 |
32 | 32 |
33 # For ignoring lines before carets and to ignore caret positions. | 33 # For ignoring lines before carets and to ignore caret positions. |
34 CARET_RE = re.compile(r'^\s*\^\s*$') | 34 CARET_RE = re.compile(r'^\s*\^\s*$') |
35 | 35 |
36 # Ignore by original source files. Map from bug->relative file paths in V8, | 36 # Ignore by original source files. Map from bug->list of relative file paths in |
37 # e.g. '/v8/test/mjsunit/d8-performance-now.js' including /v8/. A test will | 37 # V8, e.g. '/v8/test/mjsunit/d8-performance-now.js' including /v8/. A test will |
38 # be suppressed if one of the files below was used to mutate the test. | 38 # be suppressed if one of the files below was used to mutate the test. |
39 IGNORE_SOURCES = { | 39 IGNORE_SOURCES = { |
40 # This contains a usage of f.arguments that often fires. | 40 # This contains a usage of f.arguments that often fires. |
41 'crbug.com/662424': '/v8/test/mjsunit/regress/regress-2989.js', | 41 'crbug.com/662424': ['/v8/test/mjsunit/regress/regress-2989.js'], |
42 | 42 |
43 # crbug.com/681088 | 43 # crbug.com/681088 |
44 'crbug.com/681088': '/v8/test/mjsunit/asm/asm-validation.js', | 44 'crbug.com/681088': [ |
45 'crbug.com/681088': '/v8/test/mjsunit/asm/b5528-comma.js', | 45 '/v8/test/mjsunit/asm/asm-validation.js', |
46 'crbug.com/681088': '/v8/test/mjsunit/asm/pointer-masking.js', | 46 '/v8/test/mjsunit/asm/b5528-comma.js', |
47 'crbug.com/681088': '/v8/test/mjsunit/compiler/regress-443744.js', | 47 '/v8/test/mjsunit/asm/pointer-masking.js', |
48 'crbug.com/681088': '/v8/test/mjsunit/regress/regress-599719.js', | 48 '/v8/test/mjsunit/compiler/regress-443744.js', |
49 'crbug.com/681088': '/v8/test/mjsunit/regress/wasm/regression-647649.js', | 49 '/v8/test/mjsunit/regress/regress-599719.js', |
50 'crbug.com/681088': '/v8/test/mjsunit/wasm/asm-wasm.js', | 50 '/v8/test/mjsunit/regress/wasm/regression-647649.js', |
51 'crbug.com/681088': '/v8/test/mjsunit/wasm/asm-wasm-deopt.js', | 51 '/v8/test/mjsunit/wasm/asm-wasm.js', |
52 'crbug.com/681088': '/v8/test/mjsunit/wasm/asm-wasm-heap.js', | 52 '/v8/test/mjsunit/wasm/asm-wasm-deopt.js', |
53 'crbug.com/681088': '/v8/test/mjsunit/wasm/asm-wasm-literals.js', | 53 '/v8/test/mjsunit/wasm/asm-wasm-heap.js', |
54 'crbug.com/681088': '/v8/test/mjsunit/wasm/asm-wasm-stack.js', | 54 '/v8/test/mjsunit/wasm/asm-wasm-literals.js', |
| 55 '/v8/test/mjsunit/wasm/asm-wasm-stack.js', |
| 56 ], |
55 | 57 |
56 # crbug.com/681236 | 58 # crbug.com/681236 |
57 'crbug.com/681236': '/v8/test/mjsunit/wasm/asm-wasm-switch.js', | 59 'crbug.com/681236': ['/v8/test/mjsunit/wasm/asm-wasm-switch.js'], |
| 60 |
| 61 # crbug.com/681241 |
| 62 'crbug.com/681241': [ |
| 63 '/v8/test/mjsunit/regress/regress-617526.js', |
| 64 '/v8/test/mjsunit/regress/wasm/regression-02862.js', |
| 65 ], |
58 } | 66 } |
59 | 67 |
60 # Ignore by test case pattern. Map from bug->regexp. | 68 # Ignore by test case pattern. Map from bug->regexp. |
61 # Regular expressions are assumed to be compiled. We use regexp.match. | 69 # Regular expressions are assumed to be compiled. We use regexp.match. |
62 # Make sure the code doesn't match in the preamble portion of the test case | 70 # Make sure the code doesn't match in the preamble portion of the test case |
63 # (i.e. in the modified inlined mjsunit.js). You can reference the comment | 71 # (i.e. in the modified inlined mjsunit.js). You can reference the comment |
64 # between the two parts like so: | 72 # between the two parts like so: |
65 # 'crbug.com/666308': | 73 # 'crbug.com/666308': |
66 # re.compile(r'.*End stripped down and modified version.*' | 74 # re.compile(r'.*End stripped down and modified version.*' |
67 # r'\.prototype.*instanceof.*.*', re.S) | 75 # r'\.prototype.*instanceof.*.*', re.S) |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 IGNORE_LINES, | 301 IGNORE_LINES, |
294 ) | 302 ) |
295 | 303 |
296 def ignore_by_content(self, testcase): | 304 def ignore_by_content(self, testcase): |
297 for bug, exp in IGNORE_TEST_CASES.iteritems(): | 305 for bug, exp in IGNORE_TEST_CASES.iteritems(): |
298 if exp.match(testcase): | 306 if exp.match(testcase): |
299 return bug | 307 return bug |
300 return False | 308 return False |
301 | 309 |
302 def ignore_by_metadata(self, metadata): | 310 def ignore_by_metadata(self, metadata): |
303 for bug, source in IGNORE_SOURCES.iteritems(): | 311 for bug, sources in IGNORE_SOURCES.iteritems(): |
304 if source in metadata['sources']: | 312 for source in sources: |
305 return bug | 313 if source in metadata['sources']: |
| 314 return bug |
306 return False | 315 return False |
307 | 316 |
308 def ignore_by_output1(self, output): | 317 def ignore_by_output1(self, output): |
309 return self.ignore_by_output(output, self.arch1, self.config1) | 318 return self.ignore_by_output(output, self.arch1, self.config1) |
310 | 319 |
311 def ignore_by_output2(self, output): | 320 def ignore_by_output2(self, output): |
312 return self.ignore_by_output(output, self.arch2, self.config2) | 321 return self.ignore_by_output(output, self.arch2, self.config2) |
313 | 322 |
314 def ignore_by_output(self, output, arch, config): | 323 def ignore_by_output(self, output, arch, config): |
315 def check(mapping): | 324 def check(mapping): |
316 for bug, exp in mapping.iteritems(): | 325 for bug, exp in mapping.iteritems(): |
317 if exp.search(output): | 326 if exp.search(output): |
318 return bug | 327 return bug |
319 return None | 328 return None |
320 bug = check(IGNORE_OUTPUT.get('', {})) | 329 bug = check(IGNORE_OUTPUT.get('', {})) |
321 if bug: | 330 if bug: |
322 return bug | 331 return bug |
323 bug = check(IGNORE_OUTPUT.get(arch, {})) | 332 bug = check(IGNORE_OUTPUT.get(arch, {})) |
324 if bug: | 333 if bug: |
325 return bug | 334 return bug |
326 bug = check(IGNORE_OUTPUT.get(config, {})) | 335 bug = check(IGNORE_OUTPUT.get(config, {})) |
327 if bug: | 336 if bug: |
328 return bug | 337 return bug |
329 bug = check(IGNORE_OUTPUT.get('%s,%s' % (arch, config), {})) | 338 bug = check(IGNORE_OUTPUT.get('%s,%s' % (arch, config), {})) |
330 if bug: | 339 if bug: |
331 return bug | 340 return bug |
332 return None | 341 return None |
OLD | NEW |