[threads][test][js-api] Add worker-based tests for Wait/Notify#251
Open
backes wants to merge 2 commits intoWebAssembly:mainfrom
Open
[threads][test][js-api] Add worker-based tests for Wait/Notify#251backes wants to merge 2 commits intoWebAssembly:mainfrom
backes wants to merge 2 commits intoWebAssembly:mainfrom
Conversation
Add JS API tests for Atomics.wait and Atomics.notify on WebAssembly.Memory. - On shared memory: Atomics.notify should return the number of notified waiters, and Atomics.wait should return the appropriate wait status. - On unshared memory: Atomics.notify should return 0, while Atomics.wait should trap (throwing a WebAssembly.RuntimeError).
Extend JS API tests for Atomics.wait and Atomics.notify with worker-based scenarios. These tests verify that workers can be correctly woken up by notify calls on shared WebAssembly.Memory. Specifically: - Add worker-path-helper.js to handle worker script path resolution in different environments (WPT vs JS shells). - Add wait-notify-worker.js to execute the wait operation in a background thread. - Add test cases to wait-notify-shared.any.js covering single waiter, sequential multiple waiters, and simultaneous multiple waiters.
Member
Author
|
This PR is based on #250 and extends the test. I don't know how to create such stacked PRs on Github. The first commit is the same as in #250, the second one adds new worker-based tests. I didn't find precedence for such worker tests but tried my best to make them work in all environments. This might need further adjustments if some shells or browsers run into issues, potentially after syncing this to WPT. After #250 got merged we can rebase this PR and it will only contain the added lines and files. |
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.
Extend JS API tests for Atomics.wait and Atomics.notify with worker-based
scenarios. These tests verify that workers can be correctly woken up by
notify calls on shared WebAssembly.Memory.
Specifically:
different environments (WPT vs JS shells).
thread.
sequential multiple waiters, and simultaneous multiple waiters.