1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
|
From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Date: Thu, 13 Jun 2024 11:16:39 +0200
Subject: compiletest: add ignore-hurd support and annotate some tests
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
These tests hang or make the box OOM
Forwarded: no
Signed-off-by: Fabian Grünbichler <git@fabian.gruenbichler.email>
---
src/tools/compiletest/src/directive-list.rs | 1 +
src/tools/compiletest/src/header/tests.rs | 1 +
tests/crashes/115994.rs | 1 +
tests/run-make/long-linker-command-lines/foo.rs | 7 +++++++
tests/ui/associated-consts/issue-93775.rs | 1 +
tests/ui/issues/issue-74564-if-expr-stack-overflow.rs | 1 +
tests/ui/threads-sendsync/mpsc_stress.rs | 1 +
7 files changed, 13 insertions(+)
diff --git a/src/tools/compiletest/src/directive-list.rs b/src/tools/compiletest/src/directive-list.rs
index 01068af..7952c7a 100644
--- a/src/tools/compiletest/src/directive-list.rs
+++ b/src/tools/compiletest/src/directive-list.rs
@@ -58,6 +58,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"ignore-gnu",
"ignore-haiku",
"ignore-horizon",
+ "ignore-hurd",
"ignore-i686-pc-windows-gnu",
"ignore-i686-pc-windows-msvc",
"ignore-illumos",
diff --git a/src/tools/compiletest/src/header/tests.rs b/src/tools/compiletest/src/header/tests.rs
index 618b66d..5708375 100644
--- a/src/tools/compiletest/src/header/tests.rs
+++ b/src/tools/compiletest/src/header/tests.rs
@@ -332,6 +332,7 @@ fn ignore_target() {
assert!(check_ignore(&config, "//@ ignore-x86_64-unknown-linux-gnu"));
assert!(check_ignore(&config, "//@ ignore-x86_64"));
assert!(check_ignore(&config, "//@ ignore-linux"));
+ assert!(check_ignore(&config, "//@ ignore-hurd"));
assert!(check_ignore(&config, "//@ ignore-unix"));
assert!(check_ignore(&config, "//@ ignore-gnu"));
assert!(check_ignore(&config, "//@ ignore-64bit"));
diff --git a/tests/crashes/115994.rs b/tests/crashes/115994.rs
index 23d1507..e0714e5 100644
--- a/tests/crashes/115994.rs
+++ b/tests/crashes/115994.rs
@@ -1,5 +1,6 @@
//@ known-bug: #115994
//@ compile-flags: -Cdebuginfo=2 --crate-type lib
+//@ ignore-hurd
// To prevent "overflow while adding drop-check rules".
use std::mem::ManuallyDrop;
diff --git a/tests/run-make/long-linker-command-lines/foo.rs b/tests/run-make/long-linker-command-lines/foo.rs
index 5b30c06..9ef0d5a 100644
--- a/tests/run-make/long-linker-command-lines/foo.rs
+++ b/tests/run-make/long-linker-command-lines/foo.rs
@@ -33,6 +33,13 @@ fn read_linker_args(path: &Path) -> String {
}
}
+#[cfg(target_os = "hurd")]
+// Debian: test causes build to fail on hurd
+fn main() {
+ return;
+}
+
+#[cfg(not(target_os = "hurd"))]
fn main() {
let ok = PathBuf::from("ok");
if env::var("YOU_ARE_A_LINKER").is_ok() {
diff --git a/tests/ui/associated-consts/issue-93775.rs b/tests/ui/associated-consts/issue-93775.rs
index 88e88b5..0981abc 100644
--- a/tests/ui/associated-consts/issue-93775.rs
+++ b/tests/ui/associated-consts/issue-93775.rs
@@ -4,6 +4,7 @@
//@ build-pass
// ignore-tidy-linelength
+//@ ignore-hurd
// Regression for #93775, needs build-pass to test it.
diff --git a/tests/ui/issues/issue-74564-if-expr-stack-overflow.rs b/tests/ui/issues/issue-74564-if-expr-stack-overflow.rs
index c0ffed2..1e97353 100644
--- a/tests/ui/issues/issue-74564-if-expr-stack-overflow.rs
+++ b/tests/ui/issues/issue-74564-if-expr-stack-overflow.rs
@@ -1,5 +1,6 @@
//@ build-pass
// ignore-tidy-filelength
+//@ ignore-hurd
#![crate_type = "rlib"]
fn banana(v: &str) -> u32 {
diff --git a/tests/ui/threads-sendsync/mpsc_stress.rs b/tests/ui/threads-sendsync/mpsc_stress.rs
index fe0b47f..77ce6d5 100644
--- a/tests/ui/threads-sendsync/mpsc_stress.rs
+++ b/tests/ui/threads-sendsync/mpsc_stress.rs
@@ -1,6 +1,7 @@
//@ run-pass
//@ compile-flags:--test
//@ needs-threads
+//@ ignore-hurd
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::mpsc::{channel, RecvError, RecvTimeoutError, TryRecvError};
|