Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[stack-switching] Tests - #13996

#13996
Open
dhil wants to merge 5 commits into
bytecodealliance:mainbytecodealliance/wasmtime:mainfrom
dhil:continuation-testsdhil/wasmtime:continuation-testsCopy head branch name to clipboard
Open

[stack-switching] Tests#13996
dhil wants to merge 5 commits into
bytecodealliance:mainbytecodealliance/wasmtime:mainfrom
dhil:continuation-testsdhil/wasmtime:continuation-testsCopy head branch name to clipboard

Conversation

@dhil

@dhil dhil commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

This patch imports the testsuite from wasmfx/wasmfxtime for stack switching.

Depends on #11717.

@dhil
dhil requested review from a team as code owners July 27, 2026 11:28
@dhil
dhil requested review from cfallin and removed request for a team July 27, 2026 11:28
@dhil
dhil marked this pull request as draft July 27, 2026 11:29
@github-actions github-actions Bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Jul 27, 2026
@dhil
dhil force-pushed the continuation-tests branch 2 times, most recently from 5ec1fb8 to 2c832b5 Compare July 28, 2026 15:11
@dhil
dhil marked this pull request as ready for review July 28, 2026 15:12
Comment thread crates/wast/src/wast.rs Outdated
Comment thread crates/wast/src/wast.rs Outdated
let actual = format!("{trap:?}");
if actual.contains(expected)
|| actual.contains("unhandled tag")
|| actual.contains("Calling suspend outside of a continuation")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@dhil dhil Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

dhil added 2 commits July 28, 2026 17:06
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.
@dhil
dhil force-pushed the continuation-tests branch from 2c832b5 to 448e2f5 Compare July 28, 2026 16:06
@dhil
dhil force-pushed the continuation-tests branch from b7ecd73 to 8175447 Compare July 28, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasmtime:api Related to the API of the `wasmtime` crate itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.