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