Skip to content

make during-sync-call-no-sibling-resume.wast a bit more robust - #770

Merged
lukewagner merged 1 commit into
WebAssembly:mainfrom
dicej:tweak-during-sync-call-no-sibling-resume
Nov 19, 2026
Merged

lukewagner merged 1 commit into
WebAssembly:mainfrom
dicej:tweak-during-sync-call-no-sibling-resume

Conversation

@dicej

@dicej dicej commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Previously, the second test in that file was overly sensitive to how the runtime might schedule consecutive host->guest calls and any threads they might spawn. Specifically, it assumed that, if the first of two calls does a thread.resume-later, the second call would run before that thread resumes. I don't believe there's anything in the spec that requires that behavior, and indeed I'm working on a Wasmtime patch which breaks that assumption.

My solution is to refactor the test a bit so that there's only one host->guest call, and the rest is taken care of inside the guest.

Previously, the second test in that file was overly sensitive to how the runtime
might schedule consecutive host->guest calls and any threads they might spawn.
Specifically, it assumed that, if the first of two calls does a
`thread.resume-later`, the second call would run before that thread resumes.  I
don't believe there's anything in the spec that requires that behavior, and
indeed I'm working on a Wasmtime patch which breaks that assumption.

My solution is to refactor the test a bit so that there's only one host->guest
call, and the rest is taken care of inside the guest.
@dicej
dicej requested a review from lukewagner November 18, 2026 23:09
@lukewagner

Copy link
Copy Markdown
Member

Makes sense, thanks!

@lukewagner
lukewagner merged commit 585526a into WebAssembly:main Nov 19, 2026
1 check passed
q82419 added a commit to WasmEdge/wasmedge-spectest that referenced this pull request Nov 20, 2026
* Resync two tests with the spec repository at 585526a (2026/11/18):
  * component-model-async/during-sync-call-exclusive-resume: a task
    whose last thread exits without a result no longer traps
    (WebAssembly/component-model#767). The callback task that exits
    during a synchronous call now ends in the trap of the blocked
    synchronous call, so the expected message is the upstream one
    again.
  * component-model-async/during-sync-call-no-sibling-resume: the
    second case arms the sibling from inside the guest, with a single
    call from the host (WebAssembly/component-model#770).
* Add one test from the same commit:
  * component-model-async/exit-without-resolving: a task whose threads
    have all exited without a result stays unresolved; a caller that
    waits for it traps or deadlocks, and a caller that does not wait
    returns.
* Follow the rename of Explainer.md to Text.md in the comments of
  component-model-validation/annotated-names,
  component-model-validation/external-visibility, and
  component-model-validation/resources. Their converted files do not
  change.
* Update the README: every test now matches spec commit 585526a, the
  three async tests above are converted with wasm-tools 1.263.0, the
  message change of during-sync-call-exclusive-resume leaves the list,
  and exit-without-resolving joins the tests listed in `test/nyi.txt`.

Assisted-by: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: YiYing He <yiying@secondstate.io>
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