summaryrefslogtreecommitdiffstats
path: root/packages/Python/lldbsuite/test/functionalities/thread
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Python/lldbsuite/test/functionalities/thread')
-rw-r--r--packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/main.cpp19
-rw-r--r--packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py4
-rw-r--r--packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py1
-rw-r--r--packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py1
4 files changed, 2 insertions, 23 deletions
diff --git a/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/main.cpp b/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/main.cpp
index 8434458..d8f06e5 100644
--- a/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/main.cpp
+++ b/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/main.cpp
@@ -4,10 +4,6 @@
using std::chrono::microseconds;
-#if defined(__linux__)
-#include <sys/prctl.h>
-#endif
-
volatile int g_thread_2_continuing = 0;
void *
@@ -42,20 +38,7 @@ thread_2_func (void *input)
int main(int argc, char const *argv[])
{
-#if defined(__linux__)
- // Immediately enable any ptracer so that we can allow the stub attach
- // operation to succeed. Some Linux kernels are locked down so that
- // only an ancestor process can be a ptracer of a process. This disables that
- // restriction. Without it, attach-related stub tests will fail.
-#if defined(PR_SET_PTRACER) && defined(PR_SET_PTRACER_ANY)
- int prctl_result;
-
- // For now we execute on best effort basis. If this fails for
- // some reason, so be it.
- prctl_result = prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY, 0, 0, 0);
- (void) prctl_result;
-#endif
-#endif
+ lldb_enable_attach();
// Create a new thread
std::thread thread_1(thread_1_func, nullptr);
diff --git a/packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py b/packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py
index be49a21..768e2fe 100644
--- a/packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py
+++ b/packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py
@@ -33,9 +33,7 @@ class ThreadJumpTestCase(TestBase):
# The stop reason of the thread should be breakpoint 1.
self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT + " 1",
- substrs = ['stopped',
- '* thread #1',
- 'stop reason = breakpoint 1'])
+ substrs=['stopped', 'main.cpp:{}'.format(self.mark3), 'stop reason = breakpoint 1'])
self.do_min_test(self.mark3, self.mark1, "i", "4"); # Try the int path, force it to return 'a'
self.do_min_test(self.mark3, self.mark2, "i", "5"); # Try the int path, force it to return 'b'
diff --git a/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py b/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py
index 623c659..4938ec5 100644
--- a/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py
+++ b/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py
@@ -19,7 +19,6 @@ class ThreadStateTestCase(TestBase):
@expectedFailureDarwin("rdar://15367566")
@expectedFailureFreeBSD('llvm.org/pr15824')
@expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
- @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly
def test_state_after_breakpoint(self):
"""Test thread state after breakpoint."""
self.build(dictionary=self.getBuildFlags(use_cpp11=False))
diff --git a/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py b/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py
index b4a0b7a..68c96a0 100644
--- a/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py
+++ b/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py
@@ -20,7 +20,6 @@ class ThreadSpecificBreakPlusConditionTestCase(TestBase):
@skipIfFreeBSD # test frequently times out or hangs
@expectedFailureFreeBSD('llvm.org/pr18522') # hits break in another thread in testrun
@add_test_categories(['pyapi'])
- @expectedFailureWindows # Thread specific breakpoints cause the inferior to crash.
@expectedFlakeyLinux # this test fails 6/100 dosep runs
def test_python(self):
"""Test that we obey thread conditioned breakpoints."""
OpenPOWER on IntegriCloud