[Lldb-commits] [lldb] 91a0e83 - [lldb] Make IR interpreter timeout test more loose
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 7 02:42:52 PDT 2023
Author: David Spickett
Date: 2023-08-07T09:42:26Z
New Revision: 91a0e832d42abc2890d4f8871a14003de6a9919e
URL: https://github.com/llvm/llvm-project/commit/91a0e832d42abc2890d4f8871a14003de6a9919e
DIFF: https://github.com/llvm/llvm-project/commit/91a0e832d42abc2890d4f8871a14003de6a9919e.diff
LOG: [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.
Added:
Modified:
lldb/test/API/commands/expression/ir-interpreter/TestIRInterpreter.py
Removed:
################################################################################
diff --git a/lldb/test/API/commands/expression/ir-interpreter/TestIRInterpreter.py b/lldb/test/API/commands/expression/ir-interpreter/TestIRInterpreter.py
index 1b11d8e5ba054b..5f98bb51a49c1b 100644
--- a/lldb/test/API/commands/expression/ir-interpreter/TestIRInterpreter.py
+++ b/lldb/test/API/commands/expression/ir-interpreter/TestIRInterpreter.py
@@ -44,7 +44,8 @@ def test_interpreter_timeout(self):
options.SetTimeoutInMicroSeconds(1000000)
res, duration_sec = self.time_expression(inf_loop, options)
self.assertIn(timeout_error, str(res.GetError()))
- self.assertGreaterEqual(duration_sec, 1)
+ # Anything within 5% of 1s is fine, to account for machine
diff erences.
+ self.assertGreaterEqual(duration_sec, 0.95)
self.assertLess(duration_sec, 30)
def test_interpreter_interrupt(self):
More information about the lldb-commits
mailing list