summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break
diff options
context:
space:
mode:
authorKate Stone <katherine.stone@apple.com>2016-09-06 20:57:50 +0000
committerKate Stone <katherine.stone@apple.com>2016-09-06 20:57:50 +0000
commitb9c1b51e45b845debb76d8658edabca70ca56079 (patch)
treedfcb5a13ef2b014202340f47036da383eaee74aa /lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break
parentd5aa73376966339caad04013510626ec2e42c760 (diff)
downloadbcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.tar.gz
bcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.zip
*** This commit represents a complete reformatting of the LLDB source code
*** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py56
1 files changed, 40 insertions, 16 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py b/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py
index d4b1eb32a9a..7f542d442ac 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py
@@ -5,13 +5,14 @@ Test number of threads.
from __future__ import print_function
-
-import os, time
+import os
+import time
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
+
class MultipleBreakpointTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@@ -22,10 +23,18 @@ class MultipleBreakpointTestCase(TestBase):
# Find the line number for our breakpoint.
self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
- @expectedFailureAll(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(oslist=["windows"], bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
+ @expectedFailureAll(
+ 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(
+ oslist=["windows"],
+ bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
def test(self):
"""Test simultaneous breakpoints in multiple threads."""
self.build(dictionary=self.getBuildFlags())
@@ -33,11 +42,16 @@ class MultipleBreakpointTestCase(TestBase):
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
# This should create a breakpoint in the main thread.
- lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.breakpoint, num_expected_locations=1)
+ 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])
+ 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)
@@ -45,8 +59,8 @@ class MultipleBreakpointTestCase(TestBase):
# The stop reason of the thread should be breakpoint.
# The breakpoint may be hit in either thread 2 or thread 3.
self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
- substrs = ['stopped',
- 'stop reason = breakpoint'])
+ substrs=['stopped',
+ 'stop reason = breakpoint'])
# Get the target process
target = self.dbg.GetSelectedTarget()
@@ -56,7 +70,9 @@ class MultipleBreakpointTestCase(TestBase):
num_threads = process.GetNumThreads()
# Make sure we see all three threads
- self.assertTrue(num_threads >= 3, 'Number of expected threads and actual threads do not match.')
+ self.assertTrue(
+ num_threads >= 3,
+ 'Number of expected threads and actual threads do not match.')
# Get the thread objects
thread1 = process.GetThreadAtIndex(0)
@@ -64,9 +80,15 @@ class MultipleBreakpointTestCase(TestBase):
thread3 = process.GetThreadAtIndex(2)
# Make sure both threads are stopped
- self.assertTrue(thread1.IsStopped(), "Primary thread didn't stop during breakpoint")
- self.assertTrue(thread2.IsStopped(), "Secondary thread didn't stop during breakpoint")
- self.assertTrue(thread3.IsStopped(), "Tertiary thread didn't stop during breakpoint")
+ self.assertTrue(
+ thread1.IsStopped(),
+ "Primary thread didn't stop during breakpoint")
+ self.assertTrue(
+ thread2.IsStopped(),
+ "Secondary thread didn't stop during breakpoint")
+ self.assertTrue(
+ thread3.IsStopped(),
+ "Tertiary thread didn't stop during breakpoint")
# Delete the first breakpoint then continue
self.runCmd("breakpoint delete 1")
@@ -75,4 +97,6 @@ class MultipleBreakpointTestCase(TestBase):
self.runCmd("continue")
# At this point, the inferior process should have exited.
- self.assertTrue(process.GetState() == lldb.eStateExited, PROCESS_EXITED)
+ self.assertTrue(
+ process.GetState() == lldb.eStateExited,
+ PROCESS_EXITED)
OpenPOWER on IntegriCloud