[Lldb-commits] [lldb] [lldb-dap][test] Do not overwrite failed/error logs. (PR #227857)

Ebuka Ezike via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 1 06:39:18 PDT 2026


https://github.com/da-viper updated https://github.com/llvm/llvm-project/pull/227857

>From 6d1f6113aee708b92baba42821c2a297fa778f05 Mon Sep 17 00:00:00 2001
From: Ebuka Ezike <e_ezike at apple.com>
Date: Wed, 30 Sep 2026 21:23:59 +0100
Subject: [PATCH] [lldb-dap][test] Do not overwrite failed/error logs.

On failure log files name changes to be unique to a test method.
Append testcase and dap logs to log_files so it doesn't get
overwritten by the next test method.
---
 lldb/packages/Python/lldbsuite/test/tools/lldb_dap/testcase.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb_dap/testcase.py b/lldb/packages/Python/lldbsuite/test/tools/lldb_dap/testcase.py
index 86e781a9be9f5..83d782502651d 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb_dap/testcase.py
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb_dap/testcase.py
@@ -52,6 +52,7 @@ def setUpBaseLogging(self):
         self.logger.setLevel(logging.DEBUG)
 
         log_path = f"{self.getLogBasenameForCurrentTest()}-testcase.log"
+        self.log_files.append(log_path)
         handler = logging.FileHandler(log_path, mode="w")
 
         # The Log name gets quite long and becomes noise. use the last log scope.
@@ -145,6 +146,7 @@ def create_debug_adapter(
             count = self._debug_adapter_count
             suffix = f"-{count}" if count else ""
             log_file = f"{self.getLogBasenameForCurrentTest()}-dap{suffix}.log"
+            self.log_files.append(log_file)
 
         self._debug_adapter_count += 1
         cwd = adapter_options.cwd or self.getBuildDir()



More information about the lldb-commits mailing list