[stack-switching] Tests - #13996
#13996Open
dhil wants to merge 5 commits into
Open
[stack-switching] Tests#13996dhil wants to merge 5 commits into
dhil wants to merge 5 commits into
Conversation
dhil
marked this pull request as draft
July 27, 2026 11:29
dhil
force-pushed
the
continuation-tests
branch
2 times, most recently
from
July 28, 2026 15:11
5ec1fb8 to
2c832b5
Compare
dhil
marked this pull request as ready for review
July 28, 2026 15:12
dhil
commented
Jul 28, 2026
cfallin
reviewed
Jul 28, 2026
| let actual = format!("{trap:?}"); | ||
| if actual.contains(expected) | ||
| || actual.contains("unhandled tag") | ||
| || actual.contains("Calling suspend outside of a continuation") |
Member
There was a problem hiding this comment.
Rather than match on an error message, could we try to downcast the trap (see e.g. the assert_exception case above)?
I see at least UnhandledTag; a quick skim didn't find the suspend-outside-cont but I guess you'd know what kind of trap that raises (and we can add a variant if it is not distinguished currently).
Contributor
Author
There was a problem hiding this comment.
Fixed in 73b99fc. Thanks!
I realised that we map unhandled suspension and suspension outside a continuation to the same trap UnhandledTag. I think the difference manifests only in the spec interpreter's testsuite, meaning I think we can freely ignore the distinction here.
This patch imports the testsuite from wasmfx/wasmfxtime for stack switching. Move the contents of `continuation_traps.rs` into the `stack_switching.rs` test file.
prtest:full
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch imports the testsuite from wasmfx/wasmfxtime for stack switching.
Depends on #11717.