Skip to content

Always run mir opt panic=abort tests - #163101

Closed
khyperia wants to merge 1 commit into
rust-lang:mainfrom
khyperia:mir-opt-panic-abort
Closed

khyperia wants to merge 1 commit into
rust-lang:mainfrom
khyperia:mir-opt-panic-abort

Conversation

@khyperia

Copy link
Copy Markdown
Member

tests/mir-opt/pre-codegen/slice_iter.rs -> tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.runtime-optimized.after.panic-abort.mir is untested in CI right now, and is stale in main. This is due to not running a panic=abort target (the similarly-named file that ends with .panic-unwind.mir is tested). There's two ways to fix this:

  • run the mir-opt array of targets always, not just under --bless
  • update CI to run a panic=abort target as self.target

this PR does the first option.

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Sep 21, 2026
@khyperia

Copy link
Copy Markdown
Member Author

doing a draft PR first, without blessing the relevant stale test file, to ensure that CI fails with this update.

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-aarch64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    Finished `dev` profile [unoptimized] target(s) in 0.03s
##[endgroup]

thread 'main' (1026) panicked at src/bootstrap/src/core/build_steps/compile.rs:395:13:
Target "i686-unknown-linux-musl-synthetic-miropt-abort" does not have a "musl-libdir" key
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /rustc/cbae9b4cae2b108f6a3d18cfe6075714bb739463/library/std/src/panicking.rs:679:5
   1: core::panicking::panic_fmt
             at /rustc/cbae9b4cae2b108f6a3d18cfe6075714bb739463/library/core/src/panicking.rs:80:14
   2: bootstrap::core::build_steps::compile::copy_self_contained_objects::{closure#0}
             at /checkout/src/bootstrap/src/core/build_steps/compile.rs:395:13
   3: <core::option::Option<std::path::PathBuf>>::unwrap_or_else::<bootstrap::core::build_steps::compile::copy_self_contained_objects::{closure#0}>
             at /rustc/cbae9b4cae2b108f6a3d18cfe6075714bb739463/library/core/src/option.rs:1065:21
   4: bootstrap::core::build_steps::compile::copy_self_contained_objects
             at /checkout/src/bootstrap/src/core/build_steps/compile.rs:394:50
   5: <bootstrap::core::build_steps::compile::Std>::copy_extra_objects
             at /checkout/src/bootstrap/src/core/build_steps/compile.rs:99:25
   6: <bootstrap::core::build_steps::compile::Std as bootstrap::core::builder::CommandLineStep>::run
             at /checkout/src/bootstrap/src/core/build_steps/compile.rs:245:33
   7: <bootstrap::core::build_steps::compile::Std as bootstrap::core::builder::Step>::run
             at /checkout/src/bootstrap/src/core/builder/mod.rs:134:9
---
  18: <bootstrap::core::builder::Builder>::ensure::<bootstrap::core::build_steps::test::MirOpt>
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1637:36
  19: <bootstrap::core::build_steps::test::MirOpt as bootstrap::core::builder::CommandLineStep>::make_run
             at /checkout/src/bootstrap/src/core/build_steps/test.rs:2188:21
  20: <bootstrap::core::builder::CommandLineStepDescription>::maybe_run
             at /checkout/src/bootstrap/src/core/builder/mod.rs:470:13
  21: bootstrap::core::builder::cli_paths::match_paths_to_steps_and_run
             at /checkout/src/bootstrap/src/core/builder/cli_paths.rs:53:22
  22: <bootstrap::core::builder::Builder>::run_step_descriptions
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1173:9
---
  27: <fn() as core::ops::function::FnOnce<()>>::call_once
             at /rustc/cbae9b4cae2b108f6a3d18cfe6075714bb739463/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Bootstrap has panicked, currently active steps:
test::MirOpt { compiler: Compiler { stage: 2, host: aarch64-unknown-linux-gnu, forced_compiler: false }, target: aarch64-unknown-linux-gnu } at src/bootstrap/src/core/build_steps/test.rs:2188
test::Compiletest { test_compiler: Compiler { stage: 2, host: aarch64-unknown-linux-gnu, forced_compiler: false }, target: i686-unknown-linux-musl-synthetic-miropt-abort(/checkout/obj/build/synthetic-target-specs/i686-unknown-linux-musl-synthetic-miropt-abort.json), mode: mir-opt, suite: "mir-opt", path: "tests/mir-opt", compare_mode: None } at src/bootstrap/src/core/build_steps/test.rs:2193
compile::Std { target: i686-unknown-linux-musl-synthetic-miropt-abort(/checkout/obj/build/synthetic-target-specs/i686-unknown-linux-musl-synthetic-miropt-abort.json), build_compiler: Compiler { stage: 2, host: aarch64-unknown-linux-gnu, forced_compiler: false }, crates: [], force_recompile: false, extra_rust_args: [], is_for_mir_opt_tests: true } at src/bootstrap/src/core/build_steps/test.rs:2357
compile::Std { target: i686-unknown-linux-musl-synthetic-miropt-abort(/checkout/obj/build/synthetic-target-specs/i686-unknown-linux-musl-synthetic-miropt-abort.json), build_compiler: Compiler { stage: 1, host: aarch64-unknown-linux-gnu, forced_compiler: false }, crates: [], force_recompile: false, extra_rust_args: [], is_for_mir_opt_tests: false } at src/bootstrap/src/core/build_steps/compile.rs:221
Build completed unsuccessfully in 0:00:00
  local time: Mon Sep 21 10:13:48 UTC 2026
  network time: Mon, 21 Sep 2026 10:13:48 GMT
##[error]Process completed with exit code 1.
##[group]Run echo "disk usage:"

@Kobzol

Kobzol commented Sep 21, 2026

Copy link
Copy Markdown
Member

You might be interested in #160200 😆 It seems that it's not so easy.

@khyperia

Copy link
Copy Markdown
Member Author

rrrrip yep ok I have stepped into a swarm of bees. I am going to slowly step away from the void, close this, and pretend I saw nothing. y'all got this, right? yes yes? 😅

@khyperia khyperia closed this Sep 21, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 21, 2026
@khyperia
khyperia deleted the mir-opt-panic-abort branch September 22, 2026 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-testsuite Area: The testsuite used to check the correctness of rustc T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants