Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 85f9488

Browse files
committed
fixup! add tests
1 parent 3d5ee12 commit 85f9488

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

lldb/test/API/functionalities/asan/TestMemoryHistory.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ def libsanitizers_asan_tests(self):
9494
)
9595
self.check_traces()
9696

97+
# Make sure we're not stopped in the sanitizer library but instead at the
98+
# point of failure in the user-code.
99+
self.assertEqual(self.frame().GetFunctionName(), "main")
100+
97101
# do the same using SB API
98102
process = self.dbg.GetSelectedTarget().process
99103
val = (
@@ -218,6 +222,10 @@ def compiler_rt_asan_tests(self):
218222

219223
self.check_traces()
220224

225+
# Make sure we're not stopped in the sanitizer library but instead at the
226+
# point of failure in the user-code.
227+
self.assertEqual(self.frame().GetFunctionName(), "main")
228+
221229
# make sure the 'memory history' command still works even when we're
222230
# generating a report now
223231
self.expect(

lldb/test/API/functionalities/asan/TestReportData.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ def asan_tests(self, libsanitizers=False):
6767
lldb.eStopReasonInstrumentation,
6868
)
6969

70+
# Make sure we're not stopped in the sanitizer library but instead at the
71+
# point of failure in the user-code.
72+
self.assertEqual(self.frame().GetFunctionName(), "main")
73+
7074
self.expect(
7175
"bt",
7276
"The backtrace should show the crashing line",

lldb/test/API/functionalities/ubsan/basic/TestUbsanBasic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ def ubsan_tests(self):
5252
substrs=["1 match found"],
5353
)
5454

55-
# We should be stopped in __ubsan_on_report
56-
self.assertIn("__ubsan_on_report", frame.GetFunctionName())
55+
# We should not be stopped in the sanitizer library.
56+
self.assertIn("main", frame.GetFunctionName())
5757

5858
# The stopped thread backtrace should contain either 'align line'
5959
found = False

0 commit comments

Comments
 (0)