Skip to content

Commit 91a0e83

Browse files
committed
[lldb] Make IR interpreter timeout test more loose
This has failed once in a while on our Windows on Arm bot: https://lab.llvm.org/buildbot/#/builders/219/builds/4688 Traceback (most recent call last): File "C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\... self.assertGreaterEqual(duration_sec, 1) AssertionError: 0.9907491207122803 not greater than or equal to 1 We're not here to check that Python/the C++ lib/the OS implemented timers correctly, so accept anything 0.95 or greater.
1 parent f580901 commit 91a0e83

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lldb/test/API/commands/expression/ir-interpreter/TestIRInterpreter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ def test_interpreter_timeout(self):
4444
options.SetTimeoutInMicroSeconds(1000000)
4545
res, duration_sec = self.time_expression(inf_loop, options)
4646
self.assertIn(timeout_error, str(res.GetError()))
47-
self.assertGreaterEqual(duration_sec, 1)
47+
# Anything within 5% of 1s is fine, to account for machine differences.
48+
self.assertGreaterEqual(duration_sec, 0.95)
4849
self.assertLess(duration_sec, 30)
4950

5051
def test_interpreter_interrupt(self):

0 commit comments

Comments
 (0)