From: Vignesh Raman <vignesh.raman@collabora.com>
To: dri-devel@lists.freedesktop.org
Cc: daniels@collabora.com, helen.fornazier@gmail.com,
airlied@gmail.com, simona.vetter@ffwll.ch, robdclark@gmail.com,
guilherme.gallo@collabora.com, sergi.blanch.torne@collabora.com,
valentine.burley@collabora.com, jani.nikula@linux.intel.com,
dmitry.baryshkov@linaro.org, mripard@kernel.org,
boqun.feng@gmail.com, linux-kernel@vger.kernel.org
Subject: [PATCH v2 3/3] drm/ci: enable lockdep detection
Date: Tue, 11 Feb 2025 20:58:06 +0530 [thread overview]
Message-ID: <20250211152812.54018-4-vignesh.raman@collabora.com> (raw)
In-Reply-To: <20250211152812.54018-1-vignesh.raman@collabora.com>
We have enabled PROVE_LOCKING (which enables LOCKDEP) in drm-ci.
This will output warnings when kernel locking errors are encountered
and will continue executing tests. To detect if lockdep has been
triggered, check the debug_locks value in /proc/lockdep_stats after
the tests have run. When debug_locks is 0, it indicates that lockdep
has detected issues and turned itself off. Check this value, and if
lockdep is detected, exit with an error and configure it as a warning
in GitLab CI.
GitLab CI ignores exit codes other than 1 by default. Pass the correct
exit code with variable FF_USE_NEW_BASH_EVAL_STRATEGY set to true or
exit on failure.
Also update the documentation.
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
---
v2:
- Lockdep failures are reported as pipeline warnings,
and the documentation is updated.
---
Documentation/gpu/automated_testing.rst | 4 ++++
drivers/gpu/drm/ci/igt_runner.sh | 11 +++++++++++
drivers/gpu/drm/ci/test.yml | 19 ++++++++++++++++---
3 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/Documentation/gpu/automated_testing.rst b/Documentation/gpu/automated_testing.rst
index 6d7c6086034d..62aa3ede02a5 100644
--- a/Documentation/gpu/automated_testing.rst
+++ b/Documentation/gpu/automated_testing.rst
@@ -115,6 +115,10 @@ created (eg. https://gitlab.freedesktop.org/janedoe/linux/-/pipelines)
5. The various jobs will be run and when the pipeline is finished, all jobs
should be green unless a regression has been found.
+6. Warnings in the pipeline indicate that lockdep
+(see Documentation/locking/lockdep-design.rst) issues have been detected
+during the tests.
+
How to update test expectations
===============================
diff --git a/drivers/gpu/drm/ci/igt_runner.sh b/drivers/gpu/drm/ci/igt_runner.sh
index 68b042e43b7f..2a0599f12c58 100755
--- a/drivers/gpu/drm/ci/igt_runner.sh
+++ b/drivers/gpu/drm/ci/igt_runner.sh
@@ -85,5 +85,16 @@ deqp-runner junit \
--limit 50 \
--template "See $ARTIFACTS_BASE_URL/results/{{testcase}}.xml"
+# Check if /proc/lockdep_stats exists
+if [ -f /proc/lockdep_stats ]; then
+ # If debug_locks is 0, it indicates lockdep is detected and it turns itself off.
+ debug_locks=$(grep 'debug_locks:' /proc/lockdep_stats | awk '{print $2}')
+ if [ "$debug_locks" -eq 0 ] && [ "$ret" -eq 0 ]; then
+ echo "Warning: LOCKDEP issue detected. Please check dmesg logs for more information."
+ cat /proc/lockdep_stats
+ ret=101
+ fi
+fi
+
cd $oldpath
exit $ret
diff --git a/drivers/gpu/drm/ci/test.yml b/drivers/gpu/drm/ci/test.yml
index 0eab020a33b9..3af735dbf6bd 100644
--- a/drivers/gpu/drm/ci/test.yml
+++ b/drivers/gpu/drm/ci/test.yml
@@ -1,6 +1,8 @@
.lava-test:
extends:
- .container+build-rules
+ variables:
+ FF_USE_NEW_BASH_EVAL_STRATEGY: 'true'
timeout: "1h30m"
rules:
- !reference [.scheduled_pipeline-rules, rules]
@@ -13,6 +15,9 @@
- mv -n install/* artifacts/.
# Override it with our lava-submit.sh script
- ./artifacts/lava-submit.sh
+ allow_failure:
+ exit_codes:
+ - 101
.lava-igt:arm32:
extends:
@@ -88,9 +93,14 @@
- igt:arm64
tags:
- $RUNNER_TAG
+ allow_failure:
+ exit_codes:
+ - 101
.software-driver:
stage: software-driver
+ variables:
+ FF_USE_NEW_BASH_EVAL_STRATEGY: 'true'
timeout: "1h30m"
rules:
- !reference [.scheduled_pipeline-rules, rules]
@@ -108,6 +118,9 @@
- debian/x86_64_test-gl
- testing:x86_64
- igt:x86_64
+ allow_failure:
+ exit_codes:
+ - 101
.msm-sc7180:
extends:
@@ -153,7 +166,7 @@ msm:apq8016:
BM_KERNEL_EXTRA_ARGS: clk_ignore_unused
RUNNER_TAG: google-freedreno-db410c
script:
- - ./install/bare-metal/fastboot.sh
+ - ./install/bare-metal/fastboot.sh || exit $?
msm:apq8096:
extends:
@@ -167,7 +180,7 @@ msm:apq8096:
GPU_VERSION: apq8096
RUNNER_TAG: google-freedreno-db820c
script:
- - ./install/bare-metal/fastboot.sh
+ - ./install/bare-metal/fastboot.sh || exit $?
msm:sdm845:
extends:
@@ -181,7 +194,7 @@ msm:sdm845:
GPU_VERSION: sdm845
RUNNER_TAG: google-freedreno-cheza
script:
- - ./install/bare-metal/cros-servo.sh
+ - ./install/bare-metal/cros-servo.sh || exit $?
msm:sm8350-hdk:
extends:
--
2.43.0
next prev parent reply other threads:[~2025-02-11 15:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-11 15:28 [PATCH v2 0/3] " Vignesh Raman
2025-02-11 15:28 ` [PATCH v2 1/3] drm/ci: refactor software-driver stage jobs Vignesh Raman
2025-02-11 15:28 ` [PATCH v2 2/3] drm/ci: enable CONFIG_DEBUG_WW_MUTEX_SLOWPATH Vignesh Raman
2025-02-11 15:28 ` Vignesh Raman [this message]
2025-02-13 12:43 ` [PATCH v2 3/3] drm/ci: enable lockdep detection Helen Mae Koike Fornazier
2025-02-14 7:52 ` Vignesh Raman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250211152812.54018-4-vignesh.raman@collabora.com \
--to=vignesh.raman@collabora.com \
--cc=airlied@gmail.com \
--cc=boqun.feng@gmail.com \
--cc=daniels@collabora.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=guilherme.gallo@collabora.com \
--cc=helen.fornazier@gmail.com \
--cc=jani.nikula@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=robdclark@gmail.com \
--cc=sergi.blanch.torne@collabora.com \
--cc=simona.vetter@ffwll.ch \
--cc=valentine.burley@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®