Revert "[lldb] Increase timeout on lldbutil.wait_for_file_on_target" (#190004)

Reverts llvm/llvm-project#189471 because it seems like this breaks the
Sanitized bots:
https://github.com/llvm/llvm-project/pull/189471#issuecomment-4171688975
This commit is contained in:
Jonas Devlieghere 2026-04-01 12:27:26 -05:00 committed by GitHub
parent 45b932a2d4
commit 66d1dc48ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1685,18 +1685,23 @@ def read_file_from_process_wd(test, name):
return read_file_on_target(test, path)
def wait_for_file_on_target(testcase, file_path):
import time
MAX_ATTEMPTS = 60
timeout_seconds = 20 if "ASAN_OPTIONS" in os.environ else 2
for i in range(MAX_ATTEMPTS):
def wait_for_file_on_target(testcase, file_path, max_attempts=6):
for i in range(max_attempts):
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:
# Exponential backoff!
import time
time.sleep(timeout_seconds)
time.sleep(pow(2, i) * 0.25)
else:
testcase.fail(
"File %s not found even after %d attempts." % (file_path, max_attempts)