Skip to content

[lldb] Add additional logging to wait_for_file_on_target#186915

Open
bulbazord wants to merge 1 commit intollvm:mainfrom
bulbazord:more-failure-logging
Open

[lldb] Add additional logging to wait_for_file_on_target#186915
bulbazord wants to merge 1 commit intollvm:mainfrom
bulbazord:more-failure-logging

Conversation

@bulbazord
Copy link
Member

Occasionally wait_for_file_on_target will time out on the Green Dragon bots and we're not sure why. I'm adding this logging in an attempt to get more clues as to what's happening when it fails.

Occasionally wait_for_file_on_target will time out on the Green Dragon
bots and we're not sure why. I'm adding this logging in an attempt to
get more clues as to what's happening when it fails.
@bulbazord bulbazord requested a review from JDevlieghere as a code owner March 16, 2026 23:29
@llvmbot llvmbot added the lldb label Mar 16, 2026
@llvmbot
Copy link
Member

llvmbot commented Mar 16, 2026

@llvm/pr-subscribers-lldb

Author: Alex Langford (bulbazord)

Changes

Occasionally wait_for_file_on_target will time out on the Green Dragon bots and we're not sure why. I'm adding this logging in an attempt to get more clues as to what's happening when it fails.


Full diff: https://github.com/llvm/llvm-project/pull/186915.diff

1 Files Affected:

  • (modified) lldb/packages/Python/lldbsuite/test/lldbutil.py (+8-1)
diff --git a/lldb/packages/Python/lldbsuite/test/lldbutil.py b/lldb/packages/Python/lldbsuite/test/lldbutil.py
index e3f64fb9782a4..7f7cdde561702 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbutil.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbutil.py
@@ -1687,7 +1687,14 @@ def read_file_from_process_wd(test, name):
 
 def wait_for_file_on_target(testcase, file_path, max_attempts=6):
     for i in range(max_attempts):
-        err, retcode, msg = testcase.run_platform_command("ls %s" % file_path)
+        command = f"ls {file_path}"
+        err, retcode, msg = testcase.run_platform_command(command)
+        if testcase.TraceOn():
+            testcase.trace(f"Ran command: {command}")
+            testcase.trace(f"Retcode: {retcode}")
+            testcase.trace(f"Output: {msg}")
+            testcase.trace(f"Error: {err.description}")
+
         if err.Success() and retcode == 0:
             break
         if i < max_attempts:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants