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
):
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
)],
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)