Commit e17a0eb7 authored by Dylan Baker's avatar Dylan Baker

Revert "framework: Add support for a test timeout"

This reverts commit ab2eb660.

This patch has a bad interaction with the locking in the json writing
library, running concurrently with this patch enabled can cause json
corruption that cannot easily be untangled, and even when it is is the
result is of low trustworthiness.

v2: - Add message explaining why this patch is to be reverted
    - fix framework/status.py docstring that was mangled after the
      revert
Acked-by: Daniel Vetter's avatarDaniel Vetter <daniel@ffwll.ch>
Reviewed-by: Kenneth Graunke's avatarKenneth Gruanke <kenneth@whitecape.org>
Signed-off-by: default avatarDylan Baker <baker.dylan.c@mgmail.com>
parent 05ac4805
......@@ -23,7 +23,6 @@
import errno
import os
import subprocess
import threading
import shlex
import types
import re
......@@ -73,7 +72,6 @@ class ExecTest(Test):
self.command = command
self.split_command = os.path.split(self._command[0])[1]
self.env = {}
self.timeout = None
self.skip_test = self.check_for_skip_scenario(command)
......@@ -124,7 +122,7 @@ class ExecTest(Test):
else:
if env.dmesg:
old_dmesg = read_dmesg()
(out, err, returncode, timeout) = \
(out, err, returncode) = \
self.get_command_result(command, fullenv)
if env.dmesg:
dmesg_diff = get_dmesg_diff(old_dmesg, read_dmesg())
......@@ -183,9 +181,6 @@ class ExecTest(Test):
elif returncode != 0:
results['note'] = 'Returncode was {0}'.format(returncode)
if timeout:
results['result'] = 'timeout'
if env.valgrind:
# If the underlying test failed, simply report
# 'skip' for this valgrind test.
......@@ -210,7 +205,6 @@ class ExecTest(Test):
results['returncode'] = returncode
results['command'] = ' '.join(self.command)
results['dmesg'] = dmesg_diff
results['timeout'] = timeout
else:
results = TestResult()
......@@ -230,29 +224,13 @@ class ExecTest(Test):
def get_command_result(self, command, fullenv):
try:
timeout = False
proc = subprocess.Popen(command,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
env=fullenv,
universal_newlines=True)
output = ['', '']
def thread_fn():
output[0], output[1] = proc.communicate()
thread = threading.Thread(target=thread_fn)
thread.start()
thread.join(self.timeout)
if thread.is_alive():
proc.terminate()
thread.join()
timeout = True
out, err = proc.communicate()
returncode = proc.returncode
out, err = output
except OSError as e:
# Different sets of tests get built under
# different build configurations. If
......@@ -266,7 +244,7 @@ class ExecTest(Test):
returncode = None
else:
raise e
return out, err, returncode, timeout
return out, err, returncode
class PlainExecTest(ExecTest):
......
......@@ -197,7 +197,6 @@ class GLSLParserTest(PlainExecTest):
self.__command = None
self.__filepath = filepath
self.result = None
self.timeout = None
def __get_config(self):
"""Extract the config section from the test file.
......
......@@ -145,7 +145,6 @@ class ShaderTest(PlainExecTest):
self.__gl_api = None
self.env = {}
self.timeout = None
def __report_failure(self, message):
if self.__run_standalone:
......
......@@ -64,7 +64,6 @@ def status_lookup(status):
'crash': Crash,
'dmesg-warn': DmesgWarn,
'dmesg-fail': DmesgFail,
'timeout': Timeout,
'notrun': NotRun}
try:
......@@ -206,11 +205,3 @@ class Crash(Status):
def __init__(self):
pass
class Timeout(Status):
name = 'timeout'
value = 50
def __init__(self):
pass
......@@ -36,7 +36,7 @@ td:first-child > div {
background-color: #c8c838
}
td.skip, td.warn, td.fail, td.pass, td.trap, td.abort, td.crash, td.dmesg-warn, td.dmesg-fail, td.timeout {
td.skip, td.warn, td.fail, td.pass, td.trap, td.abort, td.crash, td.dmesg-warn, td.dmesg-fail {
text-align: right;
}
......@@ -67,9 +67,6 @@ tr:nth-child(even) td.fail { background-color: #e00505; }
tr:nth-child(odd) td.dmesg-fail { background-color: #ff2020; }
tr:nth-child(even) td.dmesg-fail { background-color: #e00505; }
tr:nth-child(odd) td.timeout { background-color: #83bdf6; }
tr:nth-child(even) td.timeout { background-color: #4a9ef2; }
tr:nth-child(odd) td.trap { background-color: #111111; }
tr:nth-child(even) td.trap { background-color: #000000; }
tr:nth-child(odd) td.abort { background-color: #111111; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment