Stream: git-wasmtime

Topic: wasmtime / PR #9560 Refactor how wasm features are calcul...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2024 at 18:31):

alexcrichton requested pchickey for a review on PR #9560.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2024 at 18:31):

alexcrichton opened PR #9560 from alexcrichton:refactor-wast to bytecodealliance:main:

This commit refactors the tests/wast.rs test suite which runs all of the upstream spec tests as *.wast files as well as our own misc_testsuite which has its own suite of *.wast files. Previously the set of wasm features active for each test was a sort of random mishmash and convoluted set of conditionals which was updated and edited over time as upstream proposal test suites evolved. This was then mirrored into our own conventions for misc_testsuite as well. Overall though this has a number of downsides I'm trying to fix here:

The new system implemented in this commit takes a leaf out of the disas tests. There is a new TestConfig structure in the tests/wast.rs harness which is decoded from each test (leading ;;! comments) which enables specifying, in each test, what's required. This encompasses many wasm proposals but additionally captures other behavior like nan-canonicalization. This means that all test files in misc_testsuite/**/*.wast are now manually annotated with what wasm features they require and what's needed to run. This makes per-test configuration much easier, per-config-setting much easier, and blanket ignore-by-proposal for Winch much easier as well.

For spec tests we can't modify the contents of the upstream *.wast files. To handle this they're handled specially where TestConfig is manually created and manipulated for each spec proposal and the main test suite itself. This enables per-proposal configuration that doesn't leak into any others and makes it more obvious what proposals are doing what.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2024 at 18:31):

alexcrichton requested wasmtime-core-reviewers for a review on PR #9560.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2024 at 18:57):

alexcrichton requested fitzgen for a review on PR #9560.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2024 at 20:33):

fitzgen submitted PR review:

Very nice!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2024 at 21:16):

alexcrichton updated PR #9560.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2024 at 21:16):

alexcrichton has enabled auto merge for PR #9560.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2024 at 21:42):

alexcrichton merged PR #9560.


Last updated: Dec 23 2024 at 13:07 UTC