https://github.com/charles-zablit created 
https://github.com/llvm/llvm-project/pull/206107

`LLDB_LAUNCH_FLAG_USE_PIPES=1` is used in tests to run lldb without the ConPTY 
on Windows. This reduces the flakyness of tests.

This patch ensures that we read the value of `LLDB_LAUNCH_FLAG_USE_PIPES` when 
setting up gdbremote tests, to make sure they don't use the ConPTY.

This fixes `tools/lldb-server/TestGdbRemote_qThreadStopInfo.py` on 
https://ci-external.swift.org/job/lldb-windows/job/main/.

>From ec1e9644878bcfad9be999c4813685103b0ce8ea Mon Sep 17 00:00:00 2001
From: Charles Zablit <[email protected]>
Date: Fri, 26 Jun 2026 16:10:19 +0100
Subject: [PATCH] [lldb] send 0x0 size packet if LLDB_LAUNCH_FLAG_USE_PIPES is
 set

---
 .../test/tools/lldb-server/gdbremote_testcase.py      | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git 
a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py 
b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
index 3e89555f24ff3..b278066e3a671 100644
--- 
a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
+++ 
b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
@@ -559,6 +559,17 @@ def do_handshake(self):
         server.send_ack()
 
     def add_verified_launch_packets(self, launch_args):
+        if os.environ.get("LLDB_LAUNCH_FLAG_USE_PIPES", 0) == 1:
+            self.test_sequence.add_log_lines(
+                [
+                    "read packet: %s"
+                    % gdbremote_packet_encode_string(
+                        "QSetSTDIOWindowSize:cols=0;rows=0"
+                    ),
+                    "send packet: $OK#00",
+                ],
+                True,
+            )
         self.test_sequence.add_log_lines(
             [
                 "read packet: %s" % build_gdbremote_A_packet(launch_args),

_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to