ci/piglit: Use structured tagging for Piglit

Structured tagging (cf. mesa/mesa!33421) captures a checksum of the
thing we think we're building, and verifies this through the chain.

When we run container builds, we check that the tag we've captured in
the CI variables matches the calculated checksum, to make sure the
declared tags are consistent and we always have traceability.

When we run tests, we check the tags again between what was declared in
the CI variables and what we're actually running from the test
container. This makes sure that we're always testing what we think we're
testing.

As a side advantage, the rule inheritance we need to make this work
means that we can start doing more optional downloads via overlays,
instead of pulling a whole container full of stuff we might not ever
use.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34539>
This commit is contained in:
Daniel Stone 2025-04-15 12:37:31 +01:00 committed by Marge Bot
parent e616761fb2
commit 8d08cde667
27 changed files with 113 additions and 13 deletions

View file

@ -108,6 +108,7 @@ VARS=(
PIGLIT_REPLAY_SUBCOMMAND
PIGLIT_RESULTS
PIGLIT_RUNNER_OPTIONS
PIGLIT_TAG
PIGLIT_TESTS
PIGLIT_TRACES_FILE
PIPELINE_ARTIFACTS_BASE

View file

@ -1,2 +1,3 @@
variables:
CONDITIONAL_BUILD_ANGLE_TAG: ab19bccfd3858c539ba8cb8d9b52a003
CONDITIONAL_BUILD_PIGLIT_TAG: e2cb48af623fb6c8b9793679de33d5be

View file

@ -10,6 +10,10 @@ uncollapsed_section_start piglit "Building piglit"
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
# Do a very early check to make sure the tag is correct without the need of
# setting up the environment variables locally
ci_tag_build_time_check "PIGLIT_TAG"
REV="0ecdebb0f5927728ddeeb851639a559b0f7d6590"
git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit

View file

@ -78,17 +78,29 @@
# should make CI_BUILD_COMPONENTS="angle piglit"
CI_BUILD_COMPONENTS: "angle"
.container-builds-piglit:
variables:
PIGLIT_TAG: "${CONDITIONAL_BUILD_PIGLIT_TAG}"
.container-builds-x86_64:
extends:
- .container-builds-angle
- .container-builds-piglit
variables:
CI_BUILD_COMPONENTS: "angle"
CI_BUILD_COMPONENTS: "angle piglit"
.container-builds-arm32:
extends:
- .container-builds-piglit
variables:
CI_BUILD_COMPONENTS: "piglit"
.container-builds-arm64:
extends:
- .container-builds-angle
- .container-builds-piglit
variables:
CI_BUILD_COMPONENTS: "angle"
CI_BUILD_COMPONENTS: "angle piglit"
.use-base-image:
extends:
@ -405,7 +417,9 @@ debian/arm64_test-base:
# Debian based x86_64 test image for GL
debian/x86_64_test-gl:
extends: .use-debian/x86_64_test-base
extends:
- .use-debian/x86_64_test-base
- .container-builds-x86_64
variables:
MESA_IMAGE_TAG: &debian-x86_64_test-gl ${DEBIAN_TEST_GL_TAG}
@ -423,7 +437,9 @@ debian/x86_64_test-gl:
# Debian based x86_64 test image for VK
debian/x86_64_test-vk:
extends: .use-debian/x86_64_test-base
extends:
- .use-debian/x86_64_test-base
- .container-builds-x86_64
variables:
MESA_IMAGE_TAG: &debian-x86_64_test-vk ${DEBIAN_TEST_VK_TAG}
@ -484,7 +500,9 @@ debian/x86_64_pyutils:
debian/arm32_test-gl:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends: .use-debian/arm32_test-base
extends:
- .use-debian/arm32_test-base
- .container-builds-arm32
variables:
MESA_IMAGE_TAG: &debian-arm32_test-gl ${DEBIAN_TEST_GL_TAG}
@ -506,7 +524,9 @@ debian/arm32_test-vk:
- when: never # There are currently no arm32 VK jobs
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends: .use-debian/arm32_test-base
extends:
- .use-debian/arm32_test-base
- .container-builds-arm32
variables:
MESA_IMAGE_TAG: &debian-arm32_test-vk ${DEBIAN_TEST_VK_TAG}
@ -548,7 +568,9 @@ debian/arm64_test-gl:
debian/arm64_test-vk:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends: .use-debian/arm64_test-base
extends:
- .use-debian/arm64_test-base
- .container-builds-arm64
variables:
MESA_IMAGE_TAG: &debian-arm64_test-vk ${DEBIAN_TEST_VK_TAG}

View file

@ -31,6 +31,16 @@ if [ -n "$ANGLE_TAG" ]; then
export LD_LIBRARY_PATH=/angle:$LD_LIBRARY_PATH
fi
if [ -n "$PIGLIT_TAG" ]; then
# Are we using the right Piglit version?
ci_tag_test_time_check "PIGLIT_TAG"
elif [ -d "/piglit" ]; then
# The job does not inherit from .test-piglit, so we move it out of the way.
# This makes sure that we can both do the right version checks when needed,
# and also optimise our dependencies so we don't pull unneeded stuff.
mv /piglit /piglit.unused
fi
# Ensure Mesa Shader Cache resides on tmpfs.
SHADER_CACHE_HOME=${XDG_CACHE_HOME:-${HOME}/.cache}
SHADER_CACHE_DIR=${MESA_SHADER_CACHE_DIR:-${SHADER_CACHE_HOME}/mesa_shader_cache}

View file

@ -23,10 +23,10 @@ variables:
DEBIAN_BUILD_TAG: "20250324-android"
DEBIAN_TEST_ANDROID_TAG: "20250415-anglit"
DEBIAN_TEST_GL_TAG: "20250415-anglit"
DEBIAN_TEST_VK_TAG: "20250416-vkvideo"
KERNEL_ROOTFS_TAG: "20250415-anglit"
DEBIAN_TEST_ANDROID_TAG: "20250416-pigtag"
DEBIAN_TEST_GL_TAG: "20250416-pigtag"
DEBIAN_TEST_VK_TAG: "20250416-pigtag"
KERNEL_ROOTFS_TAG: "20250416-pigtag"
DEBIAN_PYUTILS_TAG: "20250321-s3cp-fix5"

View file

@ -140,6 +140,8 @@ variables:
- .lava-test:x86_64
.lava-piglit-traces:
extends:
- .test-piglit
variables:
HWCI_TEST_SCRIPT: "/install/piglit/piglit-traces.sh"
# until we overcome Infrastructure issues, give traces extra 5 min before timeout

View file

@ -12,6 +12,9 @@ set -ex
# Our rootfs may not have "less", which apitrace uses during apitrace dump
export PAGER=cat # FIXME: export everywhere
# Check we're using the version of Piglit we think we are
ci_tag_test_time_check "PIGLIT_TAG"
INSTALL=$(realpath -s "$PWD"/install)
export PIGLIT_REPLAY_DESCRIPTION_FILE="$INSTALL/$PIGLIT_TRACES_FILE"

View file

@ -181,6 +181,10 @@ yaml-toml-shell-py-test:
variables:
ANGLE_TAG: ${CONDITIONAL_BUILD_ANGLE_TAG}
.test-piglit:
variables:
PIGLIT_TAG: ${CONDITIONAL_BUILD_PIGLIT_TAG}
.b2c-vkd3d-proton-test:
variables:
HWCI_TEST_SCRIPT: install/vkd3d-runner.sh
@ -195,6 +199,8 @@ yaml-toml-shell-py-test:
- results/
exclude:
- results/*.shader_cache
extends:
- .test-piglit
variables:
# until we overcome Infrastructure issues, give traces extra 5 min before timeout
DEVICE_HANGING_TIMEOUT_SEC: 600

View file

@ -34,6 +34,7 @@ radeonsi-stoney-glcts-piglit:
extends:
- .lava-test-deqp:x86_64
- .radeonsi-stoney-test:x86_64
- .test-piglit
parallel: 11
variables:
DEQP_SUITE: radeonsi-stoney
@ -109,6 +110,7 @@ radeonsi-raven-piglit:
extends:
- .lava-test-deqp:x86_64
- .radeonsi-raven-test:x86_64
- .test-piglit
- .lava-lenovo-TPad-C13-Yoga-zork:x86_64
parallel: 2
variables:
@ -120,6 +122,7 @@ radeonsi-raven-cdna-lower-image-piglit:
extends:
- .lava-test-deqp:x86_64
- .radeonsi-raven-test:x86_64
- .test-piglit
- .lava-lenovo-TPad-C13-Yoga-zork:x86_64
variables:
DEQP_SUITE: radeonsi-raven-cdna
@ -272,6 +275,7 @@ radv-vangogh-vkcts:
extends:
- .b2c-x86_64-test-gl
- .b2c-deqp-test
- .test-piglit
- .vangogh-test-valve
variables:
GPU_VERSION: radeonsi-vangogh

View file

@ -5,6 +5,7 @@ vc4-rpi3-gl:arm64:
extends:
- .igalia-bcm2837-rpi-3-b
- .broadcom-test:arm64
- .test-piglit
- .vc4-rules
parallel: 4
variables:
@ -59,6 +60,7 @@ v3d-rpi4-gl:arm64:
extends:
- .igalia-bcm2711-rpi-4
- .broadcom-test:arm64
- .test-piglit
- .v3d-rules
parallel: 8
variables:
@ -83,6 +85,7 @@ v3d-rpi4-rusticl:arm64:
extends:
- .igalia-bcm2711-rpi-4
- .broadcom-test:arm64
- .test-piglit
- .v3d-rusticl-manual-rules
timeout: 40m # base run time = 25min test, 32min total
variables:
@ -190,6 +193,7 @@ v3d-rpi5-gl:arm64:
extends:
- .igalia-bcm2712-rpi-5
- .broadcom-test:arm64
- .test-piglit
- .v3d-rules
variables:
HWCI_START_WESTON: 1
@ -213,6 +217,7 @@ v3d-rpi5-rusticl:arm64:
extends:
- .igalia-bcm2712-rpi-5
- .broadcom-test:arm64
- .test-piglit
- .v3d-rusticl-manual-rules
tags:
- igalia-rpi5

View file

@ -133,6 +133,7 @@ gc2000-gles2:
gc2000-piglit:
extends:
- gc2000-gles2
- .test-piglit
variables:
DEQP_SUITE: etnaviv-gc2000-piglit
B2C_TIMEOUT_OVERALL_MINUTES: 25

View file

@ -14,6 +14,7 @@ a306-piglit:
extends:
- .baremetal-deqp-test
- .a306-test
- .test-piglit
- .google-freedreno-manual-rules
timeout: 40m
variables:
@ -27,6 +28,7 @@ a306-piglit:
extends:
- .baremetal-deqp-test
- .a306-test
- .test-piglit
- .google-freedreno-manual-rules
variables:
BM_KERNEL_EXTRA_ARGS: "msm.num_hw_submissions=1"
@ -38,6 +40,7 @@ a306-piglit-shader:
extends:
- .baremetal-deqp-test
- .a306-test
- .test-piglit
- .google-freedreno-manual-rules
variables:
DEQP_SUITE: freedreno-a306-piglit-quick-shader
@ -57,6 +60,7 @@ a306-traces:
a530-gl:
extends:
- .baremetal-deqp-test
- .test-piglit
- .a530-test
variables:
DEQP_SUITE: freedreno-a530
@ -77,6 +81,7 @@ a530-piglit:
extends:
- .baremetal-deqp-test
- .a530-test
- .test-piglit
- .google-freedreno-manual-rules
parallel: 2
variables:
@ -165,6 +170,7 @@ a618-skqp:
extends:
- .lava-test-deqp:arm64
- .lava-sc7180-trogdor-lazor-limozeen:arm64
- .test-piglit
# Note that piglit has GL+VK integration testing.
- .collabora-freedreno-turnip-rules
variables:
@ -177,6 +183,7 @@ a618-piglit-full:
extends:
- .lava-test-deqp:arm64
- .lava-sc7180-trogdor-kingoftown:arm64
- .test-piglit
# Note that piglit has GL+VK integration testing.
- .collabora-freedreno-turnip-manual-rules
timeout: 60m
@ -189,6 +196,7 @@ a618-piglit-cl:
extends:
- .lava-test-deqp:arm64
- .lava-sc7180-trogdor-lazor-limozeen:arm64
- .test-piglit
- .collabora-freedreno-rules
rules:
- !reference [.collabora-freedreno-rules, rules]
@ -242,6 +250,7 @@ a660-piglit-cl:
extends:
- .lava-test-deqp:arm64
- .lava-sm8350-hdk:arm64
- .test-piglit
- .collabora-freedreno-rules
rules:
- !reference [.collabora-freedreno-rules, rules]
@ -358,6 +367,7 @@ a630-piglit:
extends:
- .baremetal-deqp-test
- .a630-test
- .test-piglit
# Note that piglit has GL+VK integration testing.
- .google-freedreno-turnip-rules
variables:
@ -368,6 +378,7 @@ a630-piglit-full:
extends:
- .baremetal-deqp-test
- .a630-test
- .test-piglit
# Note that piglit has GL+VK integration testing.
- .google-freedreno-turnip-manual-rules
timeout: 60m
@ -450,6 +461,7 @@ a750-gl:
a750-piglit-cl:
extends:
- .b2c-arm64-test-gl
- .test-piglit
- .a750-mupuf
- .valve-freedreno-manual-rules
rules:

View file

@ -20,6 +20,7 @@
extends:
- .anholt-g41-test
- .test-gl
- .test-piglit
- .deqp-test
variables:
DEQP_SUITE: crocus-g41

View file

@ -6,6 +6,7 @@ crocus-hsw:
- .anholt-hsw-test
- .test-gl
- .deqp-test
- .test-piglit
- .crocus-manual-rules
variables:
GPU_VERSION: crocus-hsw

View file

@ -19,6 +19,7 @@
.d3d12-test-piglit:
extends:
- .d3d12-test
- .test-piglit
script:
- . _install/piglit_run.ps1
# temporarily restrict to GSt runners until we discover why GL testing is

View file

@ -18,6 +18,7 @@ i915-g33:
extends:
- .ondracka-g33-test
- .b2c-deqp-test
- .test-piglit
variables:
DEQP_SUITE: i915g
PIGLIT_PLATFORM: gbm

View file

@ -34,6 +34,7 @@ lima-mali450-deqp:arm64:
lima-mali450-piglit:arm64:
extends:
- .lava-test-deqp:arm64
- .test-piglit
- .lima-rules
- .lava-meson-gxl-s805x-libretech-ac:arm64
variables:

View file

@ -5,6 +5,7 @@ llvmpipe-piglit-rusticl:
extends:
- .llvmpipe-piglit-cl
- .llvmpipe-rusticl-rules
- .test-piglit
needs:
- debian-testing
- debian/x86_64_test-gl
@ -28,7 +29,9 @@ llvmpipe:
DEQP_SUITE: llvmpipe
XVFB_SCRIPT: "install/deqp-runner.sh"
DEQP_FRACTION: 4
extends: .llvmpipe-deqp-test
extends:
- .llvmpipe-deqp-test
- .test-piglit
script: |
. "$SCRIPTS_DIR"/setup-test-env.sh
export LD_LIBRARY_PATH="$CI_PROJECT_DIR/install/lib"

View file

@ -61,6 +61,7 @@ r300-rv410-deqp-piglit:
extends:
- .ondracka-generic
- .b2c-deqp-test
- .test-piglit
variables:
DEQP_SUITE: r300-rv410
GPU_VERSION: r300-rv410
@ -73,6 +74,7 @@ r300-rv530-piglit:
extends:
- .ondracka-rv530
- .b2c-deqp-test
- .test-piglit
variables:
DEQP_SUITE: r300-piglit
PIGLIT_PLATFORM: gbm

View file

@ -7,7 +7,9 @@ softpipe:
XVFB_SCRIPT: "install/deqp-runner.sh"
DEQP_FRACTION: 4
timeout: 15m
extends: .softpipe-deqp-test
extends:
- .softpipe-deqp-test
- .test-piglit
script: |
. "$SCRIPTS_DIR"/setup-test-env.sh
export LD_LIBRARY_PATH=$CI_PROJECT_DIR/install/lib

View file

@ -24,6 +24,7 @@ vmware-vmx-piglit:x86_64:
stage: layered-backends
extends:
- .lava-test-deqp:x86_64
- .test-piglit
- .vmware-rules
timeout: 30m
parallel: 2

View file

@ -4,6 +4,7 @@ include:
virpipe-on-gl:
extends:
- .deqp-test
- .test-piglit
- .virpipe-test
variables:
DEQP_SUITE: virpipe-gl

View file

@ -228,6 +228,7 @@
extends:
- .b2c-x86_64-test-gl-manual
- .nvk-vkcts
- .test-piglit
- .zink-test
variables:
DEQP_SUITE: zink-nvk
@ -248,6 +249,7 @@
timeout: 30m
extends:
- .zink-test
- .test-piglit
- .test-radv
- .b2c-x86_64-test-gl
variables:

View file

@ -4,6 +4,7 @@ include:
zink-lvp:
extends:
- .test-gl
- .test-piglit
- .deqp-test
- .zink-lvp-test
tags:
@ -27,6 +28,7 @@ zink-venus-lvp:
- .test-gl
- .deqp-test
- .zink-venus-lvp-test
- .test-piglit
timeout: 15min # base run time = 8min, but it's on the shared runners so it can go up
variables:
DEQP_SUITE: zink-venus-lvp
@ -54,6 +56,7 @@ zink-venus-lvp-full:
zink-anv-adl:
extends:
- .zink-anv-adl-test
- .test-piglit
variables:
DEQP_SUITE: zink-anv-adl
PIGLIT_NO_WINDOW: 1
@ -69,6 +72,7 @@ zink-anv-adl-full:
extends:
- zink-anv-adl
- .zink-anv-manual-rules
- .test-piglit
variables:
DEQP_SUITE: zink-anv-adl-full
timeout: 2h
@ -92,6 +96,7 @@ zink-anv-adl-traces-restricted:
zink-anv-tgl:
extends:
- .zink-anv-tgl-test
- .test-piglit
timeout: 30m
variables:
DEQP_SUITE: zink-anv-tgl
@ -109,6 +114,7 @@ zink-anv-tgl-full:
extends:
- zink-anv-tgl
- .zink-anv-manual-rules
- .test-piglit
variables:
DEQP_SUITE: zink-anv-tgl-full
timeout: 1h 45m
@ -181,6 +187,7 @@ zink-tu-a750:
- .tu-zink-test-valve
- .a750-mupuf
- .zink-turnip-valve-manual-rules
- .test-piglit
timeout: 25m # base runtime 11min total, 9min of testing
variables:
B2C_TIMEOUT_BOOT_MINUTES: 18

View file

@ -204,6 +204,7 @@ iris-amly-egl:
iris-kbl-piglit:
extends:
- .iris-kbl-test
- .test-piglit
parallel: 2
variables:
HWCI_START_XORG: 1
@ -280,6 +281,7 @@ intel-adl-cl:
- .intel-adl-test
- .lava-acer-n20q11-r856ltn-p1s2-nissa:x86_64
- .intel-rules
- .test-piglit
rules:
- !reference [.intel-adl-test, rules]
- !reference [.intel-rules, rules]

View file

@ -30,6 +30,7 @@ panfrost-t860-cl:arm64:
- .lava-test-deqp:arm64
- .panfrost-midgard-manual-rules
- .panfrost-test
- .test-piglit
- .lava-rk3399-gru-kevin:arm64
rules:
- !reference [.panfrost-midgard-manual-rules, rules]
@ -111,6 +112,7 @@ panfrost-g52-piglit:arm64:
- .lava-test-deqp:arm64
- .panfrost-bifrost-gl-manual-rules
- .panfrost-test
- .test-piglit
- .lava-meson-g12b-a311d-khadas-vim3:arm64
variables:
HWCI_START_WESTON: 1
@ -143,6 +145,7 @@ panfrost-g57-piglit:arm64:
- .lava-test-deqp:arm64
- .panfrost-bifrost-gl-rules
- .panfrost-test
- .test-piglit
- .lava-mt8195-cherry-tomato-r2:arm64
variables:
HWCI_START_WESTON: 1
@ -167,6 +170,7 @@ panfrost-g610-gl:arm64:
.panfrost-g610-piglit:arm64:
extends:
- panfrost-g610-gl:arm64
- .test-piglit
- .panfrost-valhall-gl-manual-rules
variables:
DEQP_SUITE: panfrost-g610-piglit