mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Helen Koike <koike@igalia.com>
To: Vignesh Raman <vignesh.raman@collabora.com>,
	dri-devel@lists.freedesktop.org
Cc: daniels@collabora.com, daniel@fooishbar.org,
	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, lumag@kernel.org,
	dmitry.baryshkov@oss.qualcomm.com, quic_abhinavk@quicinc.com,
	mripard@kernel.org, maarten.lankhorst@linux.intel.com,
	tzimmermann@suse.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] drm/ci: Add jobs to validate devicetrees
Date: Wed, 23 Apr 2025 15:56:51 -0300	[thread overview]
Message-ID: <089fbd77-43ec-4ed5-8bcf-168a502c5270@igalia.com> (raw)
In-Reply-To: <20250417030439.737924-2-vignesh.raman@collabora.com>



On 17/04/2025 00:04, Vignesh Raman wrote:
> Add jobs to run dt_binding_check and dtbs_check. If warnings are seen,
> exit with a non-zero error code while configuring them as warning in
> the GitLab CI pipeline.
> 
> Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
> Reviewed-by: Maxime Ripard <mripard@kernel.org>
> Acked-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> 
> v3:
>    - Add dt-binding-check and dtbs-check jobs to the static-checks stage.
> 
> v2:
>    - Use LLVM/Clang instead of GCC to avoid architecture-specific
>      toolchains for cross-compiling.
> 
> ---
>   drivers/gpu/drm/ci/check-devicetrees.yml | 44 ++++++++++++++++++++++++
>   drivers/gpu/drm/ci/dt-binding-check.sh   | 16 +++++++++
>   drivers/gpu/drm/ci/dtbs-check.sh         | 19 ++++++++++
>   drivers/gpu/drm/ci/gitlab-ci.yml         |  2 ++
>   4 files changed, 81 insertions(+)
>   create mode 100644 drivers/gpu/drm/ci/check-devicetrees.yml
>   create mode 100755 drivers/gpu/drm/ci/dt-binding-check.sh
>   create mode 100755 drivers/gpu/drm/ci/dtbs-check.sh
> 
> diff --git a/drivers/gpu/drm/ci/check-devicetrees.yml b/drivers/gpu/drm/ci/check-devicetrees.yml
> new file mode 100644
> index 000000000000..75c9b009da1f
> --- /dev/null
> +++ b/drivers/gpu/drm/ci/check-devicetrees.yml
> @@ -0,0 +1,44 @@
> +.dt-check-base:
> +  stage: static-checks
> +  timeout: "30m"
> +  variables:
> +    FF_USE_NEW_BASH_EVAL_STRATEGY: 'true'
> +    SCHEMA: "display"

Shouldn't we also check for gpu ?

Regards,
Helen

> +  before_script:
> +    - apt-get update -qq
> +    - apt-get install -y --no-install-recommends clang lld llvm python3-pip yamllint
> +    - pip3 install dtschema
> +  script:
> +    - drivers/gpu/drm/ci/${SCRIPT_NAME}
> +  artifacts:
> +    when: on_failure
> +    paths:
> +      - ${ARTIFACT_FILE}
> +  allow_failure:
> +    exit_codes:
> +      - 102
> +
> +dtbs-check:arm32:
> +  extends:
> +    - .build:arm32
> +    - .dt-check-base
> +  variables:
> +    SCRIPT_NAME: "dtbs-check.sh"
> +    ARTIFACT_FILE: "dtbs-check.log"
> +
> +dtbs-check:arm64:
> +  extends:
> +    - .build:arm64
> +    - .dt-check-base
> +  variables:
> +    SCRIPT_NAME: "dtbs-check.sh"
> +    ARTIFACT_FILE: "dtbs-check.log"
> +
> +dt-binding-check:
> +  extends:
> +    - .build
> +    - .use-debian/x86_64_build
> +    - .dt-check-base
> +  variables:
> +    SCRIPT_NAME: "dt-binding-check.sh"
> +    ARTIFACT_FILE: "dt-binding-check.log"
> diff --git a/drivers/gpu/drm/ci/dt-binding-check.sh b/drivers/gpu/drm/ci/dt-binding-check.sh
> new file mode 100755
> index 000000000000..5e9a439c48a4
> --- /dev/null
> +++ b/drivers/gpu/drm/ci/dt-binding-check.sh
> @@ -0,0 +1,16 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: MIT
> +
> +set -euxo pipefail
> +
> +if ! make -j"${FDO_CI_CONCURRENT:-4}" dt_binding_check \
> +        DT_SCHEMA_FILES="${SCHEMA:-}" 2>dt-binding-check.log; then
> +    echo "ERROR: 'make dt_binding_check' failed. Please check dt-binding-check.log for details."
> +    exit 1
> +fi
> +
> +if [[ -s dt-binding-check.log ]]; then
> +    echo "WARNING: dt_binding_check reported warnings. Please check dt-binding-check.log" \
> +         "for details."
> +    exit 102
> +fi
> diff --git a/drivers/gpu/drm/ci/dtbs-check.sh b/drivers/gpu/drm/ci/dtbs-check.sh
> new file mode 100755
> index 000000000000..91212f19fb98
> --- /dev/null
> +++ b/drivers/gpu/drm/ci/dtbs-check.sh
> @@ -0,0 +1,19 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: MIT
> +
> +set -euxo pipefail
> +
> +: "${KERNEL_ARCH:?ERROR: KERNEL_ARCH must be set}"
> +
> +make LLVM=1 ARCH="${KERNEL_ARCH}" defconfig
> +
> +if ! make -j"${FDO_CI_CONCURRENT:-4}" ARCH="${KERNEL_ARCH}" LLVM=1 dtbs_check \
> +        DT_SCHEMA_FILES="${SCHEMA:-}" 2>dtbs-check.log; then
> +    echo "ERROR: 'make dtbs_check' failed. Please check dtbs-check.log for details."
> +    exit 1
> +fi
> +
> +if [[ -s dtbs-check.log ]]; then
> +    echo "WARNING: dtbs_check reported warnings. Please check dtbs-check.log for details."
> +    exit 102
> +fi
> diff --git a/drivers/gpu/drm/ci/gitlab-ci.yml b/drivers/gpu/drm/ci/gitlab-ci.yml
> index 65adcd97e06b..ac2f498cfe5a 100644
> --- a/drivers/gpu/drm/ci/gitlab-ci.yml
> +++ b/drivers/gpu/drm/ci/gitlab-ci.yml
> @@ -108,6 +108,7 @@ include:
>     - drivers/gpu/drm/ci/static-checks.yml
>     - drivers/gpu/drm/ci/build.yml
>     - drivers/gpu/drm/ci/test.yml
> +  - drivers/gpu/drm/ci/check-devicetrees.yml
>     - 'https://gitlab.freedesktop.org/gfx-ci/lab-status/-/raw/main/lab-status.yml'
>   
>   
> @@ -117,6 +118,7 @@ stages:
>     - git-archive
>     - build-for-tests
>     - build-only
> +  - static-checks
>     - code-validation
>     - amdgpu
>     - i915


  reply	other threads:[~2025-04-23 18:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-17  3:04 [PATCH v3 0/2] drm/ci: Add devicetree validation and KUnit tests Vignesh Raman
2025-04-17  3:04 ` [PATCH v3 1/2] drm/ci: Add jobs to validate devicetrees Vignesh Raman
2025-04-23 18:56   ` Helen Koike [this message]
2025-04-24  4:33     ` Vignesh Raman
2025-04-17  3:04 ` [PATCH v3 2/2] drm/ci: Add jobs to run KUnit tests Vignesh Raman
2025-04-23 18:51 ` [PATCH v3 0/2] drm/ci: Add devicetree validation and " Helen Koike
2025-04-24  4:19   ` 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=089fbd77-43ec-4ed5-8bcf-168a502c5270@igalia.com \
    --to=koike@igalia.com \
    --cc=airlied@gmail.com \
    --cc=daniel@fooishbar.org \
    --cc=daniels@collabora.com \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=guilherme.gallo@collabora.com \
    --cc=helen.fornazier@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=sergi.blanch.torne@collabora.com \
    --cc=simona.vetter@ffwll.ch \
    --cc=tzimmermann@suse.de \
    --cc=valentine.burley@collabora.com \
    --cc=vignesh.raman@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®