Skip to content

wasi-threads: run test suite - #5907

Merged
alexcrichton merged 6 commits into
bytecodealliance:mainfrom
abrown:wasi-threads-testsuite
Mar 4, 2023
Merged

alexcrichton merged 6 commits into
bytecodealliance:mainfrom
abrown:wasi-threads-testsuite

Conversation

@abrown

@abrown abrown commented Mar 1, 2023

Copy link
Copy Markdown
Member

This change enables the running of the wasi-threads test suite. It relies on a Wasmtime CLI binary being available and runs all *.wasm and *.wat files present in the test suite directory. The results of each execution are compared against a JSON spec file with the same base name as the WebAssembly module. The spec file defines the expected exit code, e.g.

This commit does not yet build any *.c or *.s files from the test suite. That could be done later, perhaps upstream; in the meantime, this work is still valuable as it lays the foundation for running other WASI tests from the in-progress wasi-testsuite which share the same JSON spec infrastructure.

This change enables the running of the wasi-threads [test suite]. It
relies on a Wasmtime CLI binary being available and runs all `*.wasm`
and `*.wat` files present in the test suite directory. The results of
each execution are compared against a JSON spec file with the same base
name as the WebAssembly module. The spec file defines the expected exit
code, e.g.

This commit does not yet build any `*.c` or `*.s` files from the test
suite. That could be done later, perhaps upstream; in the meantime, this
work is still valuable as it lays the foundation for running other WASI
tests from the in-progress [wasi-testsuite] which share the same JSON
spec infrastructure.

[test suite]: https://github.com/WebAssembly/wasi-threads/tree/main/test/testsuite
[wasi-testsuite]: https://github.com/WebAssembly/wasi-testsuite
@abrown
abrown requested a review from alexcrichton March 1, 2023 23:41
@abrown

abrown commented Mar 1, 2023 •

Copy link
Copy Markdown
Member Author

I marked this as "draft" for now because I'm not sure where this should live. It might be better up at the top level tests directory, which already would have built the Wasmtime CLI binary; in the current state there is no checking that it has been built yet. Additionally, if we end up adding more tests from the WASI testsuite, then we could share some of the infrastructure up there (note that currently run_wasmtime_for_output is cloned here from the tests/all/cli_tests.rs file). Looking for some opinions here!

@abrown
abrown marked this pull request as ready for review March 3, 2023 17:12
@abrown
abrown enabled auto-merge March 3, 2023 17:19
@abrown
abrown added this pull request to the merge queue Mar 3, 2023
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 3, 2023
@abrown
abrown added this pull request to the merge queue Mar 3, 2023
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 3, 2023
@alexcrichton
alexcrichton added this pull request to the merge queue Mar 4, 2023
Merged via the queue into bytecodealliance:main with commit ad584f4 Mar 4, 2023
@abrown
abrown deleted the wasi-threads-testsuite branch March 6, 2023 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants