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

Tests fail for target wasm32-wasi #273

Open
Spoonbender opened this issue Feb 1, 2021 · 1 comment
Open

Tests fail for target wasm32-wasi #273

Spoonbender opened this issue Feb 1, 2021 · 1 comment

Comments

@Spoonbender
Copy link

Spoonbender commented Feb 1, 2021

Running cargo build --target wasm32-wasi succeeds, but cargo wasi test fails:

@Spoonbender
Copy link
Author

Just to elaborate on the 2nd case:
According to Testing in WASI, "The wasm32-wasi target for Rust is effectively a panic=abort target which has no support for unwinding". This means that the AssertUnwindSafe function used in tester.rs can't actually perform its duty for this target (or any other panic=abort target).
Additionally, when running cargo wasi test, all tests decorated #[should_panic] are ignored.

This means we need to decide how we'd like quickcheck to behave in case of wasi or any other target that doesn't support unwinding.
The std::panic::set_hook function might be helpful here, as it allows setting a hook that runs on both unwinding and aborting targets.

Adding support for aborting targets, however, could be considered a completely new feature for quicktest - and for the time being we might just ensure tests pass for wasi w/o adding this support.

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

No branches or pull requests

1 participant