compiletest: add ignore-hurd support and annotate some tests
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Thu, 13 Jun 2024 09:16:39 +0000 (11:16 +0200)
committerFabian Grünbichler <debian@fabian.gruenbichler.email>
Tue, 21 Jan 2025 10:38:15 +0000 (11:38 +0100)
These tests hang or make the box OOM

Forwarded: no

Signed-off-by: Fabian Grünbichler <git@fabian.gruenbichler.email>
Gbp-Pq: Topic upstream
Gbp-Pq: Name u-hurd-tests.patch

src/tools/compiletest/src/directive-list.rs
src/tools/compiletest/src/header/tests.rs
tests/crashes/115994.rs
tests/run-make/long-linker-command-lines/foo.rs
tests/ui/associated-consts/issue-93775.rs
tests/ui/issues/issue-74564-if-expr-stack-overflow.rs
tests/ui/threads-sendsync/mpsc_stress.rs

index bdd0b80b3957c5b0672d67070bb4c9313f7d3a20..f3546c79ece978095a7f675d7055a8668d71a7a6 100644 (file)
@@ -59,6 +59,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",
index 4d75c38dd3206554108fba2dead2b55a8b2fde88..7f09722b9de13faccb4be21d1521bec4b419fbae 100644 (file)
@@ -329,6 +329,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"));
index 23d1507136f7ca62ff0d2a24fb9a63eb9bba8589..e0714e5b93e0e0c92b08447dd3fd26c1bd11ebda 100644 (file)
@@ -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;
index 5b30c06fac9e023b6955ac9e1f50ce5d8864d7b7..9ef0d5add4630649d72b10c76c8c60dfc05c2437 100644 (file)
@@ -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() {
index c9044e27e0e7f7692a65c662da042f0e7b329c92..5fb093d4fc6d59b753b2b9fe7e7e153dab7eb164 100644 (file)
@@ -1,5 +1,6 @@
 //@ build-pass
 // ignore-tidy-linelength
+//@ ignore-hurd
 
 // Regression for #93775, needs build-pass to test it.
 
index c0ffed27e6fb4687d6bd7b2e82f65f1ddc274ce3..1e97353af06285c98f83af34040e797bafb0776a 100644 (file)
@@ -1,5 +1,6 @@
 //@ build-pass
 // ignore-tidy-filelength
+//@ ignore-hurd
 #![crate_type = "rlib"]
 
 fn banana(v: &str) -> u32 {
index fe0b47f3a842e4b1b5da4f4445186320c5c8b67a..77ce6d5f0f1c31a9378a85232527fe8e7d3796d4 100644 (file)
@@ -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};