Skip to content

Commit

Permalink
Update the spec test suite submodule (#5970)
Browse files Browse the repository at this point in the history
* Update the spec test suite submodule

Delete the local copies of the relaxed-simd test suite as well as
they're now incorporated.

Closes #5914

* Remove page guards in QEMU emulation

Otherwise `(memory 0 0)` was being compiled as a static memory with huge
guards which we're trying to avoid in QEMU.
  • Loading branch information
alexcrichton authored Mar 10, 2023
1 parent e64fb6a commit 7650d85
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 772 deletions.
17 changes: 11 additions & 6 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ fn main() -> anyhow::Result<()> {
test_directory_module(out, "tests/misc_testsuite/threads", strategy)?;
test_directory_module(out, "tests/misc_testsuite/memory64", strategy)?;
test_directory_module(out, "tests/misc_testsuite/component-model", strategy)?;

// NB: these are copied from upstream and updated to wasmtime's
// current version of `wast`. This local copy should go away when
// all of Wasmtime's tooling is updated and the upstream
// `testsuite` module is additionally updated.
test_directory_module(out, "tests/misc_testsuite/relaxed-simd", strategy)?;
Ok(())
})?;

Expand All @@ -51,6 +45,11 @@ fn main() -> anyhow::Result<()> {
strategy,
)?;
test_directory_module(out, "tests/spec_testsuite/proposals/threads", strategy)?;
test_directory_module(
out,
"tests/spec_testsuite/proposals/relaxed-simd",
strategy,
)?;
} else {
println!(
"cargo:warning=The spec testsuite is disabled. To enable, run `git submodule \
Expand Down Expand Up @@ -180,6 +179,12 @@ fn write_testsuite_tests(
/// Ignore tests that aren't supported yet.
fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool {
assert_eq!(strategy, "Cranelift");

// This is an empty file right now which the `wast` crate doesn't parse
if testname.contains("memory_copy1") {
return true;
}

match env::var("CARGO_CFG_TARGET_ARCH").unwrap().as_str() {
"s390x" => {
// FIXME: These tests fail under qemu due to a qemu bug.
Expand Down
4 changes: 3 additions & 1 deletion tests/all/wast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ fn run_wast(wast: &str, strategy: Strategy, pooling: bool) -> anyhow::Result<()>
cfg.static_memory_maximum_size(0);
}
cfg.dynamic_memory_reserved_for_growth(0);
cfg.static_memory_guard_size(0);
cfg.dynamic_memory_guard_size(0);
}

let _pooling_lock = if pooling {
Expand All @@ -101,7 +103,7 @@ fn run_wast(wast: &str, strategy: Strategy, pooling: bool) -> anyhow::Result<()>
// fails to grow, the values here will need to be adjusted.
let mut pool = PoolingAllocationConfig::default();
pool.instance_count(450)
.instance_memories(2)
.instance_memories(if multi_memory { 9 } else { 1 })
.instance_tables(4)
.instance_memory_pages(805);
cfg.allocation_strategy(InstanceAllocationStrategy::Pooling(pool));
Expand Down
26 changes: 0 additions & 26 deletions tests/misc_testsuite/relaxed-simd/i16x8_relaxed_q15mulr_s.wast

This file was deleted.

123 changes: 0 additions & 123 deletions tests/misc_testsuite/relaxed-simd/i32x4_relaxed_trunc.wast

This file was deleted.

44 changes: 0 additions & 44 deletions tests/misc_testsuite/relaxed-simd/i8x16_relaxed_swizzle.wast

This file was deleted.

106 changes: 0 additions & 106 deletions tests/misc_testsuite/relaxed-simd/relaxed_dot_product.wast

This file was deleted.

Loading

0 comments on commit 7650d85

Please sign in to comment.