Skip to content

Commit 3d9d00d

Browse files
committed
import shared memory in wat tests
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% ```
1 parent 4ad2f95 commit 3d9d00d

7 files changed

+7
-7
lines changed

test/testsuite/wasi_threads_exit_main_block.wat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(module
2+
(memory (import "foo" "bar") 1 1 shared)
23
(func $thread_spawn (import "wasi" "thread_spawn") (param i32) (result i32))
34
(func $proc_exit (import "wasi_snapshot_preview1" "proc_exit") (param i32))
45
(func (export "wasi_thread_start") (param i32 i32)
@@ -35,5 +36,4 @@
3536
call $proc_exit
3637
unreachable
3738
)
38-
(memory 1 1 shared)
3939
)

test/testsuite/wasi_threads_exit_main_busy.wat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(module
2+
(memory (import "foo" "bar") 1 1 shared)
23
(func $thread_spawn (import "wasi" "thread_spawn") (param i32) (result i32))
34
(func $proc_exit (import "wasi_snapshot_preview1" "proc_exit") (param i32))
45
(func (export "wasi_thread_start") (param i32 i32)
@@ -34,5 +35,4 @@
3435
call $proc_exit
3536
unreachable
3637
)
37-
(memory 1 1 shared)
3838
)

test/testsuite/wasi_threads_exit_main_wasi.wat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(module
2+
(memory (import "foo" "bar") 1 1 shared)
23
(func $thread_spawn (import "wasi" "thread_spawn") (param i32) (result i32))
34
(func $proc_exit (import "wasi_snapshot_preview1" "proc_exit") (param i32))
45
(func $poll_oneoff (import "wasi_snapshot_preview1" "poll_oneoff") (param i32 i32 i32 i32) (result i32))
@@ -41,5 +42,4 @@
4142
call $proc_exit
4243
unreachable
4344
)
44-
(memory 1 1 shared)
4545
)

test/testsuite/wasi_threads_exit_nonmain_block.wat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(module
2+
(memory (import "foo" "bar") 1 1 shared)
23
(func $thread_spawn (import "wasi" "thread_spawn") (param i32) (result i32))
34
(func $proc_exit (import "wasi_snapshot_preview1" "proc_exit") (param i32))
45
(func (export "wasi_thread_start") (param i32 i32)
@@ -35,5 +36,4 @@
3536
memory.atomic.wait32
3637
unreachable
3738
)
38-
(memory 1 1 shared)
3939
)

test/testsuite/wasi_threads_exit_nonmain_busy.wat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(module
2+
(memory (import "foo" "bar") 1 1 shared)
23
(func $thread_spawn (import "wasi" "thread_spawn") (param i32) (result i32))
34
(func $proc_exit (import "wasi_snapshot_preview1" "proc_exit") (param i32))
45
(func (export "wasi_thread_start") (param i32 i32)
@@ -34,5 +35,4 @@
3435
end
3536
unreachable
3637
)
37-
(memory 1 1 shared)
3838
)

test/testsuite/wasi_threads_exit_nonmain_wasi.wat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(module
2+
(memory (import "foo" "bar") 1 1 shared)
23
(func $thread_spawn (import "wasi" "thread_spawn") (param i32) (result i32))
34
(func $proc_exit (import "wasi_snapshot_preview1" "proc_exit") (param i32))
45
(func $poll_oneoff (import "wasi_snapshot_preview1" "poll_oneoff") (param i32 i32 i32 i32) (result i32))
@@ -41,5 +42,4 @@
4142
call $poll_oneoff
4243
unreachable
4344
)
44-
(memory 1 1 shared)
4545
)

test/testsuite/wasi_threads_spawn.wat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(module
2+
(memory (import "foo" "bar") 1 1 shared)
23
(func $thread_spawn (import "wasi" "thread_spawn") (param i32) (result i32))
34
(func $proc_exit (import "wasi_snapshot_preview1" "proc_exit") (param i32))
45
(func (export "wasi_thread_start") (param i32 i32)
@@ -63,5 +64,4 @@
6364
call $proc_exit
6465
unreachable
6566
)
66-
(memory 1 1 shared)
6767
)

0 commit comments

Comments
 (0)