Skip to content

Commit 959d522

Browse files
authored
Update spec test suite for Wasm 3.0 (#7953)
Bring in the latest upstream testsuite to include Wasm 3.0 tests, including for multi-memory, memory64, and GC proposals. Update the list of skipped tests to remove some tests that newly pass, add new failing tests, and generally update given failure reasons. Also add logic to skip all tests for proposals we do not yet support, including custom page sizes and wide arithmetic.
1 parent d955b5a commit 959d522

File tree

2 files changed

+38
-25
lines changed

2 files changed

+38
-25
lines changed

scripts/test/shared.py

Lines changed: 37 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -412,41 +412,46 @@ def get_tests(test_dir, extensions=[], recursive=False):
412412
# Test invalid
413413
'elem.wast',
414414
]
415+
SPEC_TESTSUITE_PROPOSALS_TO_SKIP = [
416+
'custom-page-sizes',
417+
'wide-arithmetic',
418+
]
415419
SPEC_TESTSUITE_TESTS_TO_SKIP = [
416420
'address.wast', # 64-bit offset allowed by memory64
417-
'align.wast', # Alignment bit 6 used by multi-memory
418-
'binary.wast', # memory.grow reserved byte a LEB in multi-memory
421+
'array_new_elem.wast', # Failure to parse element segment item abbreviation
422+
'binary.wast', # Missing data count section validation
423+
'call_indirect64.wast', # Failure to parse element segment abbreviation
419424
'comments.wast', # Issue with carriage returns being treated as newlines
420425
'const.wast', # Hex float constant not recognized as out of range
421426
'conversions.wast', # Promoted NaN should be canonical
422-
'data.wast', # Constant global references allowed by GC
427+
'data.wast', # Fail to parse data segment offset abbreviation
423428
'elem.wast', # Requires modeling empty declarative segments
424429
'f32.wast', # Adding -0 and -nan should give a canonical NaN
425430
'f64.wast', # Adding -0 and -nan should give a canonical NaN
426431
'float_exprs.wast', # Adding 0 and NaN should give canonical NaN
427432
'float_misc.wast', # Rounding wrong on f64.sqrt
428433
'func.wast', # Duplicate parameter names not properly rejected
429-
'global.wast', # Globals allowed to refer to previous globals by GC
434+
'global.wast', # Fail to parse table
430435
'if.wast', # Requires more precise unreachable validation
431-
'imports.wast', # Requires wast `register` support
432-
'linking.wast', # Requires wast `register` support
433-
'memory.wast', # Multiple memories now allowed
436+
'imports.wast', # Missing validation of missing function on instantiation
437+
'linking.wast', # Missing function type validation on instantiation
438+
'memory.wast', # Requires wast `module definition` support
439+
'memory64-imports.wast', # Missing validation on instantiation
434440
'annotations.wast', # String annotations IDs should be allowed
435441
'id.wast', # Empty IDs should be disallowed
436-
'throw.wast', # Requires try_table interpretation
437-
'try_catch.wast', # Requires wast `register` support
442+
'instance.wast', # Requires wast `module definition` support
443+
'table64.wast', # Requires wast `module definition` support
444+
'table_grow.wast', # Incorrect table linking semantics in interpreter
445+
'try_catch.wast', # Incorrect imported tag semantics in interpreter
438446
'tag.wast', # Non-empty tag results allowed by stack switching
439447
'try_table.wast', # Requires try_table interpretation
440-
# 'br_on_non_null.wast', # Requires sending values on br_on_non_null
441-
# 'br_on_null.wast', # Requires sending values on br_on_null
442448
'local_init.wast', # Requires local validation to respect unnamed blocks
443449
'ref_func.wast', # Requires rejecting undeclared functions references
444450
'ref_is_null.wast', # Requires ref.null wast constants
445451
'ref_null.wast', # Requires ref.null wast constants
446452
'return_call_indirect.wast', # Requires more precise unreachable validation
447453
'select.wast', # Requires ref.null wast constants
448454
'table.wast', # Requires support for table default elements
449-
'type-equivalence.wast', # Recursive types allowed by GC
450455
'unreached-invalid.wast', # Requires more precise unreachable validation
451456
'array.wast', # Requires support for table default elements
452457
'br_if.wast', # Requires more precise branch validation
@@ -457,24 +462,22 @@ def get_tests(test_dir, extensions=[], recursive=False):
457462
'ref_cast.wast', # Requires host references to not be externalized i31refs
458463
'ref_test.wast', # Requires host references to not be externalized i31refs
459464
'struct.wast', # Duplicate field names not properly rejected
460-
'type-rec.wast', # Requires wast `register` support
465+
'type-rec.wast', # Missing function type validation on instantiation
461466
'type-subtyping.wast', # ShellExternalInterface::callTable does not handle subtyping
462467
'call_indirect.wast', # Bug with 64-bit inline element segment parsing
463-
'memory64.wast', # Multiple memories now allowed
464-
'table_init.wast', # Requires support for elem.drop
465-
'imports0.wast', # Requires wast `register` support
466-
'imports2.wast', # Requires wast `register` support
467-
'imports3.wast', # Requires wast `register` support
468-
'linking0.wast', # Requires wast `register` support
469-
'linking3.wast', # Requires wast `register` support
468+
'memory64.wast', # Requires wast `module definition` support
469+
'imports0.wast', # Missing memory type validation on instantiation
470+
'imports2.wast', # Missing memory type validation on instantiation
471+
'imports3.wast', # Missing memory type validation on instantiation
472+
'linking0.wast', # Missing memory type validation on instantiation
473+
'linking3.wast', # Fatal error on missing table.
470474
'i16x8_relaxed_q15mulr_s.wast', # Requires wast `either` support
471475
'i32x4_relaxed_trunc.wast', # Requires wast `either` support
472476
'i8x16_relaxed_swizzle.wast', # Requires wast `either` support
473477
'relaxed_dot_product.wast', # Requires wast `either` support
474478
'relaxed_laneselect.wast', # Requires wast `either` support
475479
'relaxed_madd_nmadd.wast', # Requires wast `either` support
476480
'relaxed_min_max.wast', # Requires wast `either` support
477-
'simd_address.wast', # 64-bit offset allowed by memory64
478481
'simd_const.wast', # Hex float constant not recognized as out of range
479482
'simd_conversions.wast', # Promoted NaN should be canonical
480483
'simd_f32x4.wast', # Min of 0 and NaN should give a canonical NaN
@@ -488,9 +491,19 @@ def get_tests(test_dir, extensions=[], recursive=False):
488491
'simd_i32x4_dot_i16x8.wast', # UBSan error on integer overflow
489492
'token.wast', # Lexer should require spaces between strings and non-paren tokens
490493
]
491-
options.spec_tests = [t for t in options.spec_tests if os.path.basename(t) not
492-
in (SPEC_TESTSUITE_TESTS_TO_SKIP if 'testsuite' in t
493-
else SPEC_TESTS_TO_SKIP)]
494+
495+
496+
def _can_run_spec_test(test):
497+
if 'testsuite' in test:
498+
for proposal in SPEC_TESTSUITE_PROPOSALS_TO_SKIP:
499+
if proposal in test:
500+
return False
501+
return os.path.basename(test) not in SPEC_TESTSUITE_TESTS_TO_SKIP
502+
return os.path.basename(test) not in SPEC_TESTS_TO_SKIP
503+
504+
505+
options.spec_tests = [t for t in options.spec_tests if _can_run_spec_test(t)]
506+
494507

495508
# check utilities
496509

test/spec/testsuite

Submodule testsuite updated 244 files

0 commit comments

Comments
 (0)