[Lldb-commits] [lldb] r282993 - Fix up this test case.

Jim Ingham via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 30 17:49:13 PDT 2016


Author: jingham
Date: Fri Sep 30 19:49:12 2016
New Revision: 282993

URL: http://llvm.org/viewvc/llvm-project?rev=282993&view=rev
Log:
Fix up this test case.

The lldbutil.run_break_set_by_file_and_line has already checked that the number of 
locations was 1, so don't check it again.  And certainly don't check it again by 
grubbing in break list output.

Also, we know the Thread's IsStopped state is wrong, and have a test for that, so 
don't keep testing it in other files where that isn't the primary thing we're testing.

I removed the xfail for Darwin.  If this also passes on other systems, we can remove
the xfails from them as we find that out.

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py?rev=282993&r1=282992&r2=282993&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py Fri Sep 30 19:49:12 2016
@@ -27,9 +27,6 @@ class ExitDuringBreakpointTestCase(TestB
         oslist=["linux"],
         bugnumber="llvm.org/pr15824 thread states not properly maintained")
     @expectedFailureAll(
-        oslist=lldbplatformutil.getDarwinOSTriples(),
-        bugnumber="llvm.org/pr15824 thread states not properly maintained")
-    @expectedFailureAll(
         oslist=["freebsd"],
         bugnumber="llvm.org/pr18190 thread states not properly maintained")
     @expectedFailureAll(
@@ -45,14 +42,6 @@ class ExitDuringBreakpointTestCase(TestB
         lldbutil.run_break_set_by_file_and_line(
             self, "main.cpp", self.breakpoint, num_expected_locations=1)
 
-        # The breakpoint list should show 1 location.
-        self.expect(
-            "breakpoint list -f",
-            "Breakpoint location shown correctly",
-            substrs=[
-                "1: file = 'main.cpp', line = %d, locations = 1" %
-                self.breakpoint])
-
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
 
@@ -77,30 +66,6 @@ class ExitDuringBreakpointTestCase(TestB
             num_threads >= 5,
             'Number of expected threads and actual threads do not match.')
 
-        # Get the thread objects
-        thread1 = process.GetThreadAtIndex(0)
-        thread2 = process.GetThreadAtIndex(1)
-        thread3 = process.GetThreadAtIndex(2)
-        thread4 = process.GetThreadAtIndex(3)
-        thread5 = process.GetThreadAtIndex(4)
-
-        # Make sure all threads are stopped
-        self.assertTrue(
-            thread1.IsStopped(),
-            "Thread 1 didn't stop during breakpoint")
-        self.assertTrue(
-            thread2.IsStopped(),
-            "Thread 2 didn't stop during breakpoint")
-        self.assertTrue(
-            thread3.IsStopped(),
-            "Thread 3 didn't stop during breakpoint")
-        self.assertTrue(
-            thread4.IsStopped(),
-            "Thread 4 didn't stop during breakpoint")
-        self.assertTrue(
-            thread5.IsStopped(),
-            "Thread 5 didn't stop during breakpoint")
-
         # Run to completion
         self.runCmd("continue")
 




More information about the lldb-commits mailing list