about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/tools/tidy/src/allowed_run_make_makefiles.txt3
-rw-r--r--tests/run-make/target-cpu-native/rmake.rs4
-rw-r--r--tests/run-make/target-specs/rmake.rs2
-rw-r--r--tests/run-make/target-without-atomic-cas/Makefile5
-rw-r--r--tests/run-make/target-without-atomic-cas/rmake.rs16
5 files changed, 18 insertions, 12 deletions
diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt
index 276d2d694cd..686cc2f9c43 100644
--- a/src/tools/tidy/src/allowed_run_make_makefiles.txt
+++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt
@@ -162,9 +162,6 @@ run-make/symbol-mangling-hashed/Makefile
 run-make/symbol-visibility/Makefile
 run-make/symbols-include-type-name/Makefile
 run-make/sysroot-crates-are-unstable/Makefile
-run-make/target-cpu-native/Makefile
-run-make/target-specs/Makefile
-run-make/target-without-atomic-cas/Makefile
 run-make/test-benches/Makefile
 run-make/test-harness/Makefile
 run-make/thumb-none-cortex-m/Makefile
diff --git a/tests/run-make/target-cpu-native/rmake.rs b/tests/run-make/target-cpu-native/rmake.rs
index c5bd0245051..fd5fb6193fe 100644
--- a/tests/run-make/target-cpu-native/rmake.rs
+++ b/tests/run-make/target-cpu-native/rmake.rs
@@ -3,8 +3,6 @@
 // warnings when used, and that binaries produced by it can also be successfully executed.
 // See https://github.com/rust-lang/rust/pull/23238
 
-// FIXME(Oneirical): only-linux only-x86_64
-
 use run_make_support::{run, rustc};
 
 fn main() {
@@ -12,5 +10,5 @@ fn main() {
     run("foo");
     // There should be zero warnings emitted - the bug would cause "unknown CPU `native`"
     // to be printed out.
-    assert_eq!(out.len(), 0);
+    assert!(out.is_empty());
 }
diff --git a/tests/run-make/target-specs/rmake.rs b/tests/run-make/target-specs/rmake.rs
index 10c2fa29830..d2b5f650838 100644
--- a/tests/run-make/target-specs/rmake.rs
+++ b/tests/run-make/target-specs/rmake.rs
@@ -1,6 +1,6 @@
 // Target-specific compilation in rustc used to have case-by-case peculiarities in 2014,
 // with the compiler having redundant target types and unspecific names. An overarching rework
-// in #161156 changed the way the target flag functions, and this test attempts compilation
+// in #16156 changed the way the target flag functions, and this test attempts compilation
 // with the target flag's bundle of new features to check that compilation either succeeds while
 // using them correctly, or fails with the right error message when using them improperly.
 // See https://github.com/rust-lang/rust/pull/16156
diff --git a/tests/run-make/target-without-atomic-cas/Makefile b/tests/run-make/target-without-atomic-cas/Makefile
deleted file mode 100644
index 451f03d66cd..00000000000
--- a/tests/run-make/target-without-atomic-cas/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-include ../tools.mk
-
-# The target used below doesn't support atomic CAS operations. Verify that's the case
-all:
-	$(RUSTC) --print cfg --target thumbv6m-none-eabi | $(CGREP) -v 'target_has_atomic="ptr"'
diff --git a/tests/run-make/target-without-atomic-cas/rmake.rs b/tests/run-make/target-without-atomic-cas/rmake.rs
new file mode 100644
index 00000000000..c8782b6d1a5
--- /dev/null
+++ b/tests/run-make/target-without-atomic-cas/rmake.rs
@@ -0,0 +1,16 @@
+// ARM Cortex-M are a class of processors supported by the rust compiler. However,
+// they cannot support any atomic features, such as Arc. This test simply prints
+// the configuration details of one Cortex target, and checks that the compiler
+// does not falsely list atomic support.
+// See https://github.com/rust-lang/rust/pull/36874
+
+use run_make_support::rustc;
+
+// The target used below doesn't support atomic CAS operations. Verify that's the case
+fn main() {
+    rustc()
+        .print("cfg")
+        .target("thumbv6m-none-eabi")
+        .run()
+        .assert_stdout_not_contains(r#"target_has_atomic="ptr""#);
+}