diff options
author | Jim Ingham <jingham@apple.com> | 2019-12-16 17:38:13 -0800 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2019-12-16 17:45:21 -0800 |
commit | 434905b97d961531286d4b49c7ee1969f7cbea0e (patch) | |
tree | e56180fd34ddd0d7316f26a5fffd9b4d2005a9c5 /lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/TestExprDoesntBlock.py | |
parent | 53bcd1e1413c878d2d988df80142a430a9abf24a (diff) | |
download | bcm5719-llvm-434905b97d961531286d4b49c7ee1969f7cbea0e.tar.gz bcm5719-llvm-434905b97d961531286d4b49c7ee1969f7cbea0e.zip |
Run all threads when extending a next range over a call.
If you don't do this you end up running arbitrary code with
only one thread allowed to run, which can cause deadlocks.
<rdar://problem/56422478>
Differential Revision: https://reviews.llvm.org/D71440
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/TestExprDoesntBlock.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/TestExprDoesntBlock.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/TestExprDoesntBlock.py b/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/TestExprDoesntBlock.py index 5b5042b63e4..d7d963390b0 100644 --- a/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/TestExprDoesntBlock.py +++ b/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/TestExprDoesntBlock.py @@ -16,9 +16,6 @@ class ExprDoesntDeadlockTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr17946') - @expectedFailureAll( - oslist=["windows"], - bugnumber="Windows doesn't have pthreads, test needs to be ported") @add_test_categories(["basic_process"]) def test_with_run_command(self): """Test that expr will time out and allow other threads to run if it blocks.""" @@ -32,7 +29,7 @@ class ExprDoesntDeadlockTestCase(TestBase): # Now create a breakpoint at source line before call_me_to_get_lock # gets called. - main_file_spec = lldb.SBFileSpec("locking.c") + main_file_spec = lldb.SBFileSpec("locking.cpp") breakpoint = target.BreakpointCreateBySourceRegex( 'Break here', main_file_spec) if self.TraceOn(): @@ -55,6 +52,6 @@ class ExprDoesntDeadlockTestCase(TestBase): frame0 = thread.GetFrameAtIndex(0) - var = frame0.EvaluateExpression("call_me_to_get_lock()") + var = frame0.EvaluateExpression("call_me_to_get_lock(get_int())") self.assertTrue(var.IsValid()) - self.assertTrue(var.GetValueAsSigned(0) == 567) + self.assertEqual(var.GetValueAsSigned(0), 567) |