[Lldb-commits] [lldb] [lldb][test] Increase polling in TestInterruptThreadNames.py (PR #201554)

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 4 04:35:04 PDT 2026


https://github.com/Teemperor created https://github.com/llvm/llvm-project/pull/201554

This test runs for a very long time on my machine (11s per variation), and nearly all of this time is spent on the 10s sleep in this function.

There are two issues here:

1. It uses the (now outdated) logic that arm64 means we have a remote Darwin device. This is no longer true these days as Macs also run on arm64.

2. The polling duration of 1s is still very long, and the test will still spend all its time just waiting for this 1s sleep. A 100ms sleep that we poll in a loop should be slow enough.

>From 5a7a9cf213e6dda05335edf49c45e49507e6ee24 Mon Sep 17 00:00:00 2001
From: Raphael Isemann <rise at apple.com>
Date: Thu, 4 Jun 2026 12:30:36 +0100
Subject: [PATCH] [lldb][test] Increase polling in TestInterruptThreadNames.py

This test runs for a very long time on my machine (11s per variation),
and nearly all of this time is spent on the 10s sleep in this function.

There are two issues here:

1. It uses the (now outdated) logic that arm64 means we have a remote
Darwin device. This is no longer true these days as Macs also run on
arm64.

2. The polling duration of 1s is still very long, and the test will
still spend all its time just waiting for this 1s sleep. A 100ms sleep
that we poll in a loop should be slow enough.
---
 .../macosx/thread-names/TestInterruptThreadNames.py   | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/lldb/test/API/macosx/thread-names/TestInterruptThreadNames.py b/lldb/test/API/macosx/thread-names/TestInterruptThreadNames.py
index 9a3339579de03..e950703e8f282 100644
--- a/lldb/test/API/macosx/thread-names/TestInterruptThreadNames.py
+++ b/lldb/test/API/macosx/thread-names/TestInterruptThreadNames.py
@@ -63,16 +63,9 @@ def test_with_python_api(self):
     # check to see if the global has that value, and continue if it does not.
     def wait_until_program_setup_complete(self, process, listener):
         inferior_set_up = lldb.SBValue()
-        retry = 5
+        retry = 50
         while retry > 0:
-            arch = self.getArchitecture()
-            # when running the testsuite against a remote arm device, it may take
-            # a little longer for the process to start up.  Use a "can't possibly take
-            # longer than this" value.
-            if arch == "arm64" or arch == "armv7":
-                time.sleep(10)
-            else:
-                time.sleep(1)
+            time.sleep(0.1)
             process.SendAsyncInterrupt()
             self.assertTrue(
                 self.wait_for_stop(process, listener), "Check that process is paused"



More information about the lldb-commits mailing list