summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
diff options
context:
space:
mode:
authorAdrian McCarthy <amccarth@google.com>2015-07-06 17:42:09 +0000
committerAdrian McCarthy <amccarth@google.com>2015-07-06 17:42:09 +0000
commit5cbef0e79fd2b80f533563a934381b01cdc86d9e (patch)
tree6e1293a1ba26fa5270a4852e76aa4708f3af167d /lldb/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
parentf3a493638fffbb8dede86cb50126f5ba24b3b78e (diff)
downloadbcm5719-llvm-5cbef0e79fd2b80f533563a934381b01cdc86d9e.tar.gz
bcm5719-llvm-5cbef0e79fd2b80f533563a934381b01cdc86d9e.zip
Fix step over breakpoint on Windows (which was detected by TestCreateAfterAttach.py).
llvm-svn: 241475
Diffstat (limited to 'lldb/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py')
-rw-r--r--lldb/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py33
1 files changed, 17 insertions, 16 deletions
diff --git a/lldb/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py b/lldb/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
index a3e01312697..fed737e6271 100644
--- a/lldb/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
+++ b/lldb/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
@@ -44,9 +44,9 @@ class CreateAfterAttachTestCase(TestBase):
# Call super's setUp().
TestBase.setUp(self)
# Find the line numbers for our breakpoints.
- self.break_1 = line_number('main.c', '// Set first breakpoint here')
- self.break_2 = line_number('main.c', '// Set second breakpoint here')
- self.break_3 = line_number('main.c', '// Set third breakpoint here')
+ self.break_1 = line_number('main.cpp', '// Set first breakpoint here')
+ self.break_2 = line_number('main.cpp', '// Set second breakpoint here')
+ self.break_3 = line_number('main.cpp', '// Set third breakpoint here')
def create_after_attach(self, use_fork):
"""Test thread creation after process attach."""
@@ -70,13 +70,17 @@ class CreateAfterAttachTestCase(TestBase):
self.assertTrue(process, PROCESS_IS_VALID)
# This should create a breakpoint in the main thread.
- lldbutil.run_break_set_by_file_and_line (self, "main.c", self.break_1, num_expected_locations=1)
+ lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.break_1, num_expected_locations=1)
# This should create a breakpoint in the second child thread.
- lldbutil.run_break_set_by_file_and_line (self, "main.c", self.break_2, num_expected_locations=1)
+ lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.break_2, num_expected_locations=1)
# This should create a breakpoint in the first child thread.
- lldbutil.run_break_set_by_file_and_line (self, "main.c", self.break_3, num_expected_locations=1)
+ lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.break_3, num_expected_locations=1)
+
+ # Note: With std::thread, we cannot rely on particular thread numbers. Using
+ # std::thread may cause the program to spin up a thread pool (and it does on
+ # Windows), so the thread numbers are non-deterministic.
# Run to the first breakpoint
self.runCmd("continue")
@@ -84,23 +88,21 @@ class CreateAfterAttachTestCase(TestBase):
# The stop reason of the thread should be breakpoint.
self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
substrs = ['stopped',
- '* thread #1',
- 'stop reason = breakpoint',
- 'thread #2'])
+ '* thread #',
+ 'main',
+ 'stop reason = breakpoint'])
# Change a variable to escape the loop
self.runCmd("expression main_thread_continue = 1")
# Run to the second breakpoint
self.runCmd("continue")
- self.runCmd("thread select 3")
# The stop reason of the thread should be breakpoint.
self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
substrs = ['stopped',
- 'thread #1',
- 'thread #2',
- '* thread #3',
+ '* thread #',
+ 'thread_2_func',
'stop reason = breakpoint'])
# Change a variable to escape the loop
@@ -108,14 +110,13 @@ class CreateAfterAttachTestCase(TestBase):
# Run to the third breakpoint
self.runCmd("continue")
- self.runCmd("thread select 2")
# The stop reason of the thread should be breakpoint.
# Thread 3 may or may not have already exited.
self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
substrs = ['stopped',
- 'thread #1',
- '* thread #2',
+ '* thread #',
+ 'thread_1_func',
'stop reason = breakpoint'])
# Run to completion
OpenPOWER on IntegriCloud