Skip to content

Commit 284297b

Browse files
committed
Update test directives for wasm32-wasip1
* The WASI targets deal with the `main` symbol a bit differently than native so some `codegen` and `assembly` tests have been ignored. * All `ignore-emscripten` directives have been updated to `ignore-wasm32` to be more clear that all wasm targets are ignored and it's not just Emscripten. * Most `ignore-wasm32-bare` directives are now gone. * Some ignore directives for wasm were switched to `needs-unwind` instead. * Many `ignore-wasm32*` directives are removed as the tests work with WASI as opposed to `wasm32-unknown-unknown`.
1 parent e9397e4 commit 284297b

File tree

196 files changed

+211
-335
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

196 files changed

+211
-335
lines changed

tests/assembly/wasm_exceptions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ only-wasm32-bare
1+
//@ only-wasm32
22
//@ assembly-output: emit-asm
33
//@ compile-flags: -C target-feature=+exception-handling
44
//@ compile-flags: -C panic=unwind

tests/codegen/abi-main-signature-32bit-c-int.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// This test is for targets with 32bit c_int only.
55
//@ ignore-msp430
66
//@ ignore-avr
7+
//@ ignore-wasi wasi codegens the main symbol differently
78

89
fn main() {
910
}

tests/codegen/drop.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
//@ ignore-wasm32-bare compiled with panic=abort by default
21
//@ needs-unwind - this test verifies the amount of drop calls when unwinding is used
32
//@ compile-flags: -C no-prepopulate-passes
43

tests/codegen/enum/enum-debug-clike.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
//
55
//@ ignore-msvc
6+
//@ ignore-wasi wasi codegens the main symbol differently
67

78
//@ compile-flags: -g -C no-prepopulate-passes
89

tests/codegen/enum/enum-debug-niche.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// This is ignored for the fallback mode on MSVC due to problems with PDB.
33

44
//@ ignore-msvc
5+
//@ ignore-wasi wasi codegens the main symbol differently
56

67
//@ compile-flags: -g -C no-prepopulate-passes
78

tests/codegen/enum/enum-debug-tagged.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// This is ignored for the fallback mode on MSVC due to problems with PDB.
33

44
//@ ignore-msvc
5+
//@ ignore-wasi wasi codegens the main symbol differently
56

67
//@ compile-flags: -g -C no-prepopulate-passes
78

tests/codegen/enum/enum-u128.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
//
55
//@ ignore-msvc
6+
//@ ignore-wasi wasi codegens the main symbol differently
67

78
//@ compile-flags: -g -C no-prepopulate-passes
89

tests/codegen/fn-impl-trait-self.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ compile-flags: -g
2+
//@ ignore-wasi wasi codegens the main symbol differently
23
//
34
// CHECK-LABEL: @main
45
// MSVC: {{.*}}DIDerivedType(tag: DW_TAG_pointer_type, name: "recursive_type$ (*)()",{{.*}}

tests/codegen/generic-debug.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ ignore-windows
2+
//@ ignore-wasi wasi codegens the main symbol differently
23

34
//@ compile-flags: -g -C no-prepopulate-passes
45

tests/codegen/link_section.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ ignore-emscripten default visibility is hidden
1+
//@ ignore-wasm32 custom sections work differently on wasm
22
//@ compile-flags: -C no-prepopulate-passes
33

44
#![crate_type = "lib"]

tests/codegen/mainsubprogram.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
//@ ignore-windows
55
//@ ignore-macos
6+
//@ ignore-wasi
67

78
//@ compile-flags: -g -C no-prepopulate-passes
89

tests/codegen/mainsubprogramstart.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ ignore-windows
22
//@ ignore-macos
3+
//@ ignore-wasi wasi codegens the main symbol differently
34

45
//@ compile-flags: -g -C no-prepopulate-passes
56

tests/codegen/personality_lifetimes.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ ignore-msvc
2-
//@ ignore-wasm32-bare compiled with panic=abort by default
32
//@ needs-unwind
43

54
//@ compile-flags: -O -C no-prepopulate-passes

tests/codegen/repr/transparent-imm-array.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
//@ revisions: arm mips thumb wasm32
1+
//@ revisions: arm mips thumb
22
//@ compile-flags: -C no-prepopulate-passes
33
//
44
//@[arm] only-arm
55
//@[mips] only-mips
66
//@[thumb] only-thumb
7-
//@[wasm32] only-wasm32
8-
//@ ignore-emscripten
97
// See ./transparent.rs
108
// Some platforms pass large aggregates using immediate arrays in LLVMIR
119
// Other platforms pass large aggregates using struct pointer in LLVMIR

tests/codegen/unwind-abis/nounwind-on-stable-panic-abort.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ compile-flags: -C opt-level=0 -Cpanic=abort
2-
//@ ignore-wasm32-bare compiled with panic=abort by default
32

43
#![crate_type = "lib"]
54

tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ compile-flags: -C opt-level=0
2-
//@ ignore-wasm32-bare compiled with panic=abort by default
32
//@ needs-unwind
43

54
#![crate_type = "lib"]

tests/codegen/unwind-abis/nounwind.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ compile-flags: -C opt-level=0 -Cpanic=abort
2-
//@ ignore-wasm32-bare compiled with panic=abort by default
2+
//@ needs-unwind
33

44
#![crate_type = "lib"]
55
#![feature(c_unwind)]

tests/codegen/unwind-extern-exports.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ compile-flags: -C opt-level=0
2-
//@ ignore-wasm32-bare compiled with panic=abort by default
32
//@ needs-unwind
43

54
#![crate_type = "lib"]

tests/codegen/unwind-extern-imports.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ compile-flags: -C no-prepopulate-passes
2-
//@ ignore-wasm32-bare compiled with panic=abort by default
32
//@ needs-unwind
43

54
#![crate_type = "lib"]

tests/codegen/wasm_exceptions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ only-wasm32-bare
1+
//@ only-wasm32
22
//@ compile-flags: -C panic=unwind
33

44
#![crate_type = "lib"]

tests/incremental/change_crate_dep_kind.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Test that we detect changes to the `dep_kind` query. If the change is not
22
// detected then -Zincremental-verify-ich will trigger an assertion.
33

4-
//@ ignore-wasm32-bare compiled with panic=abort by default
54
//@ needs-unwind
65
//@ revisions:cfail1 cfail2
76
//@ compile-flags: -Z query-dep-graph -Cpanic=unwind

tests/incremental/issue-54059.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ aux-build:issue-54059.rs
2-
//@ ignore-wasm32-bare no libc for ffi testing
32
//@ ignore-windows - dealing with weird symbols issues on dylibs isn't worth it
43
//@ revisions: rpass1
54

tests/run-pass-valgrind/exit-flushes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ ignore-emscripten
1+
//@ ignore-wasm32 no subprocess support
22
//@ ignore-sgx no processes
33
//@ ignore-macos this needs valgrind 3.11 or higher; see
44
// https://github.com/rust-lang/rust/pull/30365#issuecomment-165763679

tests/ui/abi/anon-extern-mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//@ run-pass
22
//@ pretty-expanded FIXME #23616
3-
//@ ignore-wasm32-bare no libc to test ffi with
43

54
#![feature(rustc_private)]
65

tests/ui/abi/c-stack-as-value.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//@ run-pass
22
//@ pretty-expanded FIXME #23616
3-
//@ ignore-wasm32-bare no libc to test ffi with
43

54
#![feature(rustc_private)]
65

tests/ui/abi/c-stack-returning-int64.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ run-pass
2-
//@ ignore-wasm32-bare no libc to test with
32
//@ ignore-sgx no libc
43

54
#![feature(rustc_private)]

tests/ui/abi/cabi-int-widening.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ run-pass
2-
//@ ignore-wasm32-bare no libc to test ffi with
32

43
#[link(name = "rust_test_helpers", kind = "static")]
54
extern "C" {

tests/ui/abi/cross-crate/anon-extern-mod-cross-crate-2.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//@ run-pass
22
//@ aux-build:anon-extern-mod-cross-crate-1.rs
33
//@ pretty-expanded FIXME #23616
4-
//@ ignore-wasm32-bare no libc to test ffi with
54

65
extern crate anonexternmod;
76

tests/ui/abi/cross-crate/duplicated-external-mods.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
//@ aux-build:anon-extern-mod-cross-crate-1.rs
33
//@ aux-build:anon-extern-mod-cross-crate-1.rs
44
//@ pretty-expanded FIXME #23616
5-
//@ ignore-wasm32-bare no libc to test ffi with
65

76
extern crate anonexternmod;
87

tests/ui/abi/extern/extern-call-deep.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ run-pass
2-
//@ ignore-wasm32-bare no libc to test ffi with
32
//@ ignore-emscripten blows the JS stack
43

54
#![feature(rustc_private)]

tests/ui/abi/extern/extern-call-indirect.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ run-pass
2-
//@ ignore-wasm32-bare no libc to test ffi with
32

43
#![feature(rustc_private)]
54

tests/ui/abi/extern/extern-crosscrate.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//@ run-pass
22
//@ aux-build:extern-crosscrate-source.rs
3-
//@ ignore-wasm32-bare no libc to test ffi with
43

54
#![feature(rustc_private)]
65

tests/ui/abi/extern/extern-pass-TwoU16s.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//@ run-pass
22
#![allow(improper_ctypes)]
33

4-
//@ ignore-wasm32-bare no libc for ffi testing
5-
64
// Test a foreign function that accepts and returns a struct
75
// by value.
86

tests/ui/abi/extern/extern-pass-TwoU32s.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//@ run-pass
22
#![allow(improper_ctypes)]
33

4-
//@ ignore-wasm32-bare no libc for ffi testing
5-
64
// Test a foreign function that accepts and returns a struct
75
// by value.
86

tests/ui/abi/extern/extern-pass-TwoU64s.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//@ run-pass
22
#![allow(improper_ctypes)]
33

4-
//@ ignore-wasm32-bare no libc for ffi testing
5-
64
// Test a foreign function that accepts and returns a struct
75
// by value.
86

tests/ui/abi/extern/extern-pass-TwoU8s.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//@ run-pass
22
#![allow(improper_ctypes)]
33

4-
//@ ignore-wasm32-bare no libc for ffi testing
5-
64
// Test a foreign function that accepts and returns a struct
75
// by value.
86

tests/ui/abi/extern/extern-pass-char.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ run-pass
2-
//@ ignore-wasm32-bare no libc for ffi testing
32

43
// Test a function that takes/returns a u8.
54

tests/ui/abi/extern/extern-pass-double.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ run-pass
2-
//@ ignore-wasm32-bare no libc for ffi testing
32

43
#[link(name = "rust_test_helpers", kind = "static")]
54
extern "C" {

tests/ui/abi/extern/extern-pass-u32.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ run-pass
2-
//@ ignore-wasm32-bare no libc for ffi testing
32

43
// Test a function that takes/returns a u32.
54

tests/ui/abi/extern/extern-pass-u64.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ run-pass
2-
//@ ignore-wasm32-bare no libc for ffi testing
32

43
// Test a call to a function that takes/returns a u64.
54

tests/ui/abi/extern/extern-return-TwoU16s.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//@ run-pass
22
#![allow(improper_ctypes)]
33

4-
//@ ignore-wasm32-bare no libc to test ffi with
5-
64
pub struct TwoU16s {
75
one: u16,
86
two: u16,

tests/ui/abi/extern/extern-return-TwoU32s.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//@ run-pass
22
#![allow(improper_ctypes)]
33

4-
//@ ignore-wasm32-bare no libc to test ffi with
5-
64
pub struct TwoU32s {
75
one: u32,
86
two: u32,

tests/ui/abi/extern/extern-return-TwoU64s.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//@ run-pass
22
#![allow(improper_ctypes)]
33

4-
//@ ignore-wasm32-bare no libc to test ffi with
5-
64
pub struct TwoU64s {
75
one: u64,
86
two: u64,

tests/ui/abi/extern/extern-return-TwoU8s.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//@ run-pass
22
#![allow(improper_ctypes)]
33

4-
//@ ignore-wasm32-bare no libc to test ffi with
5-
64
pub struct TwoU8s {
75
one: u8,
86
two: u8,

tests/ui/abi/foreign/foreign-dupe.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//@ run-pass
22
//@ aux-build:foreign_lib.rs
3-
//@ ignore-wasm32-bare no libc to test ffi with
43

54
// Check that we can still call duplicated extern (imported) functions
65
// which were declared in another crate. See issues #32740 and #32783.

tests/ui/abi/foreign/foreign-fn-with-byval.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//@ run-pass
22
#![allow(improper_ctypes, improper_ctypes_definitions)]
33

4-
//@ ignore-wasm32-bare no libc to test ffi with
5-
64
#[derive(Copy, Clone)]
75
pub struct S {
86
x: u64,

tests/ui/abi/foreign/foreign-no-abi.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//@ run-pass
22
// ABI is cdecl by default
33

4-
//@ ignore-wasm32-bare no libc to test ffi with
54
//@ pretty-expanded FIXME #23616
65

76
#![feature(rustc_private)]

tests/ui/abi/foreign/invoke-external-foreign.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//@ run-pass
22
//@ aux-build:foreign_lib.rs
3-
//@ ignore-wasm32-bare no libc to test ffi with
43

54
// The purpose of this test is to check that we can
65
// successfully (and safely) invoke external, cdecl

tests/ui/abi/homogenous-floats-target-feature-mixup.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// without #[repr(simd)]
66

77
//@ run-pass
8-
//@ ignore-emscripten
8+
//@ ignore-wasm32 no processes
99
//@ ignore-sgx no processes
1010

1111
#![feature(avx512_target_feature)]

tests/ui/abi/issue-28676.rs

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#![allow(dead_code)]
33
#![allow(improper_ctypes)]
44

5-
//@ ignore-wasm32-bare no libc to test ffi with
6-
75
#[derive(Copy, Clone)]
86
pub struct Quad {
97
a: u64,

tests/ui/abi/issues/issue-62350-sysv-neg-reg-counts.rs

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#![allow(dead_code)]
33
#![allow(improper_ctypes)]
44

5-
//@ ignore-wasm32-bare no libc to test ffi with
6-
75
#[derive(Copy, Clone)]
86
pub struct QuadFloats {
97
a: f32,

tests/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ run-pass
2-
//@ ignore-wasm
32
#![allow(dead_code)]
43
#![allow(improper_ctypes)]
54

tests/ui/abi/lib-defaults.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//@ run-pass
22
//@ dont-check-compiler-stderr (rust-lang/rust#54222)
33

4-
//@ ignore-wasm32-bare no libc to test ffi with
5-
64
//@ compile-flags: -lrust_test_helpers
75

86
#[link(name = "rust_test_helpers", kind = "static")]

tests/ui/abi/mir/mir_codegen_calls_variadic.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ run-pass
2-
//@ ignore-wasm32-bare no libc to test ffi with
32

43
#[link(name = "rust_test_helpers", kind = "static")]
54
extern "C" {

0 commit comments

Comments
 (0)