[Lldb-commits] [lldb] [lldb-dap] Report exit status message in lldb-dap, same as lldb cli (PR #89405)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 22 07:58:33 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r 3a4bc11b675c0511319c2843221133e986825b3b...5e270c26adbb1e8febb72fc74d348d4f9619c7bf lldb/test/API/tools/lldb-dap/console/TestDAP_console.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- TestDAP_console.py 2024-04-22 14:41:55.000000 +0000
+++ TestDAP_console.py 2024-04-22 14:58:08.749412 +0000
@@ -7,10 +7,11 @@
import psutil
from collections import deque
from lldbsuite.test import lldbutil
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+
def get_subprocess(process_name):
queue = deque([psutil.Process(os.getpid())])
while queue:
process = queue.popleft()
@@ -125,11 +126,13 @@
breakpoint1_line = line_number(source, "// breakpoint 1")
breakpoint_ids = self.set_source_breakpoints(source, [breakpoint1_line])
self.continue_to_breakpoints(breakpoint_ids)
# Kill lldb-server process.
- process_name = "debugserver" if platform.platform() == "MacOS" else "lldb-server"
+ process_name = (
+ "debugserver" if platform.platform() == "MacOS" else "lldb-server"
+ )
process = get_subprocess(process_name)
process.terminate()
process.wait(timeout=5)
# Get the console output
@@ -137,11 +140,11 @@
# Verify the exit status message is printed.
self.assertIn(
"exited with status = -1 (0xffffffff) debugserver died with signal SIGTERM",
console_output,
- "Exit status does not contain message 'exited with status'"
+ "Exit status does not contain message 'exited with status'",
)
@skipIfWindows
@skipIfRemote
def test_exit_status_message_ok(self):
@@ -155,7 +158,7 @@
# Verify the exit status message is printed.
self.assertIn(
"exited with status = 0 (0x00000000)",
console_output,
- "Exit status does not contain message 'exited with status'"
+ "Exit status does not contain message 'exited with status'",
)
``````````
</details>
https://github.com/llvm/llvm-project/pull/89405
More information about the lldb-commits
mailing list