diff options
author | Alon Zakai <azakai@google.com> | 2023-03-01 14:25:10 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-01 14:25:10 -0800 |
commit | 9042f84e213c843d85a90c39ee3006a4d5e4c7a1 (patch) | |
tree | 221f38134a120557545da6bdcd065ec1ccdfd41b | |
parent | 50279271a0561614b41e73ed0b463181ce7c4ba2 (diff) | |
download | binaryen-9042f84e213c843d85a90c39ee3006a4d5e4c7a1.tar.gz binaryen-9042f84e213c843d85a90c39ee3006a4d5e4c7a1.tar.bz2 binaryen-9042f84e213c843d85a90c39ee3006a4d5e4c7a1.zip |
Fuzzer: Count the number of VM runs we ignore (#5538)
If this number ever gets high then we would need to look into
why we ignore so much. Right now we seem to end up ignoring
much less than 1% which seems ok.
-rwxr-xr-x | scripts/fuzz_opt.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index 80cac99f0..e08600472 100755 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -576,6 +576,14 @@ def fix_spec_output(out): return out +ignored_vm_runs = 0 + + +def note_ignored_vm_run(): + global ignored_vm_runs + ignored_vm_runs += 1 + + def run_vm(cmd): def filter_known_issues(output): known_issues = [ @@ -591,6 +599,7 @@ def run_vm(cmd): ] for issue in known_issues: if issue in output: + note_ignored_vm_run() return IGNORE return output @@ -1535,7 +1544,8 @@ if __name__ == '__main__': '(mean:', str(mean) + ', stddev:', str(stddev) + ')', 'speed:', counter / elapsed, 'iters/sec, ', total_wasm_size / elapsed, - 'wasm_bytes/sec\n') + 'wasm_bytes/sec, ', ignored_vm_runs, + 'ignored\n') with open(raw_input_data, 'wb') as f: f.write(bytes([random.randint(0, 255) for x in range(input_size)])) assert os.path.getsize(raw_input_data) == input_size |