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

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 11 03:10:51 PDT 2026


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

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 200ms sleep that we poll in a loop should be slow enough.

>From bc2f48cf855315b987c7a353273b62a9224cf2be Mon Sep 17 00:00:00 2001
From: Raphael Isemann <rise at apple.com>
Date: Fri, 5 Jun 2026 09:58:21 +0200
Subject: [PATCH] [lldb][test] Increase polling in TestInterruptThreadNames.py
 (#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 200ms 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 9b99aae8214ae..2f143b5c5a669 100644
--- a/lldb/test/API/macosx/thread-names/TestInterruptThreadNames.py
+++ b/lldb/test/API/macosx/thread-names/TestInterruptThreadNames.py
@@ -65,16 +65,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 = 100
         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.2)
             process.SendAsyncInterrupt()
             self.assertTrue(
                 self.wait_for_stop(process, listener), "Check that process is paused"



More information about the lldb-commits mailing list