diff options
Diffstat (limited to 'packages/Python/lldbsuite/test/functionalities/thread/exit_during_break')
| -rw-r--r-- | packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py | 11 | ||||
| -rw-r--r-- | packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/main.cpp | 18 |
2 files changed, 9 insertions, 20 deletions
diff --git a/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py b/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py index f999ffe108f3..2c394263d36e 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.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 ExitDuringBreakpointTestCase(TestBase): @@ -21,10 +22,10 @@ class ExitDuringBreakpointTestCase(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 - @expectedFailureWindows("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 thread exit during breakpoint handling.""" self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/main.cpp b/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/main.cpp index 3570637207d2..a032da835ea6 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/main.cpp +++ b/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/main.cpp @@ -19,27 +19,15 @@ 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 except the one that will exit. -std::atomic_int g_barrier1; +pseudo_barrier_t g_barrier1; // A barrier to synchronize all the threads including the one that will exit. -std::atomic_int g_barrier2; +pseudo_barrier_t g_barrier2; // A barrier to keep the first group of threads from exiting until after the // breakpoint has been passed. -std::atomic_int g_barrier3; +pseudo_barrier_t g_barrier3; void * break_thread_func () |
