Skip to content

Commit fdfd1c1

Browse files
authored
[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 100ms sleep that we poll in a loop should be slow enough.
1 parent baccad7 commit fdfd1c1

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

lldb/test/API/macosx/thread-names/TestInterruptThreadNames.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,9 @@ def test_with_python_api(self):
6565
# check to see if the global has that value, and continue if it does not.
6666
def wait_until_program_setup_complete(self, process, listener):
6767
inferior_set_up = lldb.SBValue()
68-
retry = 5
68+
retry = 50
6969
while retry > 0:
70-
arch = self.getArchitecture()
71-
# when running the testsuite against a remote arm device, it may take
72-
# a little longer for the process to start up. Use a "can't possibly take
73-
# longer than this" value.
74-
if arch == "arm64" or arch == "armv7":
75-
time.sleep(10)
76-
else:
77-
time.sleep(1)
70+
time.sleep(0.1)
7871
process.SendAsyncInterrupt()
7972
self.assertTrue(
8073
self.wait_for_stop(process, listener), "Check that process is paused"

0 commit comments

Comments
 (0)