Skip to content

Commit 3f7bf3a

Browse files
committed
Debug
1 parent 4e6b3f0 commit 3f7bf3a

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

bin_tests/tests/crashtracker_bin_test.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,16 +188,21 @@ fn test_crash_tracking_callstack() {
188188
.context("deserializing crashtracker profiling payload to json")
189189
.unwrap();
190190

191+
println!("{:#?}", crash_payload);
191192
// Note: in Release, we do not have the crate and module name prepended to the function name
192193
// Here we compile the crashing app in Debug.
193-
let expected_functions: Vec<&str> = [
194-
"crashing_test_app::unix::fn3",
194+
let expected_functions = vec![
195195
"crashing_test_app::unix::fn2",
196196
"crashing_test_app::unix::fn1",
197197
"crashing_test_app::unix::main",
198198
"crashing_test_app::main",
199-
]
200-
.to_vec();
199+
];
200+
// It seems that on arm/arm64, fn3 is inlined in fn2, so not present.
201+
// Add fn3 only for x86_64 arch
202+
#[cfg(target_arch = "x86_64")]
203+
{
204+
expected_functions.insert(0, "crashing_test_app::unix::fn3");
205+
}
201206

202207
let crashing_callstack = &crash_payload["error"]["stack"]["frames"];
203208
assert!(

0 commit comments

Comments
 (0)