Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
compiletest: ignore tests on a per-revision basis
Otherwise something that ought to seemingly work like `//[x86]
needs-llvm-components: x86` or `//[nll_beyond]should-fail` do not get
evaluated properly.
  • Loading branch information
nagisa committed Jun 24, 2021
1 parent 493fe80 commit cfcb2b6
Show file tree
Hide file tree
Showing 17 changed files with 357 additions and 383 deletions.
12 changes: 6 additions & 6 deletions src/test/ui/asm/inline-syntax.arm.stderr
Expand Up @@ -13,7 +13,7 @@ LL | .intel_syntax noprefix
| ^

error: unknown directive
--> $DIR/inline-syntax.rs:29:15
--> $DIR/inline-syntax.rs:31:15
|
LL | asm!(".intel_syntax noprefix", "nop");
| ^
Expand All @@ -25,7 +25,7 @@ LL | .intel_syntax noprefix
| ^

error: unknown directive
--> $DIR/inline-syntax.rs:32:15
--> $DIR/inline-syntax.rs:34:15
|
LL | asm!(".intel_syntax aaa noprefix", "nop");
| ^
Expand All @@ -37,7 +37,7 @@ LL | .intel_syntax aaa noprefix
| ^

error: unknown directive
--> $DIR/inline-syntax.rs:35:15
--> $DIR/inline-syntax.rs:37:15
|
LL | asm!(".att_syntax noprefix", "nop");
| ^
Expand All @@ -49,7 +49,7 @@ LL | .att_syntax noprefix
| ^

error: unknown directive
--> $DIR/inline-syntax.rs:38:15
--> $DIR/inline-syntax.rs:40:15
|
LL | asm!(".att_syntax bbb noprefix", "nop");
| ^
Expand All @@ -61,7 +61,7 @@ LL | .att_syntax bbb noprefix
| ^

error: unknown directive
--> $DIR/inline-syntax.rs:41:15
--> $DIR/inline-syntax.rs:43:15
|
LL | asm!(".intel_syntax noprefix; nop");
| ^
Expand All @@ -73,7 +73,7 @@ LL | .intel_syntax noprefix; nop
| ^

error: unknown directive
--> $DIR/inline-syntax.rs:47:13
--> $DIR/inline-syntax.rs:49:13
|
LL | .intel_syntax noprefix
| ^
Expand Down
14 changes: 7 additions & 7 deletions src/test/ui/asm/inline-syntax.x86_64.stderr
@@ -1,43 +1,43 @@
warning: avoid using `.intel_syntax`, Intel syntax is the default
--> $DIR/inline-syntax.rs:55:14
--> $DIR/inline-syntax.rs:57:14
|
LL | global_asm!(".intel_syntax noprefix", "nop");
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(bad_asm_style)]` on by default

warning: avoid using `.intel_syntax`, Intel syntax is the default
--> $DIR/inline-syntax.rs:29:15
--> $DIR/inline-syntax.rs:31:15
|
LL | asm!(".intel_syntax noprefix", "nop");
| ^^^^^^^^^^^^^^^^^^^^^^

warning: avoid using `.intel_syntax`, Intel syntax is the default
--> $DIR/inline-syntax.rs:32:15
--> $DIR/inline-syntax.rs:34:15
|
LL | asm!(".intel_syntax aaa noprefix", "nop");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: avoid using `.att_syntax`, prefer using `options(att_syntax)` instead
--> $DIR/inline-syntax.rs:35:15
--> $DIR/inline-syntax.rs:37:15
|
LL | asm!(".att_syntax noprefix", "nop");
| ^^^^^^^^^^^^^^^^^^^^

warning: avoid using `.att_syntax`, prefer using `options(att_syntax)` instead
--> $DIR/inline-syntax.rs:38:15
--> $DIR/inline-syntax.rs:40:15
|
LL | asm!(".att_syntax bbb noprefix", "nop");
| ^^^^^^^^^^^^^^^^^^^^^^^^

warning: avoid using `.intel_syntax`, Intel syntax is the default
--> $DIR/inline-syntax.rs:41:15
--> $DIR/inline-syntax.rs:43:15
|
LL | asm!(".intel_syntax noprefix; nop");
| ^^^^^^^^^^^^^^^^^^^^^^

warning: avoid using `.intel_syntax`, Intel syntax is the default
--> $DIR/inline-syntax.rs:47:13
--> $DIR/inline-syntax.rs:49:13
|
LL | .intel_syntax noprefix
| ^^^^^^^^^^^^^^^^^^^^^^
Expand Down
@@ -1,8 +1,8 @@
// revisions: nll_target

// The following revisions are disabled due to missing support from two-phase beyond autorefs
// The nll_beyond revision is disabled due to missing support from two-phase beyond autorefs
//[nll_beyond]compile-flags: -Z borrowck=mir -Z two-phase-beyond-autoref
//[nll_beyond] should-fail
//[nll_beyond]should-fail

//[nll_target]compile-flags: -Z borrowck=mir

Expand Down
@@ -1,13 +1,21 @@
// build-pass
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
// needs-llvm-components: arm
#![feature(abi_c_cmse_nonsecure_call)]
#![no_std]
#![feature(abi_c_cmse_nonsecure_call, no_core, lang_items, intrinsics)]
#![no_core]
#[lang="sized"]
pub trait Sized { }
#[lang="copy"]
pub trait Copy { }

extern "rust-intrinsic" {
pub fn transmute<T, U>(e: T) -> U;
}

#[no_mangle]
pub fn test(a: u32, b: u32, c: u32, d: u32) -> u32 {
let non_secure_function = unsafe {
core::mem::transmute::<usize, extern "C-cmse-nonsecure-call" fn(u32, u32, u32, u32) -> u32>(
transmute::<usize, extern "C-cmse-nonsecure-call" fn(u32, u32, u32, u32) -> u32>(
0x10000004,
)
};
Expand Down
@@ -1,3 +1,4 @@
// build-fail
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
// needs-llvm-components: arm
// min-llvm-version: 11.0
Expand All @@ -15,7 +16,7 @@ extern "rust-intrinsic" {
#[no_mangle]
pub fn test(a: u32, b: u32, c: u32, d: u32, e: u32) -> u32 {
let non_secure_function = unsafe {
core::mem::transmute::<
transmute::<
usize,
extern "C-cmse-nonsecure-call" fn(u32, u32, u32, u32, u32) -> u32>
(
Expand Down
@@ -1,6 +1,8 @@
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
// needs-llvm-components: arm
#![feature(abi_c_cmse_nonsecure_call)]
#![no_std]
#![feature(abi_c_cmse_nonsecure_call, lang_items, no_core)]
#![no_core]
#[lang="sized"]
trait Sized { }

pub extern "C-cmse-nonsecure-call" fn test() {} //~ ERROR [E0781]
@@ -1,8 +1,8 @@
error[E0781]: the `"cmse-nonsecure-call"` ABI is only allowed on function pointers.
--> $DIR/wrong-abi-location-1.rs:6:1
error[E0781]: the `"C-cmse-nonsecure-call"` ABI is only allowed on function pointers.
--> $DIR/wrong-abi-location-1.rs:8:1
|
LL | pub extern "C-cmse-nonsecure-call" fn test() {} //~ ERROR [E0781]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | pub extern "C-cmse-nonsecure-call" fn test() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

Expand Down
@@ -1,7 +1,9 @@
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
// needs-llvm-components: arm
#![feature(abi_c_cmse_nonsecure_call)]
#![no_std]
#![feature(abi_c_cmse_nonsecure_call, lang_items, no_core)]
#![no_core]
#[lang="sized"]
trait Sized { }

extern "C-cmse-nonsecure-call" { //~ ERROR [E0781]
fn test();
Expand Down
@@ -1,8 +1,8 @@
error[E0781]: the `"C-cmse-nonsecure-call"` ABI is only allowed on function pointers.
--> $DIR/wrong-abi-location-2.rs:6:1
--> $DIR/wrong-abi-location-2.rs:8:1
|
LL | / extern "C-cmse-nonsecure-call" {
LL | | fn test(); //~ ERROR [E0781]
LL | | fn test();
LL | | }
| |_^

Expand Down
@@ -1,11 +1,15 @@
// build-pass
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
// needs-llvm-components: arm
#![feature(cmse_nonsecure_entry)]
#![no_std]
#![feature(cmse_nonsecure_entry, no_core, lang_items)]
#![no_core]
#[lang="sized"]
trait Sized { }
#[lang="copy"]
trait Copy { }

#[no_mangle]
#[cmse_nonsecure_entry]
pub extern "C" fn entry_function(a: u32, b: u32, c: u32, d: u32) -> u32 {
a + b + c + d
pub extern "C" fn entry_function(_: u32, _: u32, _: u32, d: u32) -> u32 {
d
}
@@ -1,3 +1,4 @@
// build-fail
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
// needs-llvm-components: arm
// min-llvm-version: 11.0
Expand Down
11 changes: 7 additions & 4 deletions src/test/ui/cmse-nonsecure/cmse-nonsecure-entry/wrong-abi.rs
@@ -1,10 +1,13 @@
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
// needs-llvm-components: arm
#![feature(cmse_nonsecure_entry)]
#![no_std]
#![feature(cmse_nonsecure_entry, no_core, lang_items)]
#![no_core]
#[lang="sized"]
trait Sized { }

#[no_mangle]
#[cmse_nonsecure_entry]
pub fn entry_function(a: u32, b: u32, c: u32, d: u32) -> u32 { //~ ERROR [E0776]
a + b + c + d
//~^ ERROR `#[cmse_nonsecure_entry]` requires C ABI [E0776]
pub fn entry_function(_: u32, _: u32, _: u32, d: u32) -> u32 {
d
}
@@ -1,5 +1,5 @@
error[E0776]: `#[cmse_nonsecure_entry]` functions require C ABI
--> $DIR/wrong-abi.rs:7:1
error[E0776]: `#[cmse_nonsecure_entry]` requires C ABI
--> $DIR/wrong-abi.rs:9:1
|
LL | #[cmse_nonsecure_entry]
| ^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/crate-loading/missing-std.stderr
@@ -1,5 +1,5 @@
error[E0463]: can't find crate for `core`
--> $DIR/missing-std.rs:5:1
--> $DIR/missing-std.rs:6:1
|
LL | extern crate core;
| ^^^^^^^^^^^^^^^^^^ can't find crate
Expand Down

0 comments on commit cfcb2b6

Please sign in to comment.