Skip to content

Commit

Permalink
Update spec test suite submodule (#1950)
Browse files Browse the repository at this point in the history
Just a few minor updates to the harness, otherwise nothing major here.
  • Loading branch information
alexcrichton authored Dec 11, 2024
1 parent 3bef34b commit 00091b2
Show file tree
Hide file tree
Showing 1,352 changed files with 32,900 additions and 1,141 deletions.
5 changes: 4 additions & 1 deletion tests/roundtrip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ fn find_tests() -> Vec<PathBuf> {
/// time. There's further filters applied while testing.
fn skip_test(test: &Path, contents: &[u8]) -> bool {
let _ = contents;
test.iter().any(|p| p == "exception-handling") && test.iter().any(|p| p == "legacy")
test.iter().any(|p| p == "legacy")
}

fn skip_validation(_test: &Path) -> bool {
Expand Down Expand Up @@ -681,6 +681,9 @@ impl TestState {
"wide-arithmetic" => {
features.insert(WasmFeatures::WIDE_ARITHMETIC);
}
"wasm-3.0" => {
features.insert(WasmFeatures::WASM3);
}
_ => {}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,148 +9,155 @@
"text": "invalid custom page size"
},
{
"type": "assert_invalid",
"line": 9,
"filename": "custom-page-sizes-invalid.1.wasm",
"module_type": "binary",
"type": "assert_malformed",
"line": 8,
"filename": "custom-page-sizes-invalid.1.wat",
"module_type": "text",
"text": "invalid custom page size"
},
{
"type": "assert_invalid",
"line": 13,
"line": 14,
"filename": "custom-page-sizes-invalid.2.wasm",
"module_type": "binary",
"text": "invalid custom page size"
},
{
"type": "assert_invalid",
"line": 17,
"line": 18,
"filename": "custom-page-sizes-invalid.3.wasm",
"module_type": "binary",
"text": "invalid custom page size"
},
{
"type": "assert_invalid",
"line": 21,
"line": 22,
"filename": "custom-page-sizes-invalid.4.wasm",
"module_type": "binary",
"text": "invalid custom page size"
},
{
"type": "assert_invalid",
"line": 25,
"line": 26,
"filename": "custom-page-sizes-invalid.5.wasm",
"module_type": "binary",
"text": "invalid custom page size"
},
{
"type": "assert_invalid",
"line": 29,
"line": 30,
"filename": "custom-page-sizes-invalid.6.wasm",
"module_type": "binary",
"text": "invalid custom page size"
},
{
"type": "assert_invalid",
"line": 33,
"line": 34,
"filename": "custom-page-sizes-invalid.7.wasm",
"module_type": "binary",
"text": "invalid custom page size"
},
{
"type": "assert_invalid",
"line": 37,
"line": 38,
"filename": "custom-page-sizes-invalid.8.wasm",
"module_type": "binary",
"text": "invalid custom page size"
},
{
"type": "assert_invalid",
"line": 41,
"line": 42,
"filename": "custom-page-sizes-invalid.9.wasm",
"module_type": "binary",
"text": "invalid custom page size"
},
{
"type": "assert_invalid",
"line": 45,
"line": 46,
"filename": "custom-page-sizes-invalid.10.wasm",
"module_type": "binary",
"text": "invalid custom page size"
},
{
"type": "assert_invalid",
"line": 49,
"line": 50,
"filename": "custom-page-sizes-invalid.11.wasm",
"module_type": "binary",
"text": "invalid custom page size"
},
{
"type": "assert_invalid",
"line": 53,
"line": 54,
"filename": "custom-page-sizes-invalid.12.wasm",
"module_type": "binary",
"text": "invalid custom page size"
},
{
"type": "assert_invalid",
"line": 57,
"line": 58,
"filename": "custom-page-sizes-invalid.13.wasm",
"module_type": "binary",
"text": "invalid custom page size"
},
{
"type": "assert_invalid",
"line": 61,
"line": 62,
"filename": "custom-page-sizes-invalid.14.wasm",
"module_type": "binary",
"text": "invalid custom page size"
},
{
"type": "assert_invalid",
"line": 65,
"line": 66,
"filename": "custom-page-sizes-invalid.15.wasm",
"module_type": "binary",
"text": "invalid custom page size"
},
{
"type": "assert_invalid",
"line": 71,
"line": 70,
"filename": "custom-page-sizes-invalid.16.wasm",
"module_type": "binary",
"text": "invalid custom page size"
},
{
"type": "assert_malformed",
"line": 78,
"type": "assert_invalid",
"line": 76,
"filename": "custom-page-sizes-invalid.17.wasm",
"module_type": "binary",
"text": "invalid custom page size"
},
{
"type": "assert_malformed",
"line": 83,
"filename": "custom-page-sizes-invalid.18.wasm",
"module_type": "binary",
"text": "invalid custom page size"
},
{
"type": "module",
"line": 92,
"line": 97,
"name": "m",
"filename": "custom-page-sizes-invalid.18.wasm",
"filename": "custom-page-sizes-invalid.19.wasm",
"module_type": "binary"
},
{
"type": "register",
"line": 96,
"line": 101,
"name": "m",
"as": "m"
},
{
"type": "assert_unlinkable",
"line": 99,
"filename": "custom-page-sizes-invalid.19.wasm",
"line": 104,
"filename": "custom-page-sizes-invalid.20.wasm",
"module_type": "binary",
"text": "memory types incompatible"
},
{
"type": "assert_unlinkable",
"line": 106,
"filename": "custom-page-sizes-invalid.20.wasm",
"line": 111,
"filename": "custom-page-sizes-invalid.21.wasm",
"module_type": "binary",
"text": "memory types incompatible"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,150 @@
"line": 106,
"filename": "custom-page-sizes.9.wasm",
"module_type": "binary"
},
{
"type": "assert_malformed",
"line": 113,
"filename": "custom-page-sizes.10.wat",
"module_type": "text",
"text": "invalid custom page size"
},
{
"type": "module",
"line": 116,
"filename": "custom-page-sizes.11.wasm",
"module_type": "binary"
},
{
"type": "assert_return",
"line": 125,
"action": {
"type": "invoke",
"field": "size",
"args": []
},
"expected": [
{
"type": "i32",
"value": "3"
}
]
},
{
"type": "assert_return",
"line": 126,
"action": {
"type": "invoke",
"field": "load",
"args": [
{
"type": "i32",
"value": "0"
}
]
},
"expected": [
{
"type": "i32",
"value": "120"
}
]
},
{
"type": "assert_return",
"line": 127,
"action": {
"type": "invoke",
"field": "load",
"args": [
{
"type": "i32",
"value": "1"
}
]
},
"expected": [
{
"type": "i32",
"value": "121"
}
]
},
{
"type": "assert_return",
"line": 128,
"action": {
"type": "invoke",
"field": "load",
"args": [
{
"type": "i32",
"value": "2"
}
]
},
"expected": [
{
"type": "i32",
"value": "122"
}
]
},
{
"type": "assert_trap",
"line": 129,
"action": {
"type": "invoke",
"field": "load",
"args": [
{
"type": "i32",
"value": "3"
}
]
},
"text": "out of bounds"
},
{
"type": "assert_return",
"line": 130,
"action": {
"type": "invoke",
"field": "grow",
"args": [
{
"type": "i32",
"value": "1"
}
]
},
"expected": [
{
"type": "i32",
"value": "-1"
}
]
},
{
"type": "module",
"line": 133,
"filename": "custom-page-sizes.12.wasm",
"module_type": "binary"
},
{
"type": "assert_return",
"line": 138,
"action": {
"type": "invoke",
"field": "size",
"args": []
},
"expected": [
{
"type": "i32",
"value": "1"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
(module
(type (;0;) (func (result i32)))
(type (;1;) (func (param i32) (result i32)))
(memory (;0;) 1 1 (pagesize 0x1))
(export "size" (func 0))
(export "grow" (func 1))
(export "load" (func 2))
(func (;0;) (type 0) (result i32)
memory.size
)
(func (;1;) (type 1) (param i32) (result i32)
local.get 0
memory.grow
)
(func (;2;) (type 1) (param i32) (result i32)
local.get 0
i32.load8_u
)
(data (;0;) (i32.const 0) "xyz")
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(module
(type (;0;) (func (result i32)))
(memory (;0;) 1 1 (pagesize 0x10000))
(export "size" (func 0))
(func (;0;) (type 0) (result i32)
memory.size
)
(data (;0;) (i32.const 0) "xyz")
)
Loading

0 comments on commit 00091b2

Please sign in to comment.