diff options
author | Alon Zakai <azakai@google.com> | 2024-12-20 14:50:20 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-20 14:50:20 -0800 |
commit | 5ed6cf191aa88b424f6784ba27ac2ab069234fd7 (patch) | |
tree | dd1053d1baa2b937c1b2763614740defd309ee29 | |
parent | edfd9a17202ae76933f64bf4e171f9a6ebe94b0e (diff) | |
download | binaryen-5ed6cf191aa88b424f6784ba27ac2ab069234fd7.tar.gz binaryen-5ed6cf191aa88b424f6784ba27ac2ab069234fd7.tar.bz2 binaryen-5ed6cf191aa88b424f6784ba27ac2ab069234fd7.zip |
[NFC] Move more logic about unfuzzable tests to a shared location (#7175)
It turns out that #7165 was not enough because we had a second (!?)
list of tests to ignore, and also a condition. Move all that to the shared
location as well, continuing that PR.
Also remove simd.wast from the list, as that issue has been fixed.
-rwxr-xr-x | scripts/fuzz_opt.py | 20 | ||||
-rw-r--r-- | scripts/test/fuzzing.py | 20 |
2 files changed, 20 insertions, 20 deletions
diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index 27f85e7a0..70c5a437c 100755 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -309,8 +309,6 @@ def init_important_initial_contents(): all_tests = shared.get_all_tests() -INITIAL_CONTENTS_IGNORE = fuzzing.unfuzzable_tests - def pick_initial_contents(): # if we use an initial wasm file's contents as the basis for the @@ -334,25 +332,9 @@ def pick_initial_contents(): # no longer exist, and we should just skip it. if not os.path.exists(test_name): return - if os.path.basename(test_name) in INITIAL_CONTENTS_IGNORE: + if not fuzzing.is_fuzzable(test_name): return assert os.path.exists(test_name) - # tests that check validation errors are not helpful for us - if '.fail.' in test_name: - print('initial contents is just a .fail test') - return - if os.path.basename(test_name) in [ - # contains too many segments to run in a wasm VM - 'limit-segments_disable-bulk-memory.wast', - # https://github.com/WebAssembly/binaryen/issues/3203 - 'simd.wast', - # corner cases of escaping of names is not interesting - 'names.wast', - # huge amount of locals that make it extremely slow - 'too_much_for_liveness.wasm' - ]: - print('initial contents is disallowed') - return if test_name.endswith('.wast'): # this can contain multiple modules, pick one diff --git a/scripts/test/fuzzing.py b/scripts/test/fuzzing.py index c1022b6ab..be99af746 100644 --- a/scripts/test/fuzzing.py +++ b/scripts/test/fuzzing.py @@ -12,9 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +import os + # Tests that the fuzzers should not operate on. -unfuzzable_tests = [ +unfuzzable = [ # Float16 is still experimental. 'f16.wast', # not all relaxed SIMD instructions are implemented in the interpreter @@ -73,4 +75,20 @@ unfuzzable_tests = [ 'typed_continuations_contnew.wast', 'typed_continuations_contbind.wast', 'typed_continuations_suspend.wast', + # contains too many segments to run in a wasm VM + 'limit-segments_disable-bulk-memory.wast', + # https://github.com/WebAssembly/binaryen/issues/7176 + 'names.wast', + # huge amount of locals that make it extremely slow + 'too_much_for_liveness.wasm', ] + + +def is_fuzzable(name): + name = os.path.basename(name) + + # It makes no sense to fuzz things that check validation errors. + if '.fail.' in name: + return False + + return name not in unfuzzable |