[PATCH] gitlab: capture filesystem, CPU, memory and kernel info in logs

Daniel P. Berrangé posted 1 patch 1 week, 2 days ago
Failed in applying to current master (apply log)
.gitlab-ci.d/buildtest-template.yml | 12 ++++++++++++
1 file changed, 12 insertions(+)
[PATCH] gitlab: capture filesystem, CPU, memory and kernel info in logs
Posted by Daniel P. Berrangé 1 week, 2 days ago
For tests we have often had wierd failures that are related to the
runner environment. For example, tests that fail only with specific
filesystem setups.

Since we don't control the runners directly, it is important to
capture info about the environment to aid in failure diagnosis.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 .gitlab-ci.d/buildtest-template.yml | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml
index 005058625e..005f49702b 100644
--- a/.gitlab-ci.d/buildtest-template.yml
+++ b/.gitlab-ci.d/buildtest-template.yml
@@ -27,6 +27,10 @@
     - section_start setup "Pre-script setup"
     - JOBS=$(expr $(nproc) + 1)
     - cat /packages.txt
+    - cat /proc/mounts
+    - cat /proc/cpuinfo
+    - cat /proc/meminfo
+    - uname -a
     - section_end setup
   script:
     - export CCACHE_BASEDIR="$(pwd)"
@@ -102,6 +106,10 @@
     # Prevent logs from the build job that run earlier
     # from being duplicated in the test job artifacts
     - rm -f build/meson-logs/*
+    - cat /proc/mounts
+    - cat /proc/cpuinfo
+    - cat /proc/meminfo
+    - uname -a
 
 
 .functional_test_job_template:
@@ -126,6 +134,10 @@
     # Prevent logs from the build job that run earlier
     # from being duplicated in the test job artifacts
     - rm -f build/meson-logs/*
+    - cat /proc/mounts
+    - cat /proc/cpuinfo
+    - cat /proc/meminfo
+    - uname -a
   after_script:
     - cd build
     - du -chs ${CI_PROJECT_DIR}/*-cache
-- 
2.54.0


Re: [PATCH] gitlab: capture filesystem, CPU, memory and kernel info in logs
Posted by Pierrick Bouvier 1 week, 2 days ago
On 5/21/2026 5:36 AM, Daniel P. Berrangé wrote:
> For tests we have often had wierd failures that are related to the
> runner environment. For example, tests that fail only with specific
> filesystem setups.
> 
> Since we don't control the runners directly, it is important to
> capture info about the environment to aid in failure diagnosis.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  .gitlab-ci.d/buildtest-template.yml | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 

Good idea,
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>

Maybe add a ls -al /dev and id -a, to sort out potential right issues to
access devices?

Regards,
Pierrick