This revision was automatically updated to reflect the committed changes. labath marked an inline comment as done. Closed by commit rGba898282bc20: [lldb/test] Make "inline" tests handle multiple statements at the same location (authored by labath).
Changed prior to commit: https://reviews.llvm.org/D79563?vs=262614&id=263175#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79563/new/ https://reviews.llvm.org/D79563 Files: lldb/packages/Python/lldbsuite/test/lldbinline.py lldb/test/API/commands/expression/dollar-in-variable/main.c Index: lldb/test/API/commands/expression/dollar-in-variable/main.c =================================================================== --- lldb/test/API/commands/expression/dollar-in-variable/main.c +++ lldb/test/API/commands/expression/dollar-in-variable/main.c @@ -17,5 +17,6 @@ //%self.expect("expr $foo", substrs=['(int)', ' = 12']) //%self.expect("expr $R0", substrs=['(int)', ' = 13']) //%self.expect("expr int $foo = 123", error=True, substrs=["declaration conflicts"]) - return 0; //%self.expect("expr $0", substrs=['(int)', ' = 14']) + //%self.expect("expr $0", substrs=['(int)', ' = 11']) + return 0; } Index: lldb/packages/Python/lldbsuite/test/lldbinline.py =================================================================== --- lldb/packages/Python/lldbsuite/test/lldbinline.py +++ lldb/packages/Python/lldbsuite/test/lldbinline.py @@ -126,6 +126,13 @@ def execute_user_command(self, __command): exec(__command, globals(), locals()) + def _get_breakpoint_ids(self, thread): + ids = set() + for i in range(0, thread.GetStopReasonDataCount(), 2): + ids.add(thread.GetStopReasonDataAtIndex(i)) + self.assertGreater(len(ids), 0) + return sorted(ids) + def do_test(self): exe = self.getBuildArtifact("a.out") source_files = [f for f in os.listdir(self.getSourceDir()) @@ -145,8 +152,8 @@ hit_breakpoints += 1 thread = lldbutil.get_stopped_thread( process, lldb.eStopReasonBreakpoint) - breakpoint_id = thread.GetStopReasonDataAtIndex(0) - parser.handle_breakpoint(self, breakpoint_id) + for bp_id in self._get_breakpoint_ids(thread): + parser.handle_breakpoint(self, bp_id) process.Continue() self.assertTrue(hit_breakpoints > 0,
Index: lldb/test/API/commands/expression/dollar-in-variable/main.c =================================================================== --- lldb/test/API/commands/expression/dollar-in-variable/main.c +++ lldb/test/API/commands/expression/dollar-in-variable/main.c @@ -17,5 +17,6 @@ //%self.expect("expr $foo", substrs=['(int)', ' = 12']) //%self.expect("expr $R0", substrs=['(int)', ' = 13']) //%self.expect("expr int $foo = 123", error=True, substrs=["declaration conflicts"]) - return 0; //%self.expect("expr $0", substrs=['(int)', ' = 14']) + //%self.expect("expr $0", substrs=['(int)', ' = 11']) + return 0; } Index: lldb/packages/Python/lldbsuite/test/lldbinline.py =================================================================== --- lldb/packages/Python/lldbsuite/test/lldbinline.py +++ lldb/packages/Python/lldbsuite/test/lldbinline.py @@ -126,6 +126,13 @@ def execute_user_command(self, __command): exec(__command, globals(), locals()) + def _get_breakpoint_ids(self, thread): + ids = set() + for i in range(0, thread.GetStopReasonDataCount(), 2): + ids.add(thread.GetStopReasonDataAtIndex(i)) + self.assertGreater(len(ids), 0) + return sorted(ids) + def do_test(self): exe = self.getBuildArtifact("a.out") source_files = [f for f in os.listdir(self.getSourceDir()) @@ -145,8 +152,8 @@ hit_breakpoints += 1 thread = lldbutil.get_stopped_thread( process, lldb.eStopReasonBreakpoint) - breakpoint_id = thread.GetStopReasonDataAtIndex(0) - parser.handle_breakpoint(self, breakpoint_id) + for bp_id in self._get_breakpoint_ids(thread): + parser.handle_breakpoint(self, bp_id) process.Continue() self.assertTrue(hit_breakpoints > 0,
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits