summaryrefslogtreecommitdiffstats
path: root/tester
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-12-22 09:18:20 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-01-10 13:55:23 +0100
commitf73627e3642f1f8295d3fc2c11fa852d9718e734 (patch)
tree4d5d00c20d0ebea5d45ede396f2358c324d7497c /tester
parentReportsBase: Change raw pointer to unique_ptr (diff)
downloadrtems-tools-f73627e3642f1f8295d3fc2c11fa852d9718e734.tar.bz2
tester/exe: Fix adjust timeouts by the step size
The bug was introduced by cfd5aa41e847752cd98cde65515df7ce45ff9665. The code monitors the test and generates a timeout test failure. There are two layers of timeout, one for output and the other for a test running too long. The test needs to generate some output within the first timeout period and the second timeout detects if the test has run too long. The first timeout detects a target has locked up. The second is for a test looping generating output. With exe type tests the output is buffered in a separate thread.
Diffstat (limited to 'tester')
-rw-r--r--tester/rt/exe.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tester/rt/exe.py b/tester/rt/exe.py
index 626899e..8a36aca 100644
--- a/tester/rt/exe.py
+++ b/tester/rt/exe.py
@@ -116,12 +116,12 @@ class exe(object):
def _monitor(self, timeout):
output_length = self.output_length
step = 0.25
- period = timeout[0] * step
- seconds = timeout[1] * step
+ period = timeout[0] / step
+ seconds = timeout[1] / step
while self.process and period > 0 and seconds > 0:
current_length = self.output_length
if output_length != current_length:
- period = timeout[0] * step
+ period = timeout[0] / step
output_length = current_length
if seconds < step:
seconds = 0