Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / tools / lldb-server / TestGdbRemoteExitCode.py
blob4c454cc01b4bc347db0551fd5f3a3c225c0b3c65
1 # lldb test suite imports
2 from lldbsuite.test.decorators import *
3 from lldbsuite.test.lldbtest import TestBase
5 # gdb-remote-specific imports
6 import lldbgdbserverutils
7 from gdbremote_testcase import GdbRemoteTestCaseBase
10 class TestGdbRemoteExitCode(GdbRemoteTestCaseBase):
11 def _test_inferior_exit(self, retval):
12 self.build()
14 procs = self.prep_debug_monitor_and_inferior(
15 inferior_args=["retval:%d" % retval]
18 self.test_sequence.add_log_lines(
19 ["read packet: $vCont;c#a8", "send packet: $W{0:02x}#00".format(retval)],
20 True,
23 self.expect_gdbremote_sequence()
25 def test_inferior_exit_0(self):
26 self._test_inferior_exit(0)
28 def test_inferior_exit_42(self):
29 self._test_inferior_exit(42)