diff --git a/src/wasi-libc b/src/wasi-libc index c9c7d0616..d03829489 160000 --- a/src/wasi-libc +++ b/src/wasi-libc @@ -1 +1 @@ -Subproject commit c9c7d0616e0f7fe4d0d0fa54372b6d1f5689f91d +Subproject commit d03829489904d38c624f6de9983190f1e5e7c9c5 diff --git a/tests/general/abort.c.wasm32-wasi.stderr.expected b/tests/general/abort.c.wasm32-wasi.stderr.expected new file mode 100644 index 000000000..c6ecf6a93 --- /dev/null +++ b/tests/general/abort.c.wasm32-wasi.stderr.expected @@ -0,0 +1,6 @@ +Error: failed to run main module `abort.c.---.wasm` + +Caused by: + 0: failed to invoke command default + 1: error while executing at wasm backtrace: + 2: wasm trap: wasm `unreachable` instruction executed diff --git a/tests/general/abort.c.wasm32-wasip2.stderr.expected b/tests/general/abort.c.wasm32-wasip2.stderr.expected new file mode 100644 index 000000000..26fe376cf --- /dev/null +++ b/tests/general/abort.c.wasm32-wasip2.stderr.expected @@ -0,0 +1,6 @@ +Error: failed to run main module `abort.c.---.wasm` + +Caused by: + 0: failed to invoke `run` function + 1: error while executing at wasm backtrace: + 2: wasm trap: wasm `unreachable` instruction executed diff --git a/tests/general/assert-fail.c.wasm32-wasip2.stderr.expected b/tests/general/assert-fail.c.wasm32-wasip2.stderr.expected new file mode 100644 index 000000000..3702431bd --- /dev/null +++ b/tests/general/assert-fail.c.wasm32-wasip2.stderr.expected @@ -0,0 +1,7 @@ +Assertion failed: false (assert-fail.c: main: 5) +Error: failed to run main module `assert-fail.c.---.wasm` + +Caused by: + 0: failed to invoke `run` function + 1: error while executing at wasm backtrace: + 2: wasm trap: wasm `unreachable` instruction executed diff --git a/tests/general/sigabrt.c.wasm32-wasip2.stderr.expected b/tests/general/sigabrt.c.wasm32-wasip2.stderr.expected new file mode 100644 index 000000000..f437a8214 --- /dev/null +++ b/tests/general/sigabrt.c.wasm32-wasip2.stderr.expected @@ -0,0 +1,6 @@ +raising SIGABRT... +Program received fatal signal: Aborted +Error: failed to run main module `sigabrt.c.---.wasm` + +Caused by: + 0: failed to invoke `run` function diff --git a/tests/testcase.sh b/tests/testcase.sh index b646e2d4a..61c6612e5 100755 --- a/tests/testcase.sh +++ b/tests/testcase.sh @@ -44,7 +44,7 @@ if [ "$runwasi" == "" ]; then exit 0 fi -if [ "$target" == "wasm32-wasi-preview2" -a -n "$adapter" -a -n "$wasm_tools" ]; then +if [ "$target" == "wasm32-wasip2" -a -n "$adapter" -a -n "$wasm_tools" ]; then "$wasm_tools" component new --adapt "$adapter" "$wasm" -o "$wasm" run_args="--wasm component-model" fi