From dd4c07c77ee11a6f89651990ad66fd96776b58db Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 18 Jun 2020 12:46:55 -0700 Subject: Fuzzer: Ignore V8 warnings on removed flags when comparing VMs (#2916) fixes #2915 --- scripts/fuzz_opt.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index 9e644598e..76d97bd2e 100755 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -223,9 +223,21 @@ def fix_output(out): out = re.sub(r'f64\.const (-?[nanN:abcdefxIity\d+-.]+)', fix_double, out) # mark traps from wasm-opt as exceptions, even though they didn't run in a vm out = out.replace('[trap ', 'exception: [trap ') - # exceptions may differ when optimizing, but an exception should occur. so ignore their types - # also js engines print them out slightly differently - return '\n'.join(map(lambda x: ' *exception*' if 'exception' in x else x, out.splitlines())) + lines = out.splitlines() + for i in range(len(lines)): + line = lines[i] + if 'Warning: unknown flag' in line or 'Try --help for options' in line: + # ignore some VM warnings that don't matter, like if a newer V8 has + # removed a flag that is no longer needed. but print the line so the + # developer can see it. + print(line) + lines[i] = None + elif 'exception' in line: + # exceptions may differ when optimizing, but an exception should + # occur, so ignore their types (also js engines print them out + # slightly differently) + lines[i] = ' *exception*' + return '\n'.join([line for line in lines if line is not None]) def fix_spec_output(out): -- cgit v1.2.3