Skip to content

Commit 1e36a93

Browse files
committed
remove esr from the expected register set (used only for hard-faults)
1 parent 258d533 commit 1e36a93

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

sentry-android-core/src/test/java/io/sentry/android/core/internal/tombstone/TombstoneParserTest.kt

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,41 +14,40 @@ import org.mockito.kotlin.mock
1414
class TombstoneParserTest {
1515
val expectedRegisters =
1616
setOf(
17+
"x0",
18+
"x1",
19+
"x2",
20+
"x3",
21+
"x4",
22+
"x5",
23+
"x6",
24+
"x7",
1725
"x8",
1826
"x9",
19-
"esr",
20-
"lr",
21-
"pst",
2227
"x10",
23-
"x12",
2428
"x11",
25-
"x14",
29+
"x12",
2630
"x13",
27-
"x16",
31+
"x14",
2832
"x15",
29-
"sp",
30-
"x18",
33+
"x16",
3134
"x17",
35+
"x18",
3236
"x19",
33-
"pc",
34-
"x21",
3537
"x20",
36-
"x0",
37-
"x23",
38-
"x1",
38+
"x21",
3939
"x22",
40-
"x2",
41-
"x25",
42-
"x3",
40+
"x23",
4341
"x24",
44-
"x4",
45-
"x27",
46-
"x5",
42+
"x25",
4743
"x26",
48-
"x6",
49-
"x29",
50-
"x7",
44+
"x27",
5145
"x28",
46+
"x29",
47+
"lr",
48+
"sp",
49+
"pc",
50+
"pst",
5251
)
5352

5453
val inAppIncludes = arrayListOf("io.sentry.samples.android")
@@ -538,7 +537,9 @@ class TombstoneParserTest {
538537
}
539538
}
540539

541-
assertNotNull(thread.stacktrace!!.registers)
540+
assert(thread.stacktrace!!.registers!!.keys.containsAll(expectedRegisters)) {
541+
"Thread ${thread.id} is missing registers: ${expectedRegisters - thread.stacktrace!!.registers!!.keys}"
542+
}
542543
}
543544
assert(hasCrashedThread) { "No crashed thread found matching exception threadId" }
544545

0 commit comments

Comments
 (0)