alexcrichton opened PR #11560 from alexcrichton:refactor-wasi-testsuite to bytecodealliance:main:
This commit updates the
WebAssembly/wasi-testuitesubmodule in this repository which hasn't been updated once in the past 2 years. This then additionally refactors how tests are run:
- A new top-level test is added at
tests/wasi.rssimilar totests/wast.rs.- The top-level test uses
libtest_mimicto enable running tests in parallel.- Using
libtest_mimicenables running a test-at-a-time.- Using
libtest_mimicenables seeing a list of failures instead of just the first failure.- Component versions of tests are run in addition to core wasm versions of tests.
- Minor updates are made to the adapter and wasmtime-wasi to get some tests passing.
- The list of allowed failures is updated with a
FIXME-per-test of what's remaining.prtest:full
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton edited PR #11560:
This commit updates the
WebAssembly/wasi-testuitesubmodule in this repository which hasn't been updated once in the past 2 years. This then additionally refactors how tests are run:
- A new top-level test is added at
tests/wasi.rssimilar totests/wast.rs.- The top-level test uses
libtest_mimicto enable running tests in parallel.- Using
libtest_mimicenables running a test-at-a-time.- Using
libtest_mimicenables seeing a list of failures instead of just the first failure.- Component versions of tests are run in addition to core wasm versions of tests.
- Minor updates are made to the adapter and wasmtime-wasi to get some tests passing.
- The list of allowed failures is updated with a
FIXME-per-test of what's remaining.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton commented on PR #11560:
This test suite hasn't been running on Windows so this is a draft until I get CI passing.
alexcrichton updated PR #11560.
alexcrichton updated PR #11560.
alexcrichton has marked PR #11560 as ready for review.
alexcrichton requested wasmtime-wasi-reviewers for a review on PR #11560.
alexcrichton requested fitzgen for a review on PR #11560.
alexcrichton requested wasmtime-core-reviewers for a review on PR #11560.
alexcrichton requested wasmtime-default-reviewers for a review on PR #11560.
alexcrichton commented on PR #11560:
Ok all good now (just needed a huge allow-list of failures on Windows...)
abrown submitted PR review:
Thanks for moving and improving the old test. My only question has to do with the change to the WASI renumbering semantics.
abrown created PR review comment:
I don't know much about this implementation, but shouldn't this succeed as it did previously? Doesn't the logic in
descriptor.rsbelow expand the table so this _should_ work?
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Part of the change here is to explicitly reject
fd_renumberinto an invalid file descriptor (aka one un-opened like*fd + 100here). The wasi-testsuite upstream specifically asserts that's a failure, where previously we explicitly supported that.
abrown submitted PR review.
abrown created PR review comment:
Ok, so perhaps we no longer should expand the table? Probably someone more familiar with this should have an opinion here... Feel free to merge if I'm nitpicking here.
alexcrichton created PR review comment:
This is something we can eventually clean up in the future but the extend-the-table code shouldn't ever get hit any more because both to/from are guaranteed to be allocated. In that sense it's just dynamically dead code right now but otherwise harmless
alexcrichton submitted PR review.
alexcrichton merged PR #11560.
Last updated: Dec 06 2025 at 06:05 UTC