brintos

brintos / llvm-project-archived public Read only

0
0
Text · 901 B · 646818d Raw
27 lines · python
1"""2Test that step over will let other threads run when necessary3"""4 5import lldb6from lldbsuite.test.decorators import *7from lldbsuite.test.lldbtest import *8from lldbsuite.test import lldbutil9 10 11class StepOverDoesntDeadlockTestCase(TestBase):12    def test_step_over(self):13        """Test that when step over steps over a function it lets other threads run."""14        self.build()15        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(16            self,17            "without running the first thread at least somewhat",18            lldb.SBFileSpec("locking.cpp"),19        )20        # This is just testing that the step over actually completes.21        # If the test fails this step never return, so failure is really22        # signaled by the test timing out.23 24        thread.StepOver()25        state = process.GetState()26        self.assertState(state, lldb.eStateStopped)27