Skip to content

Commit 250aba6

Browse files
authored
Sync up with wabt latest modification (#296) (#786)
- Remove "--enable-reference-types" and "--enable-bulk-memory" for wat2wasm to support finished proposals. - Ignore invalid module in the thread spec repo: ``` wast ;; my_elem.wast (module (table $t 10 funcref) (func $f) (elem $t (i32.const 0) 0) (elem $t (i32.const 0) $f $f) (elem $t (offset (i32.const 0)) $f $f) ) ``` run with reference interpreter under spec/interpreter: ``` shell $ ./wasm ../../../my_elem.wast ../../../my_elem.wast:5.9-5.11: syntax error: duplicate elem segment $t ``` - use a specific commit instead of the latest commit on the thread spec repo
1 parent 17f62ad commit 250aba6

File tree

4 files changed

+25
-6
lines changed

4 files changed

+25
-6
lines changed

.github/workflows/spec_test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
- "core/shared/**"
1212
- "wamr-compiler/**"
1313
- "product-mini/**"
14+
- "tests/wamr-test-suites/spec-test-script/**"
15+
- "tests/wamr-test-suites/test_wamr.sh"
1416
# will be triggered on push events
1517
push:
1618
paths:
@@ -19,6 +21,8 @@ on:
1921
- "core/shared/**"
2022
- "wamr-compiler/**"
2123
- "product-mini/**"
24+
- "tests/wamr-test-suites/spec-test-script/**"
25+
- "tests/wamr-test-suites/test_wamr.sh"
2226
# allow to be triggered manually
2327
workflow_dispatch:
2428

tests/wamr-test-suites/spec-test-script/runtest.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -901,10 +901,9 @@ def compile_wast_to_wasm(form, wast_tempfile, wasm_tempfile, opts):
901901
"--no-check",
902902
wast_tempfile, "-o", wasm_tempfile ]
903903

904-
# optional arguments
905-
if opts.ref_types:
906-
cmd.append("--enable-reference-types")
907-
cmd.append("--enable-bulk-memory")
904+
# remove reference-type and bulk-memory enabling options since a WABT
905+
# commit 30c1e983d30b33a8004b39fd60cbd64477a7956c
906+
# Enable reference types by default (#1729)
908907

909908
log("Running: %s" % " ".join(cmd))
910909
try:

tests/wamr-test-suites/spec-test-script/thread_proposal_ignore_cases.patch

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,24 @@ index b9fa438c..a5711dd3 100644
163163
;; 1 elem segment declared, 2 given
164164
(assert_malformed
165165
diff --git a/test/core/elem.wast b/test/core/elem.wast
166-
index 1ea2b061..f5440e07 100644
166+
index 1ea2b061..8eded377 100644
167167
--- a/test/core/elem.wast
168168
+++ b/test/core/elem.wast
169+
@@ -12,10 +12,10 @@
170+
(elem 0x0 (i32.const 0) $f $f)
171+
(elem 0x000 (offset (i32.const 0)))
172+
(elem 0 (offset (i32.const 0)) $f $f)
173+
- (elem $t (i32.const 0))
174+
- (elem $t (i32.const 0) $f $f)
175+
- (elem $t (offset (i32.const 0)))
176+
- (elem $t (offset (i32.const 0)) $f $f)
177+
+ (elem (i32.const 0))
178+
+ (elem (i32.const 0) $f $f)
179+
+ (elem (offset (i32.const 0)))
180+
+ (elem (offset (i32.const 0)) $f $f)
181+
)
182+
183+
;; Basic use
169184
@@ -354,6 +354,7 @@
170185
(assert_return (invoke $module1 "call-8") (i32.const 65))
171186
(assert_return (invoke $module1 "call-9") (i32.const 66))

tests/wamr-test-suites/test_wamr.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,8 @@ function spec_test()
290290

291291
# fetch spec for threads proposal
292292
git fetch threads
293-
git reset --hard HEAD
293+
# [interpreter] Threading (#179) Fri Aug 6 18:02:59 2021 +0200
294+
git reset --hard 0d115b494d640eb0c1c352941fd14ca0bad926d3
294295
git checkout threads/main
295296

296297
git apply ../../spec-test-script/thread_proposal_ignore_cases.patch

0 commit comments

Comments
 (0)