2 Test that apropos env doesn't crash trying to touch the process plugin command
8 from lldbsuite.test.lldbtest import *
9 import lldbsuite.test.lldbutil as lldbutil
12 class AproposWithProcessTestCase(TestBase):
14 mydir = TestBase.compute_mydir(__file__)
15 NO_DEBUG_INFO_TESTCASE = True
18 # Call super's setUp().
20 # Find the line number to break inside main().
21 self.line = line_number('main.cpp', '// break here')
23 def test_apropos_with_process(self):
24 """Test that apropos env doesn't crash trying to touch the process plugin command."""
26 exe = self.getBuildArtifact("a.out")
27 self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
29 # Break in main() after the variables are assigned values.
30 lldbutil.run_break_set_by_file_and_line(
31 self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
33 self.runCmd("run", RUN_SUCCEEDED)
35 # The stop reason of the thread should be breakpoint.
36 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
37 substrs=['stopped', 'stop reason = breakpoint'])
39 # The breakpoint should have a hit count of 1.
40 self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
41 substrs=[' resolved, hit count = 1'])
43 self.runCmd('apropos env')