From 3d9d00d4d82616ec0c0a3ca2cdb3a407877eea07 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Sat, 24 Dec 2022 11:45:15 +0900 Subject: [PATCH] import shared memory in wat tests as suggested in https://github.com/WebAssembly/wasi-libc/pull/369 the corresponding toywasm change: https://github.com/yamt/toywasm/commit/4d81846e3aa6f01f97e6aef0a51238fd18f6ecf1 ``` 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% ``` --- test/testsuite/wasi_threads_exit_main_block.wat | 2 +- test/testsuite/wasi_threads_exit_main_busy.wat | 2 +- test/testsuite/wasi_threads_exit_main_wasi.wat | 2 +- test/testsuite/wasi_threads_exit_nonmain_block.wat | 2 +- test/testsuite/wasi_threads_exit_nonmain_busy.wat | 2 +- test/testsuite/wasi_threads_exit_nonmain_wasi.wat | 2 +- test/testsuite/wasi_threads_spawn.wat | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/testsuite/wasi_threads_exit_main_block.wat b/test/testsuite/wasi_threads_exit_main_block.wat index 315858d..e0a0539 100644 --- a/test/testsuite/wasi_threads_exit_main_block.wat +++ b/test/testsuite/wasi_threads_exit_main_block.wat @@ -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) @@ -35,5 +36,4 @@ call $proc_exit unreachable ) - (memory 1 1 shared) ) diff --git a/test/testsuite/wasi_threads_exit_main_busy.wat b/test/testsuite/wasi_threads_exit_main_busy.wat index c699f6f..9d96f38 100644 --- a/test/testsuite/wasi_threads_exit_main_busy.wat +++ b/test/testsuite/wasi_threads_exit_main_busy.wat @@ -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) @@ -34,5 +35,4 @@ call $proc_exit unreachable ) - (memory 1 1 shared) ) diff --git a/test/testsuite/wasi_threads_exit_main_wasi.wat b/test/testsuite/wasi_threads_exit_main_wasi.wat index 68ea016..bf09d5e 100644 --- a/test/testsuite/wasi_threads_exit_main_wasi.wat +++ b/test/testsuite/wasi_threads_exit_main_wasi.wat @@ -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)) @@ -41,5 +42,4 @@ call $proc_exit unreachable ) - (memory 1 1 shared) ) diff --git a/test/testsuite/wasi_threads_exit_nonmain_block.wat b/test/testsuite/wasi_threads_exit_nonmain_block.wat index 6fb6384..02e3800 100644 --- a/test/testsuite/wasi_threads_exit_nonmain_block.wat +++ b/test/testsuite/wasi_threads_exit_nonmain_block.wat @@ -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) @@ -35,5 +36,4 @@ memory.atomic.wait32 unreachable ) - (memory 1 1 shared) ) diff --git a/test/testsuite/wasi_threads_exit_nonmain_busy.wat b/test/testsuite/wasi_threads_exit_nonmain_busy.wat index 39fe16f..78d979d 100644 --- a/test/testsuite/wasi_threads_exit_nonmain_busy.wat +++ b/test/testsuite/wasi_threads_exit_nonmain_busy.wat @@ -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) @@ -34,5 +35,4 @@ end unreachable ) - (memory 1 1 shared) ) diff --git a/test/testsuite/wasi_threads_exit_nonmain_wasi.wat b/test/testsuite/wasi_threads_exit_nonmain_wasi.wat index 9f1772f..56142f9 100644 --- a/test/testsuite/wasi_threads_exit_nonmain_wasi.wat +++ b/test/testsuite/wasi_threads_exit_nonmain_wasi.wat @@ -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)) @@ -41,5 +42,4 @@ call $poll_oneoff unreachable ) - (memory 1 1 shared) ) diff --git a/test/testsuite/wasi_threads_spawn.wat b/test/testsuite/wasi_threads_spawn.wat index c3dca69..69a987e 100644 --- a/test/testsuite/wasi_threads_spawn.wat +++ b/test/testsuite/wasi_threads_spawn.wat @@ -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) @@ -63,5 +64,4 @@ call $proc_exit unreachable ) - (memory 1 1 shared) )