From 42f70a7c8608f5fc85b2676fda29b8405459ebdf Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Wed, 6 Nov 2019 16:12:51 -0800 Subject: Improve type selection in fuzzer (#2424) - Adds `items` function for `FeatureOptions` so we can get a vector of eligible types - Replaces hardcoded enumeration of MVP types with `getConcreteTypes`, which also adds v128 type to the list if SIMD is enabled - Removes `getType()` function; this does not seem to be used anywhere - Renames `vectorPick` with `pick` - Use the absolute path for d8 in the fuzzer --- scripts/fuzz_opt.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index 20676f70e..3087705ab 100644 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -22,7 +22,7 @@ import shutil import sys import time -from test.shared import options, NODEJS, V8_OPTS +from test.shared import options, NODEJS, V8_OPTS, V8 # parameters @@ -166,7 +166,7 @@ def run_bynterp(wasm, args): def run_d8(wasm): - return run_vm(['d8'] + V8_OPTS + [in_binaryen('scripts', 'fuzz_shell.js'), '--', wasm]) + return run_vm([V8] + V8_OPTS + [in_binaryen('scripts', 'fuzz_shell.js'), '--', wasm]) # There are two types of test case handlers: @@ -200,10 +200,10 @@ class CompareVMs(TestCaseHandler): def run_vms(self, js, wasm): results = [] results.append(fix_output(run_bynterp(wasm, ['--fuzz-exec-before']))) - results.append(fix_output(run_vm(['d8', js] + V8_OPTS + ['--', wasm]))) + results.append(fix_output(run_vm([V8, js] + V8_OPTS + ['--', wasm]))) # append to add results from VMs - # results += [fix_output(run_vm(['d8', js] + V8_OPTS + ['--', wasm]))] + # results += [fix_output(run_vm([V8, js] + V8_OPTS + ['--', wasm]))] # results += [fix_output(run_vm([os.path.expanduser('~/.jsvu/jsc'), js, '--', wasm]))] # spec has no mechanism to not halt on a trap. so we just check until the first trap, basically # run(['../spec/interpreter/wasm', wasm]) -- cgit v1.2.3