Skip to content

Commit a146431

Browse files
committed
FIN: disable backtrace printing for panic-runtime/abort* on ARM
1 parent a0ce63b commit a146431

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

src/test/run-pass/panic-runtime/abort-link-to-unwinding-crates.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,17 @@ fn main() {
2727
exit_success_if_unwind::bar(do_panic);
2828
}
2929
}
30-
let s = Command::new(env::args_os().next().unwrap()).arg("foo").status();
30+
31+
let mut cmd = Command::new(env::args_os().next().unwrap());
32+
cmd.arg("foo");
33+
34+
35+
// ARMv6 hanges while printing the backtrace, see #41004
36+
if cfg!(target_arch = "arm") && cfg!(target_env = "gnu") {
37+
cmd.env("RUST_BACKTRACE", "0");
38+
}
39+
40+
let s = cmd.status();
3141
assert!(s.unwrap().code() != Some(0));
3242
}
3343

src/test/run-pass/panic-runtime/abort.rs

+10-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ fn main() {
3535
panic!("try to catch me");
3636
}
3737
}
38-
let s = Command::new(env::args_os().next().unwrap()).arg("foo").status();
38+
39+
let mut cmd = Command::new(env::args_os().next().unwrap());
40+
cmd.arg("foo");
41+
42+
// ARMv6 hanges while printing the backtrace, see #41004
43+
if cfg!(target_arch = "arm") && cfg!(target_env = "gnu") {
44+
cmd.env("RUST_BACKTRACE", "0");
45+
}
46+
47+
let s = cmd.status();
3948
assert!(s.unwrap().code() != Some(0));
4049
}

0 commit comments

Comments
 (0)