dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/3] drm/ci: Add devicetree validation and KUnit tests
@ 2025-03-27 16:01 Vignesh Raman
  2025-03-27 16:01 ` [PATCH v1 1/3] drm/ci: force use of BFD linker Vignesh Raman
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Vignesh Raman @ 2025-03-27 16:01 UTC (permalink / raw)
  To: dri-devel
  Cc: daniels, helen.fornazier, airlied, simona.vetter, robdclark,
	guilherme.gallo, sergi.blanch.torne, valentine.burley, lumag,
	quic_abhinavk, mripard, maarten.lankhorst, tzimmermann,
	linux-kernel

Add jobs to validate devicetrees and run KUnit tests.

Pipeline link,
https://gitlab.freedesktop.org/vigneshraman/linux/-/pipelines/1390797

Vignesh Raman (3):
  drm/ci: force use of BFD linker
  drm/ci: Add jobs to validate devicetrees
  drm/ci: Add jobs to run KUnit tests

 drivers/gpu/drm/ci/build.sh                | 14 ++------
 drivers/gpu/drm/ci/check-devicetrees.yml   | 38 ++++++++++++++++++++
 drivers/gpu/drm/ci/dt-binding-check.sh     | 18 ++++++++++
 drivers/gpu/drm/ci/dtbs-check.sh           | 41 ++++++++++++++++++++++
 drivers/gpu/drm/ci/gitlab-ci.yml           |  2 ++
 drivers/gpu/drm/ci/kunit.sh                | 34 ++++++++++++++++++
 drivers/gpu/drm/ci/kunit.yml               | 19 ++++++++++
 drivers/gpu/drm/ci/override-ld-with-bfd.sh | 16 +++++++++
 8 files changed, 170 insertions(+), 12 deletions(-)
 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
 create mode 100755 drivers/gpu/drm/ci/kunit.sh
 create mode 100644 drivers/gpu/drm/ci/kunit.yml
 create mode 100755 drivers/gpu/drm/ci/override-ld-with-bfd.sh

-- 
2.47.2


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v1 1/3] drm/ci: force use of BFD linker
  2025-03-27 16:01 [PATCH v1 0/3] drm/ci: Add devicetree validation and KUnit tests Vignesh Raman
@ 2025-03-27 16:01 ` Vignesh Raman
  2025-03-27 16:01 ` [PATCH v1 2/3] drm/ci: Add jobs to validate devicetrees Vignesh Raman
  2025-03-27 16:01 ` [PATCH v1 3/3] drm/ci: Add jobs to run KUnit tests Vignesh Raman
  2 siblings, 0 replies; 13+ messages in thread
From: Vignesh Raman @ 2025-03-27 16:01 UTC (permalink / raw)
  To: dri-devel
  Cc: daniels, helen.fornazier, airlied, simona.vetter, robdclark,
	guilherme.gallo, sergi.blanch.torne, valentine.burley, lumag,
	quic_abhinavk, mripard, maarten.lankhorst, tzimmermann,
	linux-kernel

When using a toolchain with gold as the default linker in Debian, the
kernel build fails:

x86_64-linux-gnu-ld: unknown linker
scripts/Kconfig.include:56: Sorry, this linker is not supported.

So force the use of the BFD linker. This was already part of the build
script but has now been moved to a separate script so that other jobs
(dtbs check, kunit) can use it.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
---
 drivers/gpu/drm/ci/build.sh                | 14 ++------------
 drivers/gpu/drm/ci/override-ld-with-bfd.sh | 16 ++++++++++++++++
 2 files changed, 18 insertions(+), 12 deletions(-)
 create mode 100755 drivers/gpu/drm/ci/override-ld-with-bfd.sh

diff --git a/drivers/gpu/drm/ci/build.sh b/drivers/gpu/drm/ci/build.sh
index 284873e94d8d..3857b732cf16 100644
--- a/drivers/gpu/drm/ci/build.sh
+++ b/drivers/gpu/drm/ci/build.sh
@@ -8,6 +8,8 @@ rm -rf .git/rebase-apply
 
 . .gitlab-ci/container/container_pre_build.sh
 
+. drivers/gpu/drm/ci/override-ld-with-bfd.sh
+
 # libssl-dev was uninstalled because it was considered an ephemeral package
 apt-get update
 apt-get install -y libssl-dev
@@ -47,18 +49,6 @@ fi
 export ARCH=${KERNEL_ARCH}
 export CROSS_COMPILE="${GCC_ARCH}-"
 
-# The kernel doesn't like the gold linker (or the old lld in our debians).
-# Sneak in some override symlinks during kernel build until we can update
-# debian.
-mkdir -p ld-links
-for i in /usr/bin/*-ld /usr/bin/ld; do
-    i=$(basename $i)
-    ln -sf /usr/bin/$i.bfd ld-links/$i
-done
-
-NEWPATH=$(pwd)/ld-links
-export PATH=$NEWPATH:$PATH
-
 git config --global user.email "fdo@example.com"
 git config --global user.name "freedesktop.org CI"
 git config --global pull.rebase true
diff --git a/drivers/gpu/drm/ci/override-ld-with-bfd.sh b/drivers/gpu/drm/ci/override-ld-with-bfd.sh
new file mode 100755
index 000000000000..9728dc39cb19
--- /dev/null
+++ b/drivers/gpu/drm/ci/override-ld-with-bfd.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+# SPDX-License-Identifier: MIT
+
+set -ex
+
+# The kernel doesn't like the gold linker (or the old lld in our debians).
+# Sneak in some override symlinks during kernel build until we can update
+# debian.
+mkdir -p ld-links
+for i in /usr/bin/*-ld /usr/bin/ld; do
+    i=$(basename $i)
+    ln -sf /usr/bin/$i.bfd ld-links/$i
+done
+
+NEWPATH=$(pwd)/ld-links
+export PATH=$NEWPATH:$PATH
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v1 2/3] drm/ci: Add jobs to validate devicetrees
  2025-03-27 16:01 [PATCH v1 0/3] drm/ci: Add devicetree validation and KUnit tests Vignesh Raman
  2025-03-27 16:01 ` [PATCH v1 1/3] drm/ci: force use of BFD linker Vignesh Raman
@ 2025-03-27 16:01 ` Vignesh Raman
  2025-03-30 17:06   ` Dmitry Baryshkov
  2025-03-27 16:01 ` [PATCH v1 3/3] drm/ci: Add jobs to run KUnit tests Vignesh Raman
  2 siblings, 1 reply; 13+ messages in thread
From: Vignesh Raman @ 2025-03-27 16:01 UTC (permalink / raw)
  To: dri-devel
  Cc: daniels, helen.fornazier, airlied, simona.vetter, robdclark,
	guilherme.gallo, sergi.blanch.torne, valentine.burley, lumag,
	quic_abhinavk, mripard, maarten.lankhorst, tzimmermann,
	linux-kernel

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>
---
 drivers/gpu/drm/ci/check-devicetrees.yml | 38 ++++++++++++++++++++++
 drivers/gpu/drm/ci/dt-binding-check.sh   | 18 +++++++++++
 drivers/gpu/drm/ci/dtbs-check.sh         | 41 ++++++++++++++++++++++++
 drivers/gpu/drm/ci/gitlab-ci.yml         |  1 +
 4 files changed, 98 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..5f0c477f7578
--- /dev/null
+++ b/drivers/gpu/drm/ci/check-devicetrees.yml
@@ -0,0 +1,38 @@
+.dt-check-base:
+  timeout: "1h"
+  variables:
+    FF_USE_NEW_BASH_EVAL_STRATEGY: 'true'
+  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..2a72bb89c013
--- /dev/null
+++ b/drivers/gpu/drm/ci/dt-binding-check.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+# SPDX-License-Identifier: MIT
+
+set -euxo pipefail
+
+apt-get update -qq
+apt install -y --no-install-recommends yamllint
+pip3 install dtschema
+
+if ! make -j${FDO_CI_CONCURRENT:-4} dt_binding_check >/dev/null 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..a0129d5a53b0
--- /dev/null
+++ b/drivers/gpu/drm/ci/dtbs-check.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+# SPDX-License-Identifier: MIT
+
+set -euxo pipefail
+
+. drivers/gpu/drm/ci/override-ld-with-bfd.sh
+
+apt-get update -qq
+pip3 install dtschema
+
+case "${KERNEL_ARCH}" in
+    "arm")
+        GCC_ARCH="arm-linux-gnueabihf"
+        ;;
+    "arm64")
+        GCC_ARCH="aarch64-linux-gnu"
+        ;;
+    "x86_64")
+        GCC_ARCH="x86_64-linux-gnu"
+        ;;
+    *)
+        echo "Unsupported architecture: ${KERNEL_ARCH}"
+        exit 1
+        ;;
+esac
+
+export ARCH="${KERNEL_ARCH}"
+export CROSS_COMPILE="${GCC_ARCH}-"
+
+make `basename ${DEFCONFIG}`
+make -j${FDO_CI_CONCURRENT:-4} dtbs
+
+if ! make -j${FDO_CI_CONCURRENT:-4} dtbs_check >/dev/null 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..9e61b49e9960 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'
 
 
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v1 3/3] drm/ci: Add jobs to run KUnit tests
  2025-03-27 16:01 [PATCH v1 0/3] drm/ci: Add devicetree validation and KUnit tests Vignesh Raman
  2025-03-27 16:01 ` [PATCH v1 1/3] drm/ci: force use of BFD linker Vignesh Raman
  2025-03-27 16:01 ` [PATCH v1 2/3] drm/ci: Add jobs to validate devicetrees Vignesh Raman
@ 2025-03-27 16:01 ` Vignesh Raman
  2025-03-28 15:10   ` Maxime Ripard
  2 siblings, 1 reply; 13+ messages in thread
From: Vignesh Raman @ 2025-03-27 16:01 UTC (permalink / raw)
  To: dri-devel
  Cc: daniels, helen.fornazier, airlied, simona.vetter, robdclark,
	guilherme.gallo, sergi.blanch.torne, valentine.burley, lumag,
	quic_abhinavk, mripard, maarten.lankhorst, tzimmermann,
	linux-kernel

Add jobs to run KUnit tests using tools/testing/kunit/kunit.py tool.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
---
 drivers/gpu/drm/ci/gitlab-ci.yml |  1 +
 drivers/gpu/drm/ci/kunit.sh      | 34 ++++++++++++++++++++++++++++++++
 drivers/gpu/drm/ci/kunit.yml     | 19 ++++++++++++++++++
 3 files changed, 54 insertions(+)
 create mode 100755 drivers/gpu/drm/ci/kunit.sh
 create mode 100644 drivers/gpu/drm/ci/kunit.yml

diff --git a/drivers/gpu/drm/ci/gitlab-ci.yml b/drivers/gpu/drm/ci/gitlab-ci.yml
index 9e61b49e9960..90ae57ca86a1 100644
--- a/drivers/gpu/drm/ci/gitlab-ci.yml
+++ b/drivers/gpu/drm/ci/gitlab-ci.yml
@@ -109,6 +109,7 @@ include:
   - drivers/gpu/drm/ci/build.yml
   - drivers/gpu/drm/ci/test.yml
   - drivers/gpu/drm/ci/check-devicetrees.yml
+  - drivers/gpu/drm/ci/kunit.yml
   - 'https://gitlab.freedesktop.org/gfx-ci/lab-status/-/raw/main/lab-status.yml'
 
 
diff --git a/drivers/gpu/drm/ci/kunit.sh b/drivers/gpu/drm/ci/kunit.sh
new file mode 100755
index 000000000000..197b19d05fba
--- /dev/null
+++ b/drivers/gpu/drm/ci/kunit.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+# SPDX-License-Identifier: MIT
+
+set -euxo pipefail
+
+case "${KERNEL_ARCH}" in
+    "arm")
+        QEMU_PKG="qemu-system-arm"
+        GCC_ARCH="arm-linux-gnueabihf"
+        ;;
+    "arm64")
+        QEMU_PKG="qemu-system-aarch64"
+        GCC_ARCH="aarch64-linux-gnu"
+        ;;
+    "x86_64")
+        QEMU_PKG="qemu-system-x86"
+        GCC_ARCH="x86_64-linux-gnu"
+        ;;
+    *)
+        echo "Unsupported architecture: ${KERNEL_ARCH}"
+        exit 1
+        ;;
+esac
+
+export ARCH="${KERNEL_ARCH}"
+export CROSS_COMPILE="${GCC_ARCH}-"
+
+apt-get update -qq && apt-get install -y --no-install-recommends "${QEMU_PKG}"
+
+. drivers/gpu/drm/ci/override-ld-with-bfd.sh
+
+./tools/testing/kunit/kunit.py run \
+  --arch "${ARCH}" \
+  --kunitconfig=drivers/gpu/drm/tests
diff --git a/drivers/gpu/drm/ci/kunit.yml b/drivers/gpu/drm/ci/kunit.yml
new file mode 100644
index 000000000000..95a893b9d641
--- /dev/null
+++ b/drivers/gpu/drm/ci/kunit.yml
@@ -0,0 +1,19 @@
+.kunit-base:
+  timeout: "30m"
+  script:
+    - drivers/gpu/drm/ci/kunit.sh
+
+kunit:arm32:
+  extends:
+    - .build:arm32
+    - .kunit-base
+
+kunit:arm64:
+  extends:
+    - .build:arm64
+    - .kunit-base
+
+kunit:x86_64:
+  extends:
+    - .build:x86_64
+    - .kunit-base
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v1 3/3] drm/ci: Add jobs to run KUnit tests
  2025-03-27 16:01 ` [PATCH v1 3/3] drm/ci: Add jobs to run KUnit tests Vignesh Raman
@ 2025-03-28 15:10   ` Maxime Ripard
  2025-04-01  2:17     ` Vignesh Raman
  0 siblings, 1 reply; 13+ messages in thread
From: Maxime Ripard @ 2025-03-28 15:10 UTC (permalink / raw)
  To: Vignesh Raman
  Cc: dri-devel, daniels, helen.fornazier, airlied, simona.vetter,
	robdclark, guilherme.gallo, sergi.blanch.torne, valentine.burley,
	lumag, quic_abhinavk, maarten.lankhorst, tzimmermann,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2351 bytes --]

On Thu, Mar 27, 2025 at 09:31:12PM +0530, Vignesh Raman wrote:
> Add jobs to run KUnit tests using tools/testing/kunit/kunit.py tool.
> 
> Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
> ---
>  drivers/gpu/drm/ci/gitlab-ci.yml |  1 +
>  drivers/gpu/drm/ci/kunit.sh      | 34 ++++++++++++++++++++++++++++++++
>  drivers/gpu/drm/ci/kunit.yml     | 19 ++++++++++++++++++
>  3 files changed, 54 insertions(+)
>  create mode 100755 drivers/gpu/drm/ci/kunit.sh
>  create mode 100644 drivers/gpu/drm/ci/kunit.yml
> 
> diff --git a/drivers/gpu/drm/ci/gitlab-ci.yml b/drivers/gpu/drm/ci/gitlab-ci.yml
> index 9e61b49e9960..90ae57ca86a1 100644
> --- a/drivers/gpu/drm/ci/gitlab-ci.yml
> +++ b/drivers/gpu/drm/ci/gitlab-ci.yml
> @@ -109,6 +109,7 @@ include:
>    - drivers/gpu/drm/ci/build.yml
>    - drivers/gpu/drm/ci/test.yml
>    - drivers/gpu/drm/ci/check-devicetrees.yml
> +  - drivers/gpu/drm/ci/kunit.yml
>    - 'https://gitlab.freedesktop.org/gfx-ci/lab-status/-/raw/main/lab-status.yml'
>  
>  
> diff --git a/drivers/gpu/drm/ci/kunit.sh b/drivers/gpu/drm/ci/kunit.sh
> new file mode 100755
> index 000000000000..197b19d05fba
> --- /dev/null
> +++ b/drivers/gpu/drm/ci/kunit.sh
> @@ -0,0 +1,34 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: MIT
> +
> +set -euxo pipefail
> +
> +case "${KERNEL_ARCH}" in
> +    "arm")
> +        QEMU_PKG="qemu-system-arm"
> +        GCC_ARCH="arm-linux-gnueabihf"
> +        ;;
> +    "arm64")
> +        QEMU_PKG="qemu-system-aarch64"
> +        GCC_ARCH="aarch64-linux-gnu"
> +        ;;
> +    "x86_64")
> +        QEMU_PKG="qemu-system-x86"
> +        GCC_ARCH="x86_64-linux-gnu"
> +        ;;
> +    *)
> +        echo "Unsupported architecture: ${KERNEL_ARCH}"
> +        exit 1
> +        ;;
> +esac
> +
> +export ARCH="${KERNEL_ARCH}"
> +export CROSS_COMPILE="${GCC_ARCH}-"
> +
> +apt-get update -qq && apt-get install -y --no-install-recommends "${QEMU_PKG}"

Thanks for working on that.

I'm a bit concerned about using making it entirely debian specific here.
Between the call to apt, the gcc triplet and the qemu package name, this
not really a script to run kunit tests, but to run them on Debian :)

We should make it pretty explicit and / or just assume the runner has
the right packages and call kunit directly.

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v1 2/3] drm/ci: Add jobs to validate devicetrees
  2025-03-27 16:01 ` [PATCH v1 2/3] drm/ci: Add jobs to validate devicetrees Vignesh Raman
@ 2025-03-30 17:06   ` Dmitry Baryshkov
  2025-03-31  7:53     ` Maxime Ripard
  2025-04-01  1:56     ` Vignesh Raman
  0 siblings, 2 replies; 13+ messages in thread
From: Dmitry Baryshkov @ 2025-03-30 17:06 UTC (permalink / raw)
  To: Vignesh Raman
  Cc: dri-devel, daniels, helen.fornazier, airlied, simona.vetter,
	robdclark, guilherme.gallo, sergi.blanch.torne, valentine.burley,
	lumag, quic_abhinavk, mripard, maarten.lankhorst, tzimmermann,
	linux-kernel

On Thu, Mar 27, 2025 at 09:31:11PM +0530, 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.

Can it really succeed or is it going to be an always-failing job? The
dt_binding_check generally succeed, dtbs_check generates tons of
warnings. We are trying to make progress there, but it's still very far
from being achevable.

> 
> Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
> ---
>  drivers/gpu/drm/ci/check-devicetrees.yml | 38 ++++++++++++++++++++++
>  drivers/gpu/drm/ci/dt-binding-check.sh   | 18 +++++++++++
>  drivers/gpu/drm/ci/dtbs-check.sh         | 41 ++++++++++++++++++++++++
>  drivers/gpu/drm/ci/gitlab-ci.yml         |  1 +
>  4 files changed, 98 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..5f0c477f7578
> --- /dev/null
> +++ b/drivers/gpu/drm/ci/check-devicetrees.yml
> @@ -0,0 +1,38 @@
> +.dt-check-base:
> +  timeout: "1h"
> +  variables:
> +    FF_USE_NEW_BASH_EVAL_STRATEGY: 'true'
> +  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..2a72bb89c013
> --- /dev/null
> +++ b/drivers/gpu/drm/ci/dt-binding-check.sh
> @@ -0,0 +1,18 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: MIT
> +
> +set -euxo pipefail
> +
> +apt-get update -qq
> +apt install -y --no-install-recommends yamllint
> +pip3 install dtschema
> +
> +if ! make -j${FDO_CI_CONCURRENT:-4} dt_binding_check >/dev/null 2>dt-binding-check.log; then

I'd rather see errors in job output too.

> +    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..a0129d5a53b0
> --- /dev/null
> +++ b/drivers/gpu/drm/ci/dtbs-check.sh
> @@ -0,0 +1,41 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: MIT
> +
> +set -euxo pipefail
> +
> +. drivers/gpu/drm/ci/override-ld-with-bfd.sh
> +
> +apt-get update -qq
> +pip3 install dtschema
> +
> +case "${KERNEL_ARCH}" in
> +    "arm")
> +        GCC_ARCH="arm-linux-gnueabihf"
> +        ;;
> +    "arm64")
> +        GCC_ARCH="aarch64-linux-gnu"
> +        ;;
> +    "x86_64")
> +        GCC_ARCH="x86_64-linux-gnu"
> +        ;;
> +    *)
> +        echo "Unsupported architecture: ${KERNEL_ARCH}"
> +        exit 1
> +        ;;
> +esac
> +
> +export ARCH="${KERNEL_ARCH}"
> +export CROSS_COMPILE="${GCC_ARCH}-"
> +
> +make `basename ${DEFCONFIG}`
> +make -j${FDO_CI_CONCURRENT:-4} dtbs

You don't need to build dtbs separately, dtbs_check includes dtbs.

> +
> +if ! make -j${FDO_CI_CONCURRENT:-4} dtbs_check >/dev/null 2>dtbs-check.log; then

I'd rather see errors in job output too.

> +    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..9e61b49e9960 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'
>  
>  
> -- 
> 2.47.2
> 

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v1 2/3] drm/ci: Add jobs to validate devicetrees
  2025-03-30 17:06   ` Dmitry Baryshkov
@ 2025-03-31  7:53     ` Maxime Ripard
  2025-03-31  7:55       ` Dmitry Baryshkov
  2025-04-01  1:56     ` Vignesh Raman
  1 sibling, 1 reply; 13+ messages in thread
From: Maxime Ripard @ 2025-03-31  7:53 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Vignesh Raman, dri-devel, daniels, helen.fornazier, airlied,
	simona.vetter, robdclark, guilherme.gallo, sergi.blanch.torne,
	valentine.burley, lumag, quic_abhinavk, maarten.lankhorst,
	tzimmermann, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 847 bytes --]

On Sun, Mar 30, 2025 at 08:06:45PM +0300, Dmitry Baryshkov wrote:
> On Thu, Mar 27, 2025 at 09:31:11PM +0530, 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.
> 
> Can it really succeed or is it going to be an always-failing job? The
> dt_binding_check generally succeed, dtbs_check generates tons of
> warnings. We are trying to make progress there, but it's still very far
> from being achevable.

It depends on the platforms I guess. Some are 100% covered and any
warning should be treated as a failure, and some have not started the
effort.

I guess we could solve it with some kind of expectation list, but I do
wonder if it's something *we* should be focusing on :)

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v1 2/3] drm/ci: Add jobs to validate devicetrees
  2025-03-31  7:53     ` Maxime Ripard
@ 2025-03-31  7:55       ` Dmitry Baryshkov
  2025-04-01  2:15         ` Vignesh Raman
  0 siblings, 1 reply; 13+ messages in thread
From: Dmitry Baryshkov @ 2025-03-31  7:55 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Dmitry Baryshkov, Vignesh Raman, dri-devel, daniels,
	helen.fornazier, airlied, simona.vetter, robdclark,
	guilherme.gallo, sergi.blanch.torne, valentine.burley, lumag,
	quic_abhinavk, maarten.lankhorst, tzimmermann, linux-kernel

On Mon, 31 Mar 2025 at 10:53, Maxime Ripard <mripard@kernel.org> wrote:
>
> On Sun, Mar 30, 2025 at 08:06:45PM +0300, Dmitry Baryshkov wrote:
> > On Thu, Mar 27, 2025 at 09:31:11PM +0530, 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.
> >
> > Can it really succeed or is it going to be an always-failing job? The
> > dt_binding_check generally succeed, dtbs_check generates tons of
> > warnings. We are trying to make progress there, but it's still very far
> > from being achevable.
>
> It depends on the platforms I guess. Some are 100% covered and any
> warning should be treated as a failure, and some have not started the
> effort.
>
> I guess we could solve it with some kind of expectation list, but I do
> wonder if it's something *we* should be focusing on :)

I think that we might want to limit this to `make dt_bindings_check
DT_SCHEMA_FILES=display`, checking all GPU / display schema files.

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v1 2/3] drm/ci: Add jobs to validate devicetrees
  2025-03-30 17:06   ` Dmitry Baryshkov
  2025-03-31  7:53     ` Maxime Ripard
@ 2025-04-01  1:56     ` Vignesh Raman
  2025-04-01 15:14       ` Maxime Ripard
  1 sibling, 1 reply; 13+ messages in thread
From: Vignesh Raman @ 2025-04-01  1:56 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: dri-devel, daniels, helen.fornazier, airlied, simona.vetter,
	robdclark, guilherme.gallo, sergi.blanch.torne, valentine.burley,
	lumag, quic_abhinavk, mripard, maarten.lankhorst, tzimmermann,
	linux-kernel

Hi Dmitry,

On 30/03/25 22:36, Dmitry Baryshkov wrote:
> On Thu, Mar 27, 2025 at 09:31:11PM +0530, 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.
> 
> Can it really succeed or is it going to be an always-failing job? The
> dt_binding_check generally succeed, dtbs_check generates tons of
> warnings. We are trying to make progress there, but it's still very far
> from being achevable.

Even though it fails, it will be shown as a warning in the pipeline.
https://gitlab.freedesktop.org/vigneshraman/linux/-/pipelines/1390797

> 
>>
>> Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
>> ---
>>   drivers/gpu/drm/ci/check-devicetrees.yml | 38 ++++++++++++++++++++++
>>   drivers/gpu/drm/ci/dt-binding-check.sh   | 18 +++++++++++
>>   drivers/gpu/drm/ci/dtbs-check.sh         | 41 ++++++++++++++++++++++++
>>   drivers/gpu/drm/ci/gitlab-ci.yml         |  1 +
>>   4 files changed, 98 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..5f0c477f7578
>> --- /dev/null
>> +++ b/drivers/gpu/drm/ci/check-devicetrees.yml
>> @@ -0,0 +1,38 @@
>> +.dt-check-base:
>> +  timeout: "1h"
>> +  variables:
>> +    FF_USE_NEW_BASH_EVAL_STRATEGY: 'true'
>> +  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..2a72bb89c013
>> --- /dev/null
>> +++ b/drivers/gpu/drm/ci/dt-binding-check.sh
>> @@ -0,0 +1,18 @@
>> +#!/bin/bash
>> +# SPDX-License-Identifier: MIT
>> +
>> +set -euxo pipefail
>> +
>> +apt-get update -qq
>> +apt install -y --no-install-recommends yamllint
>> +pip3 install dtschema
>> +
>> +if ! make -j${FDO_CI_CONCURRENT:-4} dt_binding_check >/dev/null 2>dt-binding-check.log; then
> 
> I'd rather see errors in job output too.

Will update it.

> 
>> +    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..a0129d5a53b0
>> --- /dev/null
>> +++ b/drivers/gpu/drm/ci/dtbs-check.sh
>> @@ -0,0 +1,41 @@
>> +#!/bin/bash
>> +# SPDX-License-Identifier: MIT
>> +
>> +set -euxo pipefail
>> +
>> +. drivers/gpu/drm/ci/override-ld-with-bfd.sh
>> +
>> +apt-get update -qq
>> +pip3 install dtschema
>> +
>> +case "${KERNEL_ARCH}" in
>> +    "arm")
>> +        GCC_ARCH="arm-linux-gnueabihf"
>> +        ;;
>> +    "arm64")
>> +        GCC_ARCH="aarch64-linux-gnu"
>> +        ;;
>> +    "x86_64")
>> +        GCC_ARCH="x86_64-linux-gnu"
>> +        ;;
>> +    *)
>> +        echo "Unsupported architecture: ${KERNEL_ARCH}"
>> +        exit 1
>> +        ;;
>> +esac
>> +
>> +export ARCH="${KERNEL_ARCH}"
>> +export CROSS_COMPILE="${GCC_ARCH}-"
>> +
>> +make `basename ${DEFCONFIG}`
>> +make -j${FDO_CI_CONCURRENT:-4} dtbs
> 
> You don't need to build dtbs separately, dtbs_check includes dtbs.

Ack. Will remove this.

> 
>> +
>> +if ! make -j${FDO_CI_CONCURRENT:-4} dtbs_check >/dev/null 2>dtbs-check.log; then
> 
> I'd rather see errors in job output too.

Will update it.

Regards,
Vignesh

> 
>> +    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..9e61b49e9960 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'
>>   
>>   
>> -- 
>> 2.47.2
>>
> 


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v1 2/3] drm/ci: Add jobs to validate devicetrees
  2025-03-31  7:55       ` Dmitry Baryshkov
@ 2025-04-01  2:15         ` Vignesh Raman
  0 siblings, 0 replies; 13+ messages in thread
From: Vignesh Raman @ 2025-04-01  2:15 UTC (permalink / raw)
  To: Dmitry Baryshkov, Maxime Ripard
  Cc: Dmitry Baryshkov, dri-devel, daniels, helen.fornazier, airlied,
	simona.vetter, robdclark, guilherme.gallo, sergi.blanch.torne,
	valentine.burley, lumag, quic_abhinavk, maarten.lankhorst,
	tzimmermann, linux-kernel

Hi Dmitry,

On 31/03/25 13:25, Dmitry Baryshkov wrote:
> On Mon, 31 Mar 2025 at 10:53, Maxime Ripard <mripard@kernel.org> wrote:
>>
>> On Sun, Mar 30, 2025 at 08:06:45PM +0300, Dmitry Baryshkov wrote:
>>> On Thu, Mar 27, 2025 at 09:31:11PM +0530, 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.
>>>
>>> Can it really succeed or is it going to be an always-failing job? The
>>> dt_binding_check generally succeed, dtbs_check generates tons of
>>> warnings. We are trying to make progress there, but it's still very far
>>> from being achevable.
>>
>> It depends on the platforms I guess. Some are 100% covered and any
>> warning should be treated as a failure, and some have not started the
>> effort.
>>
>> I guess we could solve it with some kind of expectation list, but I do
>> wonder if it's something *we* should be focusing on :)
> 
> I think that we might want to limit this to `make dt_bindings_check
> DT_SCHEMA_FILES=display`, checking all GPU / display schema files.
> 

Yes, will test the changes and send v2.

Regards,
Vignesh

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v1 3/3] drm/ci: Add jobs to run KUnit tests
  2025-03-28 15:10   ` Maxime Ripard
@ 2025-04-01  2:17     ` Vignesh Raman
  2025-04-07 12:35       ` Maxime Ripard
  0 siblings, 1 reply; 13+ messages in thread
From: Vignesh Raman @ 2025-04-01  2:17 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: dri-devel, daniels, helen.fornazier, airlied, simona.vetter,
	robdclark, guilherme.gallo, sergi.blanch.torne, valentine.burley,
	lumag, quic_abhinavk, maarten.lankhorst, tzimmermann,
	linux-kernel

Hi Maxime,

On 28/03/25 20:40, Maxime Ripard wrote:
> On Thu, Mar 27, 2025 at 09:31:12PM +0530, Vignesh Raman wrote:
>> Add jobs to run KUnit tests using tools/testing/kunit/kunit.py tool.
>>
>> Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
>> ---
>>   drivers/gpu/drm/ci/gitlab-ci.yml |  1 +
>>   drivers/gpu/drm/ci/kunit.sh      | 34 ++++++++++++++++++++++++++++++++
>>   drivers/gpu/drm/ci/kunit.yml     | 19 ++++++++++++++++++
>>   3 files changed, 54 insertions(+)
>>   create mode 100755 drivers/gpu/drm/ci/kunit.sh
>>   create mode 100644 drivers/gpu/drm/ci/kunit.yml
>>
>> diff --git a/drivers/gpu/drm/ci/gitlab-ci.yml b/drivers/gpu/drm/ci/gitlab-ci.yml
>> index 9e61b49e9960..90ae57ca86a1 100644
>> --- a/drivers/gpu/drm/ci/gitlab-ci.yml
>> +++ b/drivers/gpu/drm/ci/gitlab-ci.yml
>> @@ -109,6 +109,7 @@ include:
>>     - drivers/gpu/drm/ci/build.yml
>>     - drivers/gpu/drm/ci/test.yml
>>     - drivers/gpu/drm/ci/check-devicetrees.yml
>> +  - drivers/gpu/drm/ci/kunit.yml
>>     - 'https://gitlab.freedesktop.org/gfx-ci/lab-status/-/raw/main/lab-status.yml'
>>   
>>   
>> diff --git a/drivers/gpu/drm/ci/kunit.sh b/drivers/gpu/drm/ci/kunit.sh
>> new file mode 100755
>> index 000000000000..197b19d05fba
>> --- /dev/null
>> +++ b/drivers/gpu/drm/ci/kunit.sh
>> @@ -0,0 +1,34 @@
>> +#!/bin/bash
>> +# SPDX-License-Identifier: MIT
>> +
>> +set -euxo pipefail
>> +
>> +case "${KERNEL_ARCH}" in
>> +    "arm")
>> +        QEMU_PKG="qemu-system-arm"
>> +        GCC_ARCH="arm-linux-gnueabihf"
>> +        ;;
>> +    "arm64")
>> +        QEMU_PKG="qemu-system-aarch64"
>> +        GCC_ARCH="aarch64-linux-gnu"
>> +        ;;
>> +    "x86_64")
>> +        QEMU_PKG="qemu-system-x86"
>> +        GCC_ARCH="x86_64-linux-gnu"
>> +        ;;
>> +    *)
>> +        echo "Unsupported architecture: ${KERNEL_ARCH}"
>> +        exit 1
>> +        ;;
>> +esac
>> +
>> +export ARCH="${KERNEL_ARCH}"
>> +export CROSS_COMPILE="${GCC_ARCH}-"
>> +
>> +apt-get update -qq && apt-get install -y --no-install-recommends "${QEMU_PKG}"
> 
> Thanks for working on that.
> 
> I'm a bit concerned about using making it entirely debian specific here.
> Between the call to apt, the gcc triplet and the qemu package name, this
> not really a script to run kunit tests, but to run them on Debian :)
> 
> We should make it pretty explicit and / or just assume the runner has
> the right packages and call kunit directly.

Agree. This script is debian specific. I will move the debian bits to 
yaml job and make the script generic.

Regards,
Vignesh

> 
> Maxime


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v1 2/3] drm/ci: Add jobs to validate devicetrees
  2025-04-01  1:56     ` Vignesh Raman
@ 2025-04-01 15:14       ` Maxime Ripard
  0 siblings, 0 replies; 13+ messages in thread
From: Maxime Ripard @ 2025-04-01 15:14 UTC (permalink / raw)
  To: Vignesh Raman
  Cc: Dmitry Baryshkov, dri-devel, daniels, helen.fornazier, airlied,
	simona.vetter, robdclark, guilherme.gallo, sergi.blanch.torne,
	valentine.burley, lumag, quic_abhinavk, maarten.lankhorst,
	tzimmermann, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 945 bytes --]

On Tue, Apr 01, 2025 at 07:26:44AM +0530, Vignesh Raman wrote:
> Hi Dmitry,
> 
> On 30/03/25 22:36, Dmitry Baryshkov wrote:
> > On Thu, Mar 27, 2025 at 09:31:11PM +0530, 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.
> > 
> > Can it really succeed or is it going to be an always-failing job? The
> > dt_binding_check generally succeed, dtbs_check generates tons of
> > warnings. We are trying to make progress there, but it's still very far
> > from being achevable.
> 
> Even though it fails, it will be shown as a warning in the pipeline.
> https://gitlab.freedesktop.org/vigneshraman/linux/-/pipelines/1390797

I think what Dmitry was pointing out is that a warning that is always
warning is going to be completely ignored, and thus doesn't add any
value.

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v1 3/3] drm/ci: Add jobs to run KUnit tests
  2025-04-01  2:17     ` Vignesh Raman
@ 2025-04-07 12:35       ` Maxime Ripard
  0 siblings, 0 replies; 13+ messages in thread
From: Maxime Ripard @ 2025-04-07 12:35 UTC (permalink / raw)
  To: Vignesh Raman
  Cc: dri-devel, daniels, helen.fornazier, airlied, simona.vetter,
	robdclark, guilherme.gallo, sergi.blanch.torne, valentine.burley,
	lumag, quic_abhinavk, maarten.lankhorst, tzimmermann,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2961 bytes --]

On Tue, Apr 01, 2025 at 07:47:16AM +0530, Vignesh Raman wrote:
> On 28/03/25 20:40, Maxime Ripard wrote:
> > On Thu, Mar 27, 2025 at 09:31:12PM +0530, Vignesh Raman wrote:
> > > Add jobs to run KUnit tests using tools/testing/kunit/kunit.py tool.
> > > 
> > > Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
> > > ---
> > >   drivers/gpu/drm/ci/gitlab-ci.yml |  1 +
> > >   drivers/gpu/drm/ci/kunit.sh      | 34 ++++++++++++++++++++++++++++++++
> > >   drivers/gpu/drm/ci/kunit.yml     | 19 ++++++++++++++++++
> > >   3 files changed, 54 insertions(+)
> > >   create mode 100755 drivers/gpu/drm/ci/kunit.sh
> > >   create mode 100644 drivers/gpu/drm/ci/kunit.yml
> > > 
> > > diff --git a/drivers/gpu/drm/ci/gitlab-ci.yml b/drivers/gpu/drm/ci/gitlab-ci.yml
> > > index 9e61b49e9960..90ae57ca86a1 100644
> > > --- a/drivers/gpu/drm/ci/gitlab-ci.yml
> > > +++ b/drivers/gpu/drm/ci/gitlab-ci.yml
> > > @@ -109,6 +109,7 @@ include:
> > >     - drivers/gpu/drm/ci/build.yml
> > >     - drivers/gpu/drm/ci/test.yml
> > >     - drivers/gpu/drm/ci/check-devicetrees.yml
> > > +  - drivers/gpu/drm/ci/kunit.yml
> > >     - 'https://gitlab.freedesktop.org/gfx-ci/lab-status/-/raw/main/lab-status.yml'
> > > diff --git a/drivers/gpu/drm/ci/kunit.sh b/drivers/gpu/drm/ci/kunit.sh
> > > new file mode 100755
> > > index 000000000000..197b19d05fba
> > > --- /dev/null
> > > +++ b/drivers/gpu/drm/ci/kunit.sh
> > > @@ -0,0 +1,34 @@
> > > +#!/bin/bash
> > > +# SPDX-License-Identifier: MIT
> > > +
> > > +set -euxo pipefail
> > > +
> > > +case "${KERNEL_ARCH}" in
> > > +    "arm")
> > > +        QEMU_PKG="qemu-system-arm"
> > > +        GCC_ARCH="arm-linux-gnueabihf"
> > > +        ;;
> > > +    "arm64")
> > > +        QEMU_PKG="qemu-system-aarch64"
> > > +        GCC_ARCH="aarch64-linux-gnu"
> > > +        ;;
> > > +    "x86_64")
> > > +        QEMU_PKG="qemu-system-x86"
> > > +        GCC_ARCH="x86_64-linux-gnu"
> > > +        ;;
> > > +    *)
> > > +        echo "Unsupported architecture: ${KERNEL_ARCH}"
> > > +        exit 1
> > > +        ;;
> > > +esac
> > > +
> > > +export ARCH="${KERNEL_ARCH}"
> > > +export CROSS_COMPILE="${GCC_ARCH}-"
> > > +
> > > +apt-get update -qq && apt-get install -y --no-install-recommends "${QEMU_PKG}"
> > 
> > Thanks for working on that.
> > 
> > I'm a bit concerned about using making it entirely debian specific here.
> > Between the call to apt, the gcc triplet and the qemu package name, this
> > not really a script to run kunit tests, but to run them on Debian :)
> > 
> > We should make it pretty explicit and / or just assume the runner has
> > the right packages and call kunit directly.
> 
> Agree. This script is debian specific. I will move the debian bits to yaml
> job and make the script generic.

Using LLVM there is probably more convenient, since you don't have to
deal with the triplet at all when cross-compiling.

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-04-07 12:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-27 16:01 [PATCH v1 0/3] drm/ci: Add devicetree validation and KUnit tests Vignesh Raman
2025-03-27 16:01 ` [PATCH v1 1/3] drm/ci: force use of BFD linker Vignesh Raman
2025-03-27 16:01 ` [PATCH v1 2/3] drm/ci: Add jobs to validate devicetrees Vignesh Raman
2025-03-30 17:06   ` Dmitry Baryshkov
2025-03-31  7:53     ` Maxime Ripard
2025-03-31  7:55       ` Dmitry Baryshkov
2025-04-01  2:15         ` Vignesh Raman
2025-04-01  1:56     ` Vignesh Raman
2025-04-01 15:14       ` Maxime Ripard
2025-03-27 16:01 ` [PATCH v1 3/3] drm/ci: Add jobs to run KUnit tests Vignesh Raman
2025-03-28 15:10   ` Maxime Ripard
2025-04-01  2:17     ` Vignesh Raman
2025-04-07 12:35       ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).