Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasi-threads: run test suite #5907

Merged
merged 6 commits into from
Mar 4, 2023

Conversation

abrown
Copy link
Collaborator

@abrown abrown commented Mar 1, 2023

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
Copy link
Collaborator Author

abrown commented Mar 1, 2023

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