From 1dbedaf40520e499f1bed308625649d431e95451 Mon Sep 17 00:00:00 2001 From: Jieyou Xu Date: Mon, 16 Jun 2025 15:45:25 +0800 Subject: [PATCH 1/2] Refine run-make test ignores due to unpredictable `i686-pc-windows-gnu` unwind mechanism --- tests/run-make/dump-ice-to-disk/rmake.rs | 16 ++++++++-------- .../rmake.rs | 9 ++++----- .../unstable-feature-usage-metrics/rmake.rs | 8 +++----- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/tests/run-make/dump-ice-to-disk/rmake.rs b/tests/run-make/dump-ice-to-disk/rmake.rs index a7a98d31f5046..09a34cdeb5e70 100644 --- a/tests/run-make/dump-ice-to-disk/rmake.rs +++ b/tests/run-make/dump-ice-to-disk/rmake.rs @@ -17,14 +17,14 @@ //! //! # Test history //! -//! - The previous rmake.rs iteration of this test was flakey for unknown reason on `i686-mingw` -//! *specifically*, so assertion failures in this test was made extremely verbose to help -//! diagnose why the ICE messages was different *specifically* on `i686-mingw`. -//! - An attempt is made to re-enable this test on `i686-mingw` (by removing `ignore-windows`). If -//! this test is still flakey, please restore the `ignore-windows` directive. - -//@ ignore-windows -//FIXME(#128911): still flakey on i686-mingw. +//! The previous rmake.rs iteration of this test was flaky for unknown reason on +//! `i686-pc-windows-gnu` *specifically*, so assertion failures in this test was made extremely +//! verbose to help diagnose why the ICE messages was different. It appears that backtraces on +//! `i686-pc-windows-gnu` specifically are quite unpredictable in how many backtrace frames are +//! involved. + +//@ ignore-cross-compile (exercising ICE dump on host) +//@ ignore-i686-pc-windows-gnu (unwind mechanism produces unpredictable backtraces) use std::cell::OnceCell; use std::path::{Path, PathBuf}; diff --git a/tests/run-make/unstable-feature-usage-metrics-incremental/rmake.rs b/tests/run-make/unstable-feature-usage-metrics-incremental/rmake.rs index a7215ca9d50bc..40cc71f69d0d0 100644 --- a/tests/run-make/unstable-feature-usage-metrics-incremental/rmake.rs +++ b/tests/run-make/unstable-feature-usage-metrics-incremental/rmake.rs @@ -7,12 +7,11 @@ //! //! # Test history //! -//! - forked from dump-ice-to-disk test, which has flakeyness issues on i686-mingw, I'm assuming -//! those will be present in this test as well on the same platform +//! - Forked from `dump-ice-to-disk` test, which previously had backtrace unpredictability on +//! `i686-pc-windows-gnu`. -//@ needs-target-std -//@ ignore-windows -//FIXME(#128911): still flakey on i686-mingw. +//@ ignore-cross-compile (exercises metrics incremental on host) +//@ ignore-i686-pc-windows-gnu (unwind mechanism produces unpredictable backtraces) use std::path::{Path, PathBuf}; diff --git a/tests/run-make/unstable-feature-usage-metrics/rmake.rs b/tests/run-make/unstable-feature-usage-metrics/rmake.rs index dbe078bf468a5..9e4b90538ef30 100644 --- a/tests/run-make/unstable-feature-usage-metrics/rmake.rs +++ b/tests/run-make/unstable-feature-usage-metrics/rmake.rs @@ -7,12 +7,10 @@ //! //! # Test history //! -//! - forked from dump-ice-to-disk test, which has flakeyness issues on i686-mingw, I'm assuming -//! those will be present in this test as well on the same platform +//! - Forked from `dump-ice-to-disk` test, where `i686-pc-windows-gnu` has unpredictable backtraces. -//@ needs-target-std -//@ ignore-windows -//FIXME(#128911): still flakey on i686-mingw. +//@ ignore-cross-compile (exercises metrics dump on host) +//@ ignore-i686-pc-windows-gnu (unwind mechanism produces unpredictable backtraces) use std::path::{Path, PathBuf}; From aa8c6f83b6010584b490902c02166b851bdbce3e Mon Sep 17 00:00:00 2001 From: Jieyou Xu Date: Tue, 17 Jun 2025 10:53:11 +0800 Subject: [PATCH 2/2] Don't match on platform-specific directory not found message --- .../unstable-feature-usage-metrics-incremental/rmake.rs | 4 +--- tests/run-make/unstable-feature-usage-metrics/rmake.rs | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/run-make/unstable-feature-usage-metrics-incremental/rmake.rs b/tests/run-make/unstable-feature-usage-metrics-incremental/rmake.rs index 40cc71f69d0d0..862b2bd5300c3 100644 --- a/tests/run-make/unstable-feature-usage-metrics-incremental/rmake.rs +++ b/tests/run-make/unstable-feature-usage-metrics-incremental/rmake.rs @@ -86,9 +86,7 @@ fn test_metrics_errors() { .env("RUST_BACKTRACE", "short") .arg("-Zmetrics-dir=invaliddirectorythatdefinitelydoesntexist") .run_fail() - .assert_stderr_contains( - "error: cannot dump feature usage metrics: No such file or directory", - ) + .assert_stderr_contains("error: cannot dump feature usage metrics") .assert_stdout_not_contains("internal compiler error"); }); } diff --git a/tests/run-make/unstable-feature-usage-metrics/rmake.rs b/tests/run-make/unstable-feature-usage-metrics/rmake.rs index 9e4b90538ef30..f987829741c72 100644 --- a/tests/run-make/unstable-feature-usage-metrics/rmake.rs +++ b/tests/run-make/unstable-feature-usage-metrics/rmake.rs @@ -83,9 +83,7 @@ fn test_metrics_errors() { .env("RUST_BACKTRACE", "short") .arg("-Zmetrics-dir=invaliddirectorythatdefinitelydoesntexist") .run_fail() - .assert_stderr_contains( - "error: cannot dump feature usage metrics: No such file or directory", - ) + .assert_stderr_contains("error: cannot dump feature usage metrics") .assert_stdout_not_contains("internal compiler error"); }); }