Skip to content

Commit 3870cbe

Browse files
committed
Fix more tests now that they can run on Wasmtime
1 parent d971cc7 commit 3870cbe

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

test/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ This directory contains Component Model reference tests, grouped by functionalit
44

55
## Running in Wasmtime
66

7+
(Until the `component-model-async` and `component-model-async-builtins` features
8+
are enabled by default, they must be explicitly enabled as shown below.)
9+
710
A single `.wast` test can be run via:
811
```
9-
wasmtime wast -W component-model-async=y the-test.wast
12+
wasmtime wast -W component-model-async=y -W component-model-async-builtins=y the-test.wast
1013
```
1114
All the tests can be run from this directory via:
1215
```
13-
find . -name "*.wast" | xargs wasmtime wast -W component-model-async=y
16+
find . -name "*.wast" | xargs wasmtime wast -W component-model-async=y -W component-model-async-builtins=y
1417
```

test/async/sync-streams.wast

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
(local.set $bufp (i32.const 16))
3737
(i32.store (local.get $bufp) (i32.const 0x01234567))
3838
(local.set $ret (call $stream.write (local.get $tx) (local.get $bufp) (i32.const 4)))
39-
(if (i32.ne (i32.const 0x40 (; DROPPED=1 | (4<<4) ;)) (local.get $ret))
39+
(if (i32.ne (i32.const 0x41 (; DROPPED=1 | (4<<4) ;)) (local.get $ret))
4040
(then unreachable))
4141

4242
(call $stream.drop-writable (local.get $tx))
@@ -57,7 +57,7 @@
5757
;; synchronously, switch to the caller who will write and rendezvous
5858
(local.set $bufp (i32.const 16))
5959
(local.set $ret (call $stream.read (local.get $rx) (local.get $bufp) (i32.const 4)))
60-
(if (i32.ne (i32.const 0x40 (; DROPPED=1 | (4<<4) ;)) (local.get $ret))
60+
(if (i32.ne (i32.const 0x41 (; DROPPED=1 | (4<<4) ;)) (local.get $ret))
6161
(then unreachable))
6262
(if (i32.ne (i32.const 0x89abcdef) (i32.load (local.get $bufp)))
6363
(then unreachable))

test/values/trap-in-post-return.wast

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
(canon resource.drop $R (core func $resource.drop))
2323
(canon task.return (core func $task.return))
2424
(canon task.cancel (core func $task.cancel))
25-
(canon yield (core func $yield))
25+
(canon thread.yield (core func $yield))
2626
(canon waitable-set.new (core func $waitable-set.new))
2727
(canon waitable-set.wait (memory $memory "mem") (core func $waitable-set.wait))
2828
(canon waitable-set.poll (memory $memory "mem") (core func $waitable-set.poll))

0 commit comments

Comments
 (0)