Change:
Prior to , compiletest would take into account when determining whether a test target can unwind. It did so by calling , which changes the reported panic strategy depending on the flags: After the PR, compiletest calls which always reports the default panic strategy for the target (even if are passed): This causes a problem for us because we run the compiler test suite against a toolchain built with . Compiletest will run tests marked with even though they panic (and thus fail). I see a few options for fixing this issue: Have respect any additional flags passed. Parse specifically for and modify the return value of to take it into account. Add some new configuration flags to compiletest to control panic strategy for the selected target. cc who authored the original PR
This seems like the best solution to me.
WG-prioritization assigning priority (). label -I-prioritize +P-high
Agree with jyn here on the solution. Unfortunately I won't have much time myself in the coming weeks to address this :(

Discussion:
)) .unwrap(); <del> let mut current = None; </del> let mut all_targets = HashSet::new(); let mut all_archs = HashSet::new(); let mut all_oses = HashSet::new();

} all_pointer_widths.insert(format!("{}bit", cfg.pointer_width)); <del> if target == config.target { current = Some(cfg); } </del> all_targets.insert(target.into()); } Self { <del> current: current.expect("current target not found"), </del> <ins> current: Self::get_current_target_config(config), </ins> all_targets, all_archs, all_oses,

all_pointer_widths, } } <ins> fn get_current_target_config(config: &Config) -> TargetCfg { let mut arch = None; let mut os = None; let mut env = None; let mut abi = None; let mut families = Vec::new(); let mut pointer_width = None; let mut endian = None; let mut panic = None; for config in rustc_output(config, &["--print=cfg", "--target", &config.target]).trim().lines() { let (name, value) = config .split_once("="") .map(|(name, value)| { ( name, Some( value .strip_suffix(""") .expect("key-value pair should be properly quoted"), ), ) }) .unwrap_or_else(|| (config, None)); match name { "target_arch" => { arch = Some(value.expect("target_arch should be a key-value pair").to_string()); } "target_os" => { os = Some(value.expect("target_os sould be a key-value pair").to_string()); } "target_env" => { env = Some(value.expect("target_env should be a key-value pair").to_string()); } "target_abi" => { abi = Some(value.expect("target_abi should be a key-value pair").to_string()); } "target_family" => { families .push(value.expect("target_family should be a key-value pair").to_string()); } "target_pointer_width" => { pointer_width = Some( value .expect("target_pointer_width should be a key-value pair") .parse::<u32>() .expect("target_pointer_width should be a valid u32"), ); } "target_endian" => { endian = Some(match value.expect("target_endian should be a key-value pair") { "big" => Endian::Big, "little" => Endian::Little, _ => panic!("target_endian should be either 'big' or 'little'"), }); } "panic" => { panic = Some(match value.expect("panic should be a key-value pair") { "abort" => PanicStrategy::Abort, "unwind" => PanicStrategy::Unwind, _ => panic!("panic should be either 'abort' or 'unwind'"), }); } _ => (), } } TargetCfg { arch: arch.expect("target configuration should specify target_arch"), os: os.expect("target configuration should specify target_os"), env: env.expect("target configuration should specify target_env"), abi: abi.expect("target configuration should specify target_abi"), families, pointer_width: pointer_width .expect("target configuration should specify target_pointer_width"), endian: endian.expect("target configuration should specify target_endian"), panic: panic.expect("target configuration should specify panic"), } } </ins> } #[derive(Clone, Debug, serde::Deserialize)]