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 mydir = TestBase.compute_mydir(__file__) 14 15 NO_DEBUG_INFO_TESTCASE = True 16 17 def test_step_vrs_interrupt(self): 18 """This test is to make sure that the interrupt timeout 19 doesn't cause use to flub events from a synchronous step.""" 20 self.build() 21 self.main_source_file = lldb.SBFileSpec("main.cpp") 22 self.sample_test() 23 24 def sample_test(self): 25 """You might use the test implementation in several ways, say so here.""" 26 27 # This function starts a process, "a.out" by default, sets a source 28 # breakpoint, runs to it, and returns the thread, process & target. 29 # It optionally takes an SBLaunchOption argument if you want to pass 30 # arguments or environment variables. 31 (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self, 32 "Set a breakpoint here", self.main_source_file) 33 self.dbg.SetAsync(False) 34 self.runCmd("settings set target.process.interrupt-timeout 1") 35 thread.StepOver() 36 self.assertState(process.GetState(), lldb.eStateStopped, "Stopped like we should") 37