From 2cc80774ae03a3ba9806e7c7cdabbcabb50979f6 Mon Sep 17 00:00:00 2001 From: Debian Rust Maintainers Date: Thu, 13 Jun 2024 11:16:39 +0200 Subject: [PATCH] compiletest: add ignore-hurd support and annotate some tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit These tests hang or make the box OOM Forwarded: no Signed-off-by: Fabian Grünbichler Gbp-Pq: Topic upstream Gbp-Pq: Name u-hurd-tests.patch --- src/tools/compiletest/src/directives/directive_names.rs | 1 + src/tools/compiletest/src/directives/tests.rs | 1 + tests/crashes/108499.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/directives/directive_names.rs b/src/tools/compiletest/src/directives/directive_names.rs index 0ef84fb459..4a8387403f 100644 --- a/src/tools/compiletest/src/directives/directive_names.rs +++ b/src/tools/compiletest/src/directives/directive_names.rs @@ -69,6 +69,7 @@ pub(crate) 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/directives/tests.rs b/src/tools/compiletest/src/directives/tests.rs index 33a02eb29f..54687d3727 100644 --- a/src/tools/compiletest/src/directives/tests.rs +++ b/src/tools/compiletest/src/directives/tests.rs @@ -320,6 +320,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/108499.rs b/tests/crashes/108499.rs index 4a0638cd59..658d63121e 100644 --- a/tests/crashes/108499.rs +++ b/tests/crashes/108499.rs @@ -1,4 +1,5 @@ //@ known-bug: #108499 +//@ ignore-hurd // at lower recursion limits the recursion limit is reached before the bug happens #![recursion_limit = "2000"] diff --git a/tests/run-make/long-linker-command-lines/foo.rs b/tests/run-make/long-linker-command-lines/foo.rs index 5b30c06fac..9ef0d5add4 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 a9b8d10a83..ac41a6075b 100644 --- a/tests/ui/associated-consts/issue-93775.rs +++ b/tests/ui/associated-consts/issue-93775.rs @@ -7,6 +7,7 @@ //@ build-pass //@ revisions: current next //@ ignore-compare-mode-next-solver (explicit revisions) +//@ ignore-hurd //@[next] compile-flags: -Znext-solver #![recursion_limit = "1001"] 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 c0ffed27e6..1e97353af0 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 fe0b47f3a8..77ce6d5f0f 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}; -- 2.30.2