Skip to content

Commit 335ab4c

Browse files
committed
use libc value for sigbus
1 parent d878f4a commit 335ab4c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin_tests/tests/crashtracker_bin_test.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,11 @@ fn assert_telemetry_message(crash_telemetry: &[u8], crash_typ: &str) {
270270
assert!(base_expected_tags.is_subset(&tags), "{tags:?}");
271271
assert!(tags.contains("si_code_human_readable:UNKNOWN"), "{tags:?}");
272272
assert!(tags.contains("si_signo_human_readable:SIGBUS"), "{tags:?}");
273-
assert!(tags.contains("si_signo:10"), "{tags:?}");
273+
// SIGBUS can be 7 or 10, depending on the os.
274+
assert!(
275+
tags.contains(format!("si_signo:{}", libc::SIGBUS).as_str()),
276+
"{tags:?}"
277+
);
274278
}
275279
"sigill" => {
276280
assert!(base_expected_tags.is_subset(&tags), "{tags:?}");

0 commit comments

Comments
 (0)