Commit 8d9412e
authored
Add multi-threaded tests for acquire/release atomics (#8999)
* Add multi-threaded execution tests exercising acquire/release atomics
* Most tests demonstrate at least one possible result that would not be
possible with `seqcst`. It's impossible to write a test that would fail
on an engine that implements `acqrel` using `seqcst`, since
strengthening an atomic operation is always sound.
* `(atomic.fence acqrel)` currently can't be exercised in a way that's
correct without being completely redundant alongside another acqrel
load/store. With a relaxed memory ordering the test would make more
sense.
* Invoke the pause instruction in the `basic.wast` test which was
previously unexercised
* In support.split_wast, ensure that `(thread ...)` and `(wait ...)`
expressions are captured in the split output (the latter is currently a
no-op anyway but best to include it for readability and correctness).
* Rename relaxed_atomic_execution_tests ->
acquire_release_atomics_execution_tests to match the new proposal name
* Passes in Binaryen's interpreter in an uninteresting way because
`(thread)` blocks always run sequentially in a blocking manner.1 parent dae272c commit 8d9412e
5 files changed
Lines changed: 360 additions & 2 deletions
File tree
- scripts/test
- test/spec/acquire-release-atomics
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
| |||
395 | 397 | | |
396 | 398 | | |
397 | 399 | | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
398 | 404 | | |
399 | 405 | | |
400 | 406 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5348 | 5348 | | |
5349 | 5349 | | |
5350 | 5350 | | |
| 5351 | + | |
| 5352 | + | |
5351 | 5353 | | |
5352 | 5354 | | |
5353 | 5355 | | |
| |||
5663 | 5665 | | |
5664 | 5666 | | |
5665 | 5667 | | |
| 5668 | + | |
| 5669 | + | |
| 5670 | + | |
| 5671 | + | |
5666 | 5672 | | |
5667 | 5673 | | |
5668 | 5674 | | |
| |||
0 commit comments