From 434905b97d961531286d4b49c7ee1969f7cbea0e Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Mon, 16 Dec 2019 17:38:13 -0800 Subject: 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. Differential Revision: https://reviews.llvm.org/D71440 --- .../test/commands/expression/no-deadlock/TestExprDoesntBlock.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/TestExprDoesntBlock.py') 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) -- cgit v1.2.3