Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions scripts/fuzz_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -2593,10 +2593,6 @@ def test_one(random_input, given_wasm):
randomize_fuzz_settings()
pick_initial_contents()

opts = get_random_opts()
print('randomized opts:', '\n ' + '\n '.join(opts))
print()

if given_wasm:
# We are given a wasm file to operate on. By default we modify it in the
# usual ways, like running DeNAN on it, which is important in many cases
Expand Down Expand Up @@ -2630,6 +2626,10 @@ def test_one(random_input, given_wasm):
print('pre wasm size:', wasm_size)
update_feature_opts('a.wasm')

opts = get_random_opts()
print('randomized opts:', '\n ' + '\n '.join(opts))
print()
Comment on lines +2629 to +2631

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we include this output in a lit test to cover this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potentially, but I would expect the test output to change over time, even if we fixed the seed and initial contents. For example adding new features to choose from would change the output. I don't think the test would be worth the ongoing maintenance of keeping it up-to-date.


# create a second (optimized) wasm for handlers that want to look at pairs.
generate_command = [in_bin('wasm-opt'), abspath('a.wasm'), '-o', abspath('b.wasm')] + opts + FUZZ_OPTS + FEATURE_OPTS
if PRINT_WATS:
Expand Down Expand Up @@ -2825,7 +2825,7 @@ def get_random_opts():
if '--enable-exception-handling' in FEATURE_OPTS:
print('avoiding --flatten due to exception-handling not supporting it (requires blocks with results)')
continue
if '--gc' not in FEATURE_OPTS:
if '--enable-gc' in FEATURE_OPTS:
print('avoiding --flatten due to GC not supporting it (spilling of non-nullable locals)')
continue
if INITIAL_CONTENTS and os.path.getsize(INITIAL_CONTENTS) > 2000:
Expand Down
Loading