summaryrefslogtreecommitdiff
path: root/.gitlab-ci/lava/lava_job_submitter.py
diff options
context:
space:
mode:
authorGuilherme Gallo <guilherme.gallo@collabora.com>2022-06-30 17:58:17 -0300
committerMarge Bot <emma+marge@anholt.net>2022-07-07 00:28:53 +0000
commit02cac49721510ee98390bdb8cc0701759e94a7bc (patch)
tree6461610d677893e58b309d085ebb288dd2d2d36f /.gitlab-ci/lava/lava_job_submitter.py
parentaa26a6ab72a0e55beac99637f09047e2264837aa (diff)
downloadmesa-02cac49721510ee98390bdb8cc0701759e94a7bc.tar.gz
mesa-02cac49721510ee98390bdb8cc0701759e94a7bc.tar.bz2
mesa-02cac49721510ee98390bdb8cc0701759e94a7bc.zip
ci/lava: heartbeat: don't consider kernel message logs
Currently, the submitter consider that every new log that comes from the DUT console is a signal that the device is healthy, but maybe that is not the case, since in some kernel hangs/failures, no output is presented except from some kernel messages. This commit bypass the heartbeat when the LogFollower detect a kernel message. Any log line that does follow the kmsg pattern will make the job labeled as healthy again. Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16323>
Diffstat (limited to '.gitlab-ci/lava/lava_job_submitter.py')
-rwxr-xr-x.gitlab-ci/lava/lava_job_submitter.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/.gitlab-ci/lava/lava_job_submitter.py b/.gitlab-ci/lava/lava_job_submitter.py
index 40d1ae2a983..07087e8a985 100755
--- a/.gitlab-ci/lava/lava_job_submitter.py
+++ b/.gitlab-ci/lava/lava_job_submitter.py
@@ -278,8 +278,6 @@ class LAVAJob:
# When there is no new log data, the YAML is empty
if loaded_lines := yaml.load(str(data), Loader=loader(False)):
lines = loaded_lines
- # If we had non-empty log data, we can assure that the device is alive.
- self.heartbeat()
self.last_log_line += len(lines)
return lines
@@ -391,7 +389,9 @@ def fetch_logs(job, max_idle_time, log_follower) -> None:
else:
raise MesaCIParseException
- log_follower.feed(new_log_lines)
+ if log_follower.feed(new_log_lines):
+ # If we had non-empty log data, we can assure that the device is alive.
+ job.heartbeat()
parsed_lines = log_follower.flush()
for line in parsed_lines: