-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add Tests for native wasm exceptions #113247
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
957e416
to
a0bd381
Compare
Can you also add a test that |
Good point... unfortunately, this behaviour is currently not implemented :( LLVM only generates I will look into it. I believe I can make it work if I add a special However, this should not affect this PR, since adding a test for it would not work at this point |
@bors r+ I'm not really familiar with the details here but the goal seems reasonable and this is adding tests we can modify later. |
…std, r=Mark-Simulacrum Add Tests for native wasm exceptions ### Motivation In PR rust-lang#111322, I added support for native WASM exceptions. I was asked by `@davidtwco` to add some tests for it in a follow up PR, which seems like a very good idea. This PR adds three tests for this feature: * codegen: ensure the correct LLVM instructions are used * assembly: ensure the correct WASM instructions are used * run-make: ensure the exception handling works; the WASM code is run using a small nodejs script which demonstrates the exception handling ### Complications There are a few changes beside adding the tests, which were necessary * Tests for the wasm32-unknown-unknown target are (as far as I know) only run on `test-various`. Its docker image uses nodejs-15, which is very old. Experimental support for wasm-exceptions was added in nodejs16. In nodejs 18.12 (LTS), they are stable. - --> increase nodejs to 18.12 in `test-various` * codegen/assembly tests are not performed for the wasm32-unknown-unknown target yet - --> add those to `test-various` as well Due to the last point, some tests are run which have not run before (assembly+codegen tests for wasm32-unknown-unknown). I added `// ignore wasm32-bare` for those which failed ### Local testing I run all tests locally using both `test-various` and `wasm32`. As far as I know, none of the other systems run any test for wasm32 targets.
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#111618 (Always name the return place.) - rust-lang#113247 (Add Tests for native wasm exceptions) - rust-lang#113273 (Use String or Int to set the opt level) - rust-lang#113469 (Remove `default_free_fn` feature) - rust-lang#113493 (additional io::copy specializations) r? `@ghost` `@rustbot` modify labels: rollup
Motivation
In PR #111322, I added support for native WASM exceptions. I was asked by @davidtwco to add some tests for it in a follow up PR, which seems like a very good idea.
This PR adds three tests for this feature:
Complications
There are a few changes beside adding the tests, which were necessary
test-various
. Its docker image uses nodejs-15, which is very old. Experimental support for wasm-exceptions was added in nodejs16. In nodejs 18.12 (LTS), they are stable.test-various
test-various
as wellDue to the last point, some tests are run which have not run before (assembly+codegen tests for wasm32-unknown-unknown). I added
// ignore wasm32-bare
for those which failedLocal testing
I run all tests locally using both
test-various
andwasm32
. As far as I know, none of the other systems run any test for wasm32 targets.