[lldb/Test] Fix substr order in asan & ubsan tests

This commit is contained in:
Jonas Devlieghere 2020-02-03 20:57:52 -08:00
parent 035eb393f7
commit 0c16a22a2e
3 changed files with 12 additions and 11 deletions

View File

@ -66,14 +66,13 @@ class AsanTestCase(TestBase):
self.expect(
"memory history 'pointer'",
substrs=[
'Memory allocated by Thread',
'a.out`f1',
'main.c:%d' %
self.line_malloc,
'Memory deallocated by Thread',
'a.out`f2',
'main.c:%d' %
self.line_free])
'main.c:%d' % self.line_free,
'Memory allocated by Thread',
'a.out`f1',
'main.c:%d' % self.line_malloc,
])
# do the same using SB API
process = self.dbg.GetSelectedTarget().process

View File

@ -69,9 +69,10 @@ class AsanTestReportDataCase(TestBase):
"access_size",
"access_type",
"address",
"pc",
"description",
"heap-use-after-free"])
"heap-use-after-free",
"pc",
])
output_lines = self.res.GetOutput().split('\n')
json_line = '\n'.join(output_lines[2:])

View File

@ -70,12 +70,13 @@ class UbsanBasicTestCase(TestBase):
"thread info -s",
"The extended stop info should contain the UBSan provided fields",
substrs=[
"instrumentation_class",
"memory_address",
"col",
"description",
"filename",
"instrumentation_class",
"line",
"col"])
"memory_address",
])
output_lines = self.res.GetOutput().split('\n')
json_line = '\n'.join(output_lines[2:])