brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 3c79d83 Raw
37 lines · python
1"""2This is to make sure that the interrupt timer3doesn't influence synchronous user level stepping.4"""5 6import lldb7import lldbsuite.test.lldbutil as lldbutil8from lldbsuite.test.lldbtest import *9 10 11class TestStepVrsInterruptTimeout(TestBase):12    NO_DEBUG_INFO_TESTCASE = True13 14    def test_step_vrs_interrupt(self):15        """This test is to make sure that the interrupt timeout16        doesn't cause use to flub events from a synchronous step."""17        self.build()18        self.main_source_file = lldb.SBFileSpec("main.cpp")19        self.sample_test()20 21    def sample_test(self):22        """You might use the test implementation in several ways, say so here."""23 24        # This function starts a process, "a.out" by default, sets a source25        # breakpoint, runs to it, and returns the thread, process & target.26        # It optionally takes an SBLaunchOption argument if you want to pass27        # arguments or environment variables.28        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(29            self, "Set a breakpoint here", self.main_source_file30        )31        self.dbg.SetAsync(False)32        self.runCmd("settings set target.process.interrupt-timeout 1")33        thread.StepOver()34        self.assertState(35            process.GetState(), lldb.eStateStopped, "Stopped like we should"36        )37