aboutsummaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/functionalities/thread/break_after_join
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:50:09 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:50:09 +0000
commitf3fbd1c0586ff6ec7895991e6c28f61a503c36a8 (patch)
tree48d008fd3df8c0e73271a4b18474e0aac6dbfe33 /packages/Python/lldbsuite/test/functionalities/thread/break_after_join
parent2fc5d2d1dfaf623ce4e24cd8590565902f8c557c (diff)
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test/functionalities/thread/break_after_join')
-rw-r--r--packages/Python/lldbsuite/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py9
-rw-r--r--packages/Python/lldbsuite/test/functionalities/thread/break_after_join/main.cpp16
2 files changed, 7 insertions, 18 deletions
diff --git a/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py b/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py
index 43397a122391..8ef0fb0a000d 100644
--- a/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py
+++ b/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py
@@ -8,8 +8,9 @@ from __future__ import print_function
import os, time
import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test import lldbutil
class BreakpointAfterJoinTestCase(TestBase):
@@ -21,9 +22,9 @@ class BreakpointAfterJoinTestCase(TestBase):
# Find the line number for our breakpoint.
self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
- @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
- @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
- @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
+ @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")
def test(self):
"""Test breakpoint handling after a thread join."""
self.build(dictionary=self.getBuildFlags())
diff --git a/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/main.cpp b/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/main.cpp
index a63079524ee2..f9f33fda82bb 100644
--- a/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/main.cpp
+++ b/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/main.cpp
@@ -19,24 +19,12 @@
volatile int g_test = 0;
-// Note that although hogging the CPU while waiting for a variable to change
-// would be terrible in production code, it's great for testing since it
-// avoids a lot of messy context switching to get multiple threads synchronized.
-#define do_nothing()
-
-#define pseudo_barrier_wait(bar) \
- --bar; \
- while (bar > 0) \
- do_nothing();
-
-#define pseudo_barrier_init(bar, count) (bar = count)
-
// A barrier to synchronize all the threads.
-std::atomic_int g_barrier1;
+pseudo_barrier_t g_barrier1;
// A barrier to keep the threads from exiting until after the breakpoint has
// been passed.
-std::atomic_int g_barrier2;
+pseudo_barrier_t g_barrier2;
void *
break_thread_func ()