[Lldb-commits] [lldb] [lldb][windows] fix always falsy comparison (PR #206179)

Charles Zablit via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 26 13:53:46 PDT 2026


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

This is a follow up to https://github.com/llvm/llvm-project/pull/206107, which introduced a comparison that is always falsy. `os.environ.get` returns a string and `('1' == 1) == False` in Python.

Compare to a string and return a string as a default value.

>From ab6c46dafbfa32583eba914002f211b2e399d994 Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Fri, 26 Jun 2026 21:50:57 +0100
Subject: [PATCH] [lldb][windows] fix always falsy comparison

---
 .../lldbsuite/test/tools/lldb-server/gdbremote_testcase.py      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 b278066e3a671..ede6ea8490951 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,7 +559,7 @@ 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:
+        if os.environ.get("LLDB_LAUNCH_FLAG_USE_PIPES", "0") == "1":
             self.test_sequence.add_log_lines(
                 [
                     "read packet: %s"



More information about the lldb-commits mailing list