[Lldb-commits] [lldb] 0c16a22 - [lldb/Test] Fix substr order in asan & ubsan tests

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 3 20:58:12 PST 2020


Author: Jonas Devlieghere
Date: 2020-02-03T20:57:57-08:00
New Revision: 0c16a22a2ebd1fc4238b6bd1c6e7d4d72d496b1f

URL: https://github.com/llvm/llvm-project/commit/0c16a22a2ebd1fc4238b6bd1c6e7d4d72d496b1f
DIFF: https://github.com/llvm/llvm-project/commit/0c16a22a2ebd1fc4238b6bd1c6e7d4d72d496b1f.diff

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

Added: 
    

Modified: 
    lldb/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py
    lldb/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py
    lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/TestUbsanBasic.py

Removed: 
    


################################################################################
diff  --git a/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py b/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py
index 4df315127f6b..37c34984f43b 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py
@@ -66,14 +66,13 @@ def asan_tests(self):
         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

diff  --git a/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py b/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py
index 0ca48435e820..70084592cc86 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py
@@ -69,9 +69,10 @@ def asan_tests(self):
                 "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:])

diff  --git a/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/TestUbsanBasic.py b/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/TestUbsanBasic.py
index 76fdb33fd329..424e83934361 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/TestUbsanBasic.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/TestUbsanBasic.py
@@ -70,12 +70,13 @@ def ubsan_tests(self):
             "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:])


        


More information about the lldb-commits mailing list