File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ;; Test that the fuzz_shell.js file will run a second wasm file that is
2+ ;; provided, and call its exports as well as the first module's.
3+
4+ (module
5+ (func $first (export " first" ) (result i32 )
6+ (i32.const 42 )
7+ )
8+ )
9+
10+ ;; Build both files to binary.
11+ ;;
12+ ;; RUN: wasm-opt %s -o %t.wasm -q
13+ ;; RUN: wasm-opt %s.second -o %t.second.wasm -q
14+
15+ ;; Run in node.
16+ ;;
17+ ;; RUN: node %S/../../../scripts/fuzz_shell.js %t.wasm %t.second.wasm | filecheck %s
18+ ;;
19+ ;; CHECK: [fuzz-exec] calling first
20+ ;; CHECK: [fuzz-exec] note result: first => 42
21+ ;; CHECK: [fuzz-exec] calling second
22+ ;; CHECK: [fuzz-exec] note result: second => 1337
23+
24+ ;; Run in reverse order, flipping the order in the output.
25+ ;;
26+ ;; RUN: node %S/../../../scripts/fuzz_shell.js %t.second.wasm %t.wasm | filecheck %s --check-prefix=REVERSE
27+ ;;
28+ ;; REVERSE: [fuzz-exec] calling second
29+ ;; REVERSE: [fuzz-exec] note result: second => 1337
30+ ;; REVERSE: [fuzz-exec] calling first
31+ ;; REVERSE: [fuzz-exec] note result: first => 42
32+
Original file line number Diff line number Diff line change 1+ ;; Second module for the test.
2+
3+ (module
4+ (func $second (export "second") (result i32)
5+ (i32.const 1337)
6+ )
7+ )
8+
You can’t perform that action at this time.
0 commit comments