summaryrefslogtreecommitdiff
path: root/test/lit/passes/asyncify_verbost.wast
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2024-04-03 11:31:54 -0700
committerGitHub <noreply@github.com>2024-04-03 11:31:54 -0700
commit2b197b9f8996930bb19c0c334dbb77dd7891ae40 (patch)
tree8a32a469fd3f1eb05a9e600042007283622b7150 /test/lit/passes/asyncify_verbost.wast
parent58f06ccd1e94953292057bb61dc670bfcee0dd05 (diff)
downloadbinaryen-2b197b9f8996930bb19c0c334dbb77dd7891ae40.tar.gz
binaryen-2b197b9f8996930bb19c0c334dbb77dd7891ae40.tar.bz2
binaryen-2b197b9f8996930bb19c0c334dbb77dd7891ae40.zip
[NFC] Improve asyncify-verbose test (#6467)
There is no need to test the asyncified module output - we have tons of tests for that. What this test should be testing is the verbose output which states which things it decided to instrument, so make it do that.
Diffstat (limited to 'test/lit/passes/asyncify_verbost.wast')
-rw-r--r--test/lit/passes/asyncify_verbost.wast37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/lit/passes/asyncify_verbost.wast b/test/lit/passes/asyncify_verbost.wast
new file mode 100644
index 000000000..3bc4901b0
--- /dev/null
+++ b/test/lit/passes/asyncify_verbost.wast
@@ -0,0 +1,37 @@
+;; RUN: foreach %s %t wasm-opt --asyncify --pass-arg=asyncify-verbose -q | filecheck %s
+
+;; The import is reported as changing the state, as all imports can.
+;;
+;; CHECK: [asyncify] import is an import that can change the state
+
+;; The function that calls the import can change the state too.
+;;
+;; CHECK: [asyncify] calls-import can change the state due to import
+
+;; Likewise, further up the call chain as well.
+;;
+;; CHECK: [asyncify] calls-calls-import can change the state due to calls-import
+;; CHECK: [asyncify] calls-calls-calls-import can change the state due to calls-calls-import
+
+(module
+ (import "env" "import" (func $import))
+
+ (memory 1 2)
+
+ (func $calls-import
+ (call $import)
+ )
+
+ (func $calls-calls-import
+ (call $calls-import)
+ )
+
+ (func $calls-calls-calls-import
+ (call $calls-calls-import)
+ )
+
+ (func $nothing
+ (nop)
+ )
+)
+