From 773ab17a851ee755d94280d585774f48ddc3b3e2 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Wed, 14 Oct 2020 01:01:49 -0700 Subject: [PATCH 1/7] Add support for "on native" and "on jit" to the ignores.txt. Extend test-no-traps feature to cover tests/compiler/traps.rs and enable it when testing with the native engine. Turn on testing native engine as part of make test. --- Cargo.toml | 2 ++ Makefile | 6 +++--- tests/compilers/traps.rs | 7 +++++++ tests/ignores.txt | 4 ++++ tests/lib/test-generator/Cargo.toml | 4 ++++ tests/lib/test-generator/src/lib.rs | 13 +++++++++++-- 6 files changed, 31 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 666d015e4b4..e200eceedb9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -131,9 +131,11 @@ test-llvm = [ test-native = [ "native", + "test-generator/test-native", ] test-jit = [ "jit", + "test-generator/test-jit", ] # Disable trap asserts in the WAST tests. This is useful for running the tests in a diff --git a/Makefile b/Makefile index 7b7f944c511..2e7d264089c 100644 --- a/Makefile +++ b/Makefile @@ -94,7 +94,7 @@ build-capi-llvm: # Testing # ########### -test: $(foreach compiler,$(compilers),test-$(compiler)-jit) test-packages test-examples test-deprecated +test: $(foreach compiler,$(compilers),test-$(compiler)-jit test-$(compiler)-native) test-packages test-examples test-deprecated # Singlepass and native engine don't work together, this rule does nothing. test-singlepass-native: @@ -104,13 +104,13 @@ test-singlepass-jit: cargo test --release $(compiler_features) --features "test-singlepass test-jit" test-cranelift-native: - cargo test --release $(compiler_features) --features "test-cranelift test-native" + cargo test --release $(compiler_features) --features "test-cranelift test-native test-no-traps" test-cranelift-jit: cargo test --release $(compiler_features) --features "test-cranelift test-jit" test-llvm-native: - cargo test --release $(compiler_features) --features "test-llvm test-native" + cargo test --release $(compiler_features) --features "test-llvm test-native test-no-traps" test-llvm-jit: cargo test --release $(compiler_features) --features "test-llvm test-jit" diff --git a/tests/compilers/traps.rs b/tests/compilers/traps.rs index cb00ffd2253..78079f27168 100644 --- a/tests/compilers/traps.rs +++ b/tests/compilers/traps.rs @@ -37,6 +37,7 @@ fn test_trap_return() -> Result<()> { Ok(()) } +#[cfg(not(feature = "test-no-traps"))] #[test] #[cfg_attr(feature = "test-singlepass", ignore)] fn test_trap_trace() -> Result<()> { @@ -117,6 +118,7 @@ fn test_trap_trace_cb() -> Result<()> { Ok(()) } +#[cfg(not(feature = "test-no-traps"))] #[test] #[cfg_attr(feature = "test-singlepass", ignore)] fn test_trap_stack_overflow() -> Result<()> { @@ -148,6 +150,7 @@ fn test_trap_stack_overflow() -> Result<()> { Ok(()) } +#[cfg(not(feature = "test-no-traps"))] #[test] #[cfg_attr(any(feature = "test-singlepass", feature = "test-llvm"), ignore)] fn trap_display_pretty() -> Result<()> { @@ -181,6 +184,7 @@ RuntimeError: unreachable Ok(()) } +#[cfg(not(feature = "test-no-traps"))] #[test] #[cfg_attr(any(feature = "test-singlepass", feature = "test-llvm"), ignore)] fn trap_display_multi_module() -> Result<()> { @@ -386,6 +390,7 @@ fn mismatched_arguments() -> Result<()> { Ok(()) } +#[cfg(not(feature = "test-no-traps"))] #[test] #[cfg_attr(any(feature = "test-singlepass", feature = "test-llvm"), ignore)] fn call_signature_mismatch() -> Result<()> { @@ -417,6 +422,7 @@ RuntimeError: indirect call type mismatch Ok(()) } +#[cfg(not(feature = "test-no-traps"))] #[test] #[cfg_attr(any(feature = "test-singlepass", feature = "test-llvm"), ignore)] fn start_trap_pretty() -> Result<()> { @@ -449,6 +455,7 @@ RuntimeError: unreachable Ok(()) } +#[cfg(not(feature = "test-no-traps"))] #[test] fn present_after_module_drop() -> Result<()> { let store = get_store(); diff --git a/tests/ignores.txt b/tests/ignores.txt index 38be894e125..cdc45ddad96 100644 --- a/tests/ignores.txt +++ b/tests/ignores.txt @@ -22,6 +22,10 @@ singlepass on windows # Singlepass is not yet supported on Windows cranelift::spec::skip_stack_guard_page on darwin llvm::spec::skip_stack_guard_page on darwin +# TODO: traps in native engine +cranelift::spec::linking on native +llvm::spec::linking on native + # Frontends ## WASI diff --git a/tests/lib/test-generator/Cargo.toml b/tests/lib/test-generator/Cargo.toml index d9e3b4bea26..6dfc8fa7dfd 100644 --- a/tests/lib/test-generator/Cargo.toml +++ b/tests/lib/test-generator/Cargo.toml @@ -7,3 +7,7 @@ publish = false [dependencies] anyhow = "1.0" target-lexicon = "0.10" + +[features] +test-native = [] +test-jit = [] diff --git a/tests/lib/test-generator/src/lib.rs b/tests/lib/test-generator/src/lib.rs index 0396fe8b999..f17ff21cd9f 100644 --- a/tests/lib/test-generator/src/lib.rs +++ b/tests/lib/test-generator/src/lib.rs @@ -47,6 +47,13 @@ pub fn build_ignores_from_textfile(path: PathBuf) -> anyhow::Result { let file = File::open(path)?; let reader = BufReader::new(file); let host = Triple::host().to_string(); + let engine = if cfg!(feature = "test-native") { + Some("native") + } else if cfg!(feature = "test-jit") { + Some("jit") + } else { + None + }; for line in reader.lines() { let line = line.unwrap(); // If the line has a `#` we discard all the content that comes after @@ -75,8 +82,10 @@ pub fn build_ignores_from_textfile(path: PathBuf) -> anyhow::Result { } // We skip the ignore if doesn't apply to the current - // host target - if target.map(|t| !host.contains(&t)).unwrap_or(false) { + // host target or engine + if target.clone().map(|t| !host.contains(&t)).unwrap_or(false) + && target.clone() != engine.map(str::to_string) + { continue; } From 1f08f66ba6e8815b92a53fa065a166f82c865c1f Mon Sep 17 00:00:00 2001 From: nlewycky Date: Wed, 14 Oct 2020 12:58:03 -0700 Subject: [PATCH 2/7] Update tests/compilers/traps.rs Ignore the test instead of skipping it. Co-authored-by: Syrus Akbary --- tests/compilers/traps.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/compilers/traps.rs b/tests/compilers/traps.rs index 78079f27168..4e8db9a145e 100644 --- a/tests/compilers/traps.rs +++ b/tests/compilers/traps.rs @@ -39,7 +39,7 @@ fn test_trap_return() -> Result<()> { #[cfg(not(feature = "test-no-traps"))] #[test] -#[cfg_attr(feature = "test-singlepass", ignore)] +#[cfg_attr(any(feature = "test-singlepass", feature = "test-no-traps"), ignore)] fn test_trap_trace() -> Result<()> { let store = get_store(); let wat = r#" From e6cd0ab8d47d8011de3bef2a64b8ca9b310d0ed6 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Wed, 14 Oct 2020 13:39:32 -0700 Subject: [PATCH 3/7] Generalize the one-off code for matching of mismatched assert_trap messages. Use this to match all the mismatching trap messages in engine-native testing. --- Makefile | 4 ++-- tests/compilers/traps.rs | 48 +++++++++++++++++++++++++++----------- tests/compilers/wast.rs | 14 +++++++++++ tests/lib/wast/src/wast.rs | 25 ++++++++++++++------ 4 files changed, 69 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index 2e7d264089c..48c72eb17af 100644 --- a/Makefile +++ b/Makefile @@ -104,13 +104,13 @@ test-singlepass-jit: cargo test --release $(compiler_features) --features "test-singlepass test-jit" test-cranelift-native: - cargo test --release $(compiler_features) --features "test-cranelift test-native test-no-traps" + cargo test --release $(compiler_features) --features "test-cranelift test-native" test-cranelift-jit: cargo test --release $(compiler_features) --features "test-cranelift test-jit" test-llvm-native: - cargo test --release $(compiler_features) --features "test-llvm test-native test-no-traps" + cargo test --release $(compiler_features) --features "test-llvm test-native" test-llvm-jit: cargo test --release $(compiler_features) --features "test-llvm test-jit" diff --git a/tests/compilers/traps.rs b/tests/compilers/traps.rs index 4e8db9a145e..7922511a02a 100644 --- a/tests/compilers/traps.rs +++ b/tests/compilers/traps.rs @@ -37,9 +37,8 @@ fn test_trap_return() -> Result<()> { Ok(()) } -#[cfg(not(feature = "test-no-traps"))] #[test] -#[cfg_attr(any(feature = "test-singlepass", feature = "test-no-traps"), ignore)] +#[cfg_attr(any(feature = "test-singlepass", feature = "test-native"), ignore)] fn test_trap_trace() -> Result<()> { let store = get_store(); let wat = r#" @@ -118,9 +117,8 @@ fn test_trap_trace_cb() -> Result<()> { Ok(()) } -#[cfg(not(feature = "test-no-traps"))] #[test] -#[cfg_attr(feature = "test-singlepass", ignore)] +#[cfg_attr(any(feature = "test-singlepass", feature = "test-native"), ignore)] fn test_trap_stack_overflow() -> Result<()> { let store = get_store(); let wat = r#" @@ -150,9 +148,15 @@ fn test_trap_stack_overflow() -> Result<()> { Ok(()) } -#[cfg(not(feature = "test-no-traps"))] #[test] -#[cfg_attr(any(feature = "test-singlepass", feature = "test-llvm"), ignore)] +#[cfg_attr( + any( + feature = "test-singlepass", + feature = "test-llvm", + feature = "test-native" + ), + ignore +)] fn trap_display_pretty() -> Result<()> { let store = get_store(); let wat = r#" @@ -184,9 +188,15 @@ RuntimeError: unreachable Ok(()) } -#[cfg(not(feature = "test-no-traps"))] #[test] -#[cfg_attr(any(feature = "test-singlepass", feature = "test-llvm"), ignore)] +#[cfg_attr( + any( + feature = "test-singlepass", + feature = "test-llvm", + feature = "test-native" + ), + ignore +)] fn trap_display_multi_module() -> Result<()> { let store = get_store(); let wat = r#" @@ -390,9 +400,15 @@ fn mismatched_arguments() -> Result<()> { Ok(()) } -#[cfg(not(feature = "test-no-traps"))] #[test] -#[cfg_attr(any(feature = "test-singlepass", feature = "test-llvm"), ignore)] +#[cfg_attr( + any( + feature = "test-singlepass", + feature = "test-llvm", + feature = "test-native" + ), + ignore +)] fn call_signature_mismatch() -> Result<()> { let store = get_store(); let binary = r#" @@ -422,9 +438,15 @@ RuntimeError: indirect call type mismatch Ok(()) } -#[cfg(not(feature = "test-no-traps"))] #[test] -#[cfg_attr(any(feature = "test-singlepass", feature = "test-llvm"), ignore)] +#[cfg_attr( + any( + feature = "test-singlepass", + feature = "test-llvm", + feature = "test-native" + ), + ignore +)] fn start_trap_pretty() -> Result<()> { let store = get_store(); let wat = r#" @@ -455,8 +477,8 @@ RuntimeError: unreachable Ok(()) } -#[cfg(not(feature = "test-no-traps"))] #[test] +#[cfg_attr(feature = "test-native", ignore)] fn present_after_module_drop() -> Result<()> { let store = get_store(); let module = Module::new(&store, r#"(func (export "foo") unreachable)"#)?; diff --git a/tests/compilers/wast.rs b/tests/compilers/wast.rs index 1471a990aa6..c41b8da16bd 100644 --- a/tests/compilers/wast.rs +++ b/tests/compilers/wast.rs @@ -63,6 +63,20 @@ pub fn run_wast(wast_path: &str, compiler: &str) -> anyhow::Result<()> { features.multi_value(false); let store = get_store(features, try_nan_canonicalization); let mut wast = Wast::new_with_spectest(store); + // `bulk-memory-operations/bulk.wast` checks for a message that + // specifies which element is uninitialized, but our traps don't + // shepherd that information out. + wast.allow_trap_message("uninitialized element 2", "uninitialized element"); + if cfg!(feature = "test-native") { + wast.allow_trap_message("call stack exhausted", "out of bounds memory access"); + wast.allow_trap_message("indirect call type mismatch", "call stack exhausted"); + wast.allow_trap_message("integer divide by zero", "call stack exhausted"); + wast.allow_trap_message("integer overflow", "call stack exhausted"); + wast.allow_trap_message("invalid conversion to integer", "call stack exhausted"); + wast.allow_trap_message("undefined element", "call stack exhausted"); + wast.allow_trap_message("uninitialized element", "call stack exhausted"); + wast.allow_trap_message("unreachable", "call stack exhausted"); + } if is_simd { // We allow this, so tests can be run properly for `simd_const` test. wast.allow_instantiation_failures(&[ diff --git a/tests/lib/wast/src/wast.rs b/tests/lib/wast/src/wast.rs index a53f4ce6642..159d1a7b29d 100644 --- a/tests/lib/wast/src/wast.rs +++ b/tests/lib/wast/src/wast.rs @@ -18,6 +18,9 @@ pub struct Wast { instances: HashMap, /// Allowed failures (ideally this should be empty) allowed_instantiation_failures: HashSet, + /// If the (expected from .wast, actual) message pair is in this list, + /// treat the strings as matching. + match_trap_messages: HashMap, /// If the current module was an allowed failure, we allow test to fail current_is_allowed_failure: bool, /// The wasm Store @@ -34,13 +37,14 @@ impl Wast { store, import_object, allowed_instantiation_failures: HashSet::new(), + match_trap_messages: HashMap::new(), current_is_allowed_failure: false, instances: HashMap::new(), fail_fast: true, } } - /// A list of instantiation failures to allow + /// A list of instantiation failures to allow. pub fn allow_instantiation_failures(&mut self, failures: &[&str]) { for &failure_str in failures.iter() { self.allowed_instantiation_failures @@ -48,6 +52,12 @@ impl Wast { } } + /// A list of alternative messages to permit for a trap failure. + pub fn allow_trap_message(&mut self, expected: &str, allowed: &str) { + self.match_trap_messages + .insert(expected.into(), allowed.into()); + } + /// Construct a new instance of `Wast` with the spectests imports. pub fn new_with_spectest(store: Store) -> Self { let import_object = spectest_importobject(&store); @@ -123,7 +133,7 @@ impl Wast { Ok(values) => bail!("expected trap, got {:?}", values), Err(t) => format!("{}", t), }; - if Self::matches_message_assert_trap(expected, &actual) { + if self.matches_message_assert_trap(expected, &actual) { return Ok(()); } bail!("expected '{}', got '{}'", expected, actual) @@ -406,12 +416,13 @@ impl Wast { } // Checks if the `assert_trap` message matches the expected one - fn matches_message_assert_trap(expected: &str, actual: &str) -> bool { + fn matches_message_assert_trap(&self, expected: &str, actual: &str) -> bool { actual.contains(expected) - // `bulk-memory-operations/bulk.wast` checks for a message that - // specifies which element is uninitialized, but our traps don't - // shepherd that information out. - || (expected.contains("uninitialized element 2") && actual.contains("uninitialized element")) + || self + .match_trap_messages + .get(expected) + .map(|alternative| actual.contains(alternative)) + .unwrap_or(false) } } From e0257785742d5b4de3123cda685d29da47a15da9 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Wed, 14 Oct 2020 16:20:21 -0700 Subject: [PATCH 4/7] Limit these disables to cranelift, add one test failure with link for llvm. --- tests/compilers/wast.rs | 2 +- tests/ignores.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/compilers/wast.rs b/tests/compilers/wast.rs index c41b8da16bd..9d8b88b9a7f 100644 --- a/tests/compilers/wast.rs +++ b/tests/compilers/wast.rs @@ -67,7 +67,7 @@ pub fn run_wast(wast_path: &str, compiler: &str) -> anyhow::Result<()> { // specifies which element is uninitialized, but our traps don't // shepherd that information out. wast.allow_trap_message("uninitialized element 2", "uninitialized element"); - if cfg!(feature = "test-native") { + if compiler == "cranelift" && cfg!(feature = "test-native") { wast.allow_trap_message("call stack exhausted", "out of bounds memory access"); wast.allow_trap_message("indirect call type mismatch", "call stack exhausted"); wast.allow_trap_message("integer divide by zero", "call stack exhausted"); diff --git a/tests/ignores.txt b/tests/ignores.txt index cdc45ddad96..be05b57623e 100644 --- a/tests/ignores.txt +++ b/tests/ignores.txt @@ -26,6 +26,9 @@ llvm::spec::skip_stack_guard_page on darwin cranelift::spec::linking on native llvm::spec::linking on native +# https://github.com/wasmerio/wasmer/issues/1722 +llvm::spec::skip_stack_guard_page on native + # Frontends ## WASI From 571e84625004b31cbbbbe2795c6da6e3b0c3d400 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Thu, 15 Oct 2020 11:36:25 -0700 Subject: [PATCH 5/7] Control which engines are tested by platform detection. --- Makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 48c72eb17af..7e260e00abf 100644 --- a/Makefile +++ b/Makefile @@ -8,13 +8,19 @@ else UNAME_S := endif +# Which compilers we build. These have dependencies that may not on the system. compilers := +# Which engines we test. We always build all engines. +engines := + ifeq ($(ARCH), x86_64) + engines += jit # In X64, Cranelift is enabled compilers += cranelift # LLVM could be enabled if not in Windows ifneq ($(OS), Windows_NT) + engines += native # Singlepass doesn't work yet on Windows compilers += singlepass # Autodetect LLVM from llvm-config @@ -32,7 +38,12 @@ ifeq ($(ARCH), x86_64) endif endif +ifeq ($(ARCH), aarch64) + engines += native +endif + compilers := $(filter-out ,$(compilers)) +engines := $(filter-out ,$(engines)) ifneq ($(OS), Windows_NT) bold := $(shell tput bold) @@ -94,7 +105,7 @@ build-capi-llvm: # Testing # ########### -test: $(foreach compiler,$(compilers),test-$(compiler)-jit test-$(compiler)-native) test-packages test-examples test-deprecated +test: $(foreach engine,$(engines),$(foreach compiler,$(compilers),test-$(compiler)-$(engine))) test-packages test-examples test-deprecated # Singlepass and native engine don't work together, this rule does nothing. test-singlepass-native: From 6d3e1a59e29c7aae648d0bbfa896d25cf95e2223 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Thu, 15 Oct 2020 13:34:26 -0700 Subject: [PATCH 6/7] Add links to TODOs. --- tests/ignores.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/ignores.txt b/tests/ignores.txt index be05b57623e..a55c8e043af 100644 --- a/tests/ignores.txt +++ b/tests/ignores.txt @@ -22,8 +22,9 @@ singlepass on windows # Singlepass is not yet supported on Windows cranelift::spec::skip_stack_guard_page on darwin llvm::spec::skip_stack_guard_page on darwin -# TODO: traps in native engine +# TODO(https://github.com/wasmerio/wasmer/issues/1727): Traps in native engine cranelift::spec::linking on native +# TODO(https://github.com/wasmerio/wasmer/pull/1710): Library is dropped too soon. llvm::spec::linking on native # https://github.com/wasmerio/wasmer/issues/1722 From 69eef6e4905a18fd6756aacc3c16ae592ff53fcd Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Thu, 15 Oct 2020 15:19:07 -0700 Subject: [PATCH 7/7] Enable cranelift on aarch64. Add comments to tests/ignores.txt explaining why they're disabled. Add a list of engines to test so that we don't test engine-native on aarch64. Disable tests in tests/compilers/traps.rs that fail with cranelift on aarch64. Disable tests in examples/ that use cranelift + native, on aarch64. --- Makefile | 15 +++++---------- examples/engine_headless.rs | 2 +- examples/engine_native.rs | 1 + lib/compiler-cranelift/Cargo.toml | 2 +- tests/compilers/traps.rs | 27 ++++++++++++++++++++++----- tests/ignores.txt | 15 +++++++++++++++ 6 files changed, 45 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 7e260e00abf..63a661f4893 100644 --- a/Makefile +++ b/Makefile @@ -9,18 +9,14 @@ else endif # Which compilers we build. These have dependencies that may not on the system. -compilers := +compilers := cranelift # Which engines we test. We always build all engines. -engines := +engines := jit ifeq ($(ARCH), x86_64) - engines += jit - # In X64, Cranelift is enabled - compilers += cranelift # LLVM could be enabled if not in Windows ifneq ($(OS), Windows_NT) - engines += native # Singlepass doesn't work yet on Windows compilers += singlepass # Autodetect LLVM from llvm-config @@ -35,11 +31,10 @@ ifeq ($(ARCH), x86_64) compilers += llvm endif endif - endif -endif -ifeq ($(ARCH), aarch64) - engines += native + # Native engine doesn't work yet on Windows + engines += native + endif endif compilers := $(filter-out ,$(compilers)) diff --git a/examples/engine_headless.rs b/examples/engine_headless.rs index 817dccbeda4..f0d7694ee73 100644 --- a/examples/engine_headless.rs +++ b/examples/engine_headless.rs @@ -147,7 +147,7 @@ fn main() -> Result<(), Box> { } #[test] -#[cfg(not(windows))] +#[cfg(not(any(windows, target_arch = "aarch64")))] fn test_engine_headless() -> Result<(), Box> { main() } diff --git a/examples/engine_native.rs b/examples/engine_native.rs index 47cd2d1fae9..ea69744a40c 100644 --- a/examples/engine_native.rs +++ b/examples/engine_native.rs @@ -87,6 +87,7 @@ fn main() -> Result<(), Box> { } #[test] +#[cfg(not(target_arch = "aarch64"))] fn test_engine_native() -> Result<(), Box> { main() } diff --git a/lib/compiler-cranelift/Cargo.toml b/lib/compiler-cranelift/Cargo.toml index 40ed587d8d7..0633afa467d 100644 --- a/lib/compiler-cranelift/Cargo.toml +++ b/lib/compiler-cranelift/Cargo.toml @@ -15,7 +15,7 @@ edition = "2018" wasmer-compiler = { path = "../compiler", version = "1.0.0-alpha4", features = ["translator"], default-features = false } wasmer-vm = { path = "../vm", version = "1.0.0-alpha4" } wasmer-types = { path = "../wasmer-types", version = "1.0.0-alpha4", default-features = false, features = ["std"] } -cranelift-codegen = { version = "0.65", default-features = false } +cranelift-codegen = { version = "0.65", default-features = false, features = ["x86", "arm64"] } cranelift-frontend = { version = "0.65", default-features = false } tracing = "0.1" hashbrown = { version = "0.8", optional = true } diff --git a/tests/compilers/traps.rs b/tests/compilers/traps.rs index 7922511a02a..7b1944ba369 100644 --- a/tests/compilers/traps.rs +++ b/tests/compilers/traps.rs @@ -38,7 +38,14 @@ fn test_trap_return() -> Result<()> { } #[test] -#[cfg_attr(any(feature = "test-singlepass", feature = "test-native"), ignore)] +#[cfg_attr( + any( + feature = "test-singlepass", + feature = "test-native", + target_arch = "aarch64", + ), + ignore +)] fn test_trap_trace() -> Result<()> { let store = get_store(); let wat = r#" @@ -118,7 +125,14 @@ fn test_trap_trace_cb() -> Result<()> { } #[test] -#[cfg_attr(any(feature = "test-singlepass", feature = "test-native"), ignore)] +#[cfg_attr( + any( + feature = "test-singlepass", + feature = "test-native", + target_arch = "aarch64", + ), + ignore +)] fn test_trap_stack_overflow() -> Result<()> { let store = get_store(); let wat = r#" @@ -153,7 +167,8 @@ fn test_trap_stack_overflow() -> Result<()> { any( feature = "test-singlepass", feature = "test-llvm", - feature = "test-native" + feature = "test-native", + target_arch = "aarch64", ), ignore )] @@ -193,7 +208,8 @@ RuntimeError: unreachable any( feature = "test-singlepass", feature = "test-llvm", - feature = "test-native" + feature = "test-native", + target_arch = "aarch64", ), ignore )] @@ -443,7 +459,8 @@ RuntimeError: indirect call type mismatch any( feature = "test-singlepass", feature = "test-llvm", - feature = "test-native" + feature = "test-native", + target_arch = "aarch64", ), ignore )] diff --git a/tests/ignores.txt b/tests/ignores.txt index a55c8e043af..f8b426a02a8 100644 --- a/tests/ignores.txt +++ b/tests/ignores.txt @@ -30,6 +30,21 @@ llvm::spec::linking on native # https://github.com/wasmerio/wasmer/issues/1722 llvm::spec::skip_stack_guard_page on native +# Cranelift on arm failures +cranelift::spec::align on aarch64 +cranelift::spec::memory_trap on aarch64 +cranelift::spec::simd::simd_bit_shift on aarch64 +cranelift::spec::simd::simd_boolean on aarch64 +cranelift::spec::simd::simd_const on aarch64 +cranelift::spec::simd::simd_i16x8_arith on aarch64 +cranelift::spec::simd::simd_i16x8_sat_arith on aarch64 +cranelift::spec::simd::simd_i32x4_arith on aarch64 +cranelift::spec::simd::simd_i64x2_arith on aarch64 +cranelift::spec::simd::simd_i8x16_arith on aarch64 +cranelift::spec::simd::simd_i8x16_sat_arith on aarch64 +cranelift::spec::simd::simd_lane on aarch64 +cranelift::spec::skip_stack_guard_page on aarch64 + # Frontends ## WASI