Skip to content

Commit

Permalink
import shared memory in wat tests
Browse files Browse the repository at this point in the history
as suggested in WebAssembly/wasi-libc#369

the corresponding toywasm change:
yamt/toywasm@4d81846

```
spacetanuki% TOYWASM=~/git/toywasm/b/toywasm python3 ~/git/wasm/wasi-testsuite/test-runner/wasi_test_runner.py -t ./test/testsuite -r ~/git/toywasm/test/wasi-testsuite-adapter.py
Test wasi_threads_exit_nonmain_wasi passed
Test wasi_threads_exit_main_busy passed
Test wasi_threads_exit_main_wasi passed
Test wasi_threads_exit_nonmain_busy passed
Test wasi_threads_spawn passed
Test wasi_threads_exit_main_block passed
Test wasi_threads_exit_nonmain_block passed

===== Test results =====
Runtime: toywasm v0.0
Suite: WASI threads proposal
  Total: 7
  Passed:  7
  Failed:  0

Test suites: 1 passed, 0 total
Tests:       7 passed, 0 total
spacetanuki%
```
  • Loading branch information
yamt committed Dec 24, 2022
1 parent 9a720a9 commit 845ba39
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test/testsuite/wasi_threads_exit_main_block.wat
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(module
(memory (import "foo" "bar") 1 1 shared)
(func $thread_spawn (import "wasi" "thread_spawn") (param i32) (result i32))
(func $proc_exit (import "wasi_snapshot_preview1" "proc_exit") (param i32))
(func (export "wasi_thread_start") (param i32 i32)
Expand Down Expand Up @@ -35,5 +36,4 @@
call $proc_exit
unreachable
)
(memory 1 1 shared)
)
2 changes: 1 addition & 1 deletion test/testsuite/wasi_threads_exit_main_busy.wat
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(module
(memory (import "foo" "bar") 1 1 shared)
(func $thread_spawn (import "wasi" "thread_spawn") (param i32) (result i32))
(func $proc_exit (import "wasi_snapshot_preview1" "proc_exit") (param i32))
(func (export "wasi_thread_start") (param i32 i32)
Expand Down Expand Up @@ -34,5 +35,4 @@
call $proc_exit
unreachable
)
(memory 1 1 shared)
)
2 changes: 1 addition & 1 deletion test/testsuite/wasi_threads_exit_main_wasi.wat
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(module
(memory (import "foo" "bar") 1 1 shared)
(func $thread_spawn (import "wasi" "thread_spawn") (param i32) (result i32))
(func $proc_exit (import "wasi_snapshot_preview1" "proc_exit") (param i32))
(func $poll_oneoff (import "wasi_snapshot_preview1" "poll_oneoff") (param i32 i32 i32 i32) (result i32))
Expand Down Expand Up @@ -41,5 +42,4 @@
call $proc_exit
unreachable
)
(memory 1 1 shared)
)
2 changes: 1 addition & 1 deletion test/testsuite/wasi_threads_exit_nonmain_block.wat
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(module
(memory (import "foo" "bar") 1 1 shared)
(func $thread_spawn (import "wasi" "thread_spawn") (param i32) (result i32))
(func $proc_exit (import "wasi_snapshot_preview1" "proc_exit") (param i32))
(func (export "wasi_thread_start") (param i32 i32)
Expand Down Expand Up @@ -35,5 +36,4 @@
memory.atomic.wait32
unreachable
)
(memory 1 1 shared)
)
2 changes: 1 addition & 1 deletion test/testsuite/wasi_threads_exit_nonmain_busy.wat
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(module
(memory (import "foo" "bar") 1 1 shared)
(func $thread_spawn (import "wasi" "thread_spawn") (param i32) (result i32))
(func $proc_exit (import "wasi_snapshot_preview1" "proc_exit") (param i32))
(func (export "wasi_thread_start") (param i32 i32)
Expand Down Expand Up @@ -34,5 +35,4 @@
end
unreachable
)
(memory 1 1 shared)
)
2 changes: 1 addition & 1 deletion test/testsuite/wasi_threads_exit_nonmain_wasi.wat
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(module
(memory (import "foo" "bar") 1 1 shared)
(func $thread_spawn (import "wasi" "thread_spawn") (param i32) (result i32))
(func $proc_exit (import "wasi_snapshot_preview1" "proc_exit") (param i32))
(func $poll_oneoff (import "wasi_snapshot_preview1" "poll_oneoff") (param i32 i32 i32 i32) (result i32))
Expand Down Expand Up @@ -41,5 +42,4 @@
call $poll_oneoff
unreachable
)
(memory 1 1 shared)
)
2 changes: 1 addition & 1 deletion test/testsuite/wasi_threads_spawn.wat
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(module
(memory (import "foo" "bar") 1 1 shared)
(func $thread_spawn (import "wasi" "thread_spawn") (param i32) (result i32))
(func $proc_exit (import "wasi_snapshot_preview1" "proc_exit") (param i32))
(func (export "wasi_thread_start") (param i32 i32)
Expand Down Expand Up @@ -63,5 +64,4 @@
call $proc_exit
unreachable
)
(memory 1 1 shared)
)

0 comments on commit 845ba39

Please sign in to comment.