amccarth created this revision.
amccarth added a reviewer: jasonmolenda.
Herald added a subscriber: sanjoy.

This test was failing on Windows because it expected the breakpoint in the
dynamic library to be resolved before the process is launched.  Since the DLL
isn't loaded until the process is launched this didn't work.

Changing the expectation solves the problem on Windows, but since I'm not
sure how this works on other platforms, I'm afraid this could break it there.
I'm considering whether we should treat 0 as a special value for
`num_expected_locations` that means 0 or more.


https://reviews.llvm.org/D43419

Files:
  
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py


Index: 
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py
===================================================================
--- 
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py
+++ 
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py
@@ -29,8 +29,11 @@
 
         bp_main = lldbutil.run_break_set_by_file_and_line(
             self, 'main.cpp', self.line_main)
+
+        # We don't expect any locations because the dynamic library isn't
+        # loaded until we launch the process.
         bp_foo = lldbutil.run_break_set_by_file_and_line(
-            self, 'foo.cpp', self.line_foo)
+            self, 'foo.cpp', self.line_foo, num_expected_locations=0)
 
         process = target.LaunchSimple(
             None, env, self.get_process_working_directory())


Index: lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py
+++ lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py
@@ -29,8 +29,11 @@
 
         bp_main = lldbutil.run_break_set_by_file_and_line(
             self, 'main.cpp', self.line_main)
+
+        # We don't expect any locations because the dynamic library isn't
+        # loaded until we launch the process.
         bp_foo = lldbutil.run_break_set_by_file_and_line(
-            self, 'foo.cpp', self.line_foo)
+            self, 'foo.cpp', self.line_foo, num_expected_locations=0)
 
         process = target.LaunchSimple(
             None, env, self.get_process_working_directory())
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to