[Lldb-commits] [lldb] [lldb] Fix broken pipe error (PR #127100)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 13 09:58:27 PST 2025
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 a1345eb240c9456ce1c339106f066217eb5e6984...8844cd67967e7a55682f2b0fd06e8bebe63dd604 lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- gdbremote_testcase.py 2025-02-13 16:48:37.000000 +0000
+++ gdbremote_testcase.py 2025-02-13 17:57:55.251695 +0000
@@ -343,19 +343,21 @@
target = self.dbg.CreateTarget(inferior_exe_path)
return target.GetByteOrder()
def is_port_opened(self):
connect_port = self.port
-
- err, retcode, cmd_output = self.run_platform_command(f"netstat -ltn | grep {connect_port} | grep LISTEN")
-
+
+ err, retcode, cmd_output = self.run_platform_command(
+ f"netstat -ltn | grep {connect_port} | grep LISTEN"
+ )
+
self.assertTrue(
err.Success(),
"Failed to get opened tcp sockets: %s, retcode: %d"
% (err.GetCString(), retcode),
)
-
+
if retcode == 0:
return True
else:
return False
@@ -425,11 +427,11 @@
self._server = Server(self.sock, server)
return server
except _ConnectionRefused as serr:
# Ignore, and try again.
pass
-
+
time.sleep(0.5)
connect_attempts += 1
# We should close the server here to be safe.
server.terminate()
``````````
</details>
https://github.com/llvm/llvm-project/pull/127100
More information about the lldb-commits
mailing list