From 5e7835bf2bc88af5a1ed593093bbe4c2542742dd Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Tue, 24 Jun 2025 15:30:43 +0200 Subject: [PATCH] ci: Bump kernel and Mesa version 1. Bump the kernel version to the drm-misc-next-2025-09-04 tag, fixing various issues required for vkms testing. 2. Use /sys/bus/faux/devices/vkms/drm/ instead of /sys/devices/platform/vkms/drm/ for the card basename. 3. Bump Mesa to the commit needed for vkms+lavapipe. This also needs another leak workaround, so the code got a small cleanup. Signed-off-by: Robert Mader --- .gitlab-ci.yml | 2 +- .gitlab-ci/build-deps.sh | 7 ++++-- .gitlab-ci/virtme-scripts/run-weston-tests.sh | 7 +++--- tests/weston-test-runner.c | 25 +++++++++++-------- 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a38aceb00..d3f05b197 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,7 +43,7 @@ variables: FDO_UPSTREAM_REPO: wayland/weston FDO_REPO_SUFFIX: "$BUILD_OS-$FDO_DISTRIBUTION_VERSION/$BUILD_ARCH" - FDO_DISTRIBUTION_TAG: '2025-09-04-mesa-25.2.2' + FDO_DISTRIBUTION_TAG: '2025-09-24-linux-drm-misc-next-2025-09-04-and-mesa-25.3-kms-dri-sw-vulkan-vkms' include: diff --git a/.gitlab-ci/build-deps.sh b/.gitlab-ci/build-deps.sh index 969ff2876..73a4a392e 100755 --- a/.gitlab-ci/build-deps.sh +++ b/.gitlab-ci/build-deps.sh @@ -59,7 +59,7 @@ fdo_log_section_end install_meson # just a regular container. fdo_log_section_start_collapsed install_kernel "install_kernel" if [[ -n "$KERNEL_DEFCONFIG" ]]; then - git clone --depth=1 --branch=v6.14 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux + git clone --depth=1 --branch=drm-misc-next-2025-09-04 https://gitlab.freedesktop.org/drm/misc/kernel.git linux cd linux if [[ "${BUILD_ARCH}" = "x86-64" ]]; then @@ -181,8 +181,11 @@ make install cd ../.. rm -rf libx11 -git clone --branch mesa-25.2.2 --depth=1 https://gitlab.freedesktop.org/mesa/mesa.git +git clone --single-branch --branch main https://gitlab.freedesktop.org/mesa/mesa.git cd mesa +# Last commit needed to make the Vulkan backend work with vkms+lavapipe, will be +# released in 25.3. +git checkout -b snapshot 45dc8b4d979aa2275f20db399a4430f0224799f5 meson setup build --wrap-mode=nofallback -Dauto_features=disabled \ -Dgallium-drivers=llvmpipe -Dvulkan-drivers=swrast -Dvideo-codecs= \ -Degl=enabled -Dgbm=enabled -Dgles2=enabled -Dllvm=enabled \ diff --git a/.gitlab-ci/virtme-scripts/run-weston-tests.sh b/.gitlab-ci/virtme-scripts/run-weston-tests.sh index a91c72767..4337aba99 100755 --- a/.gitlab-ci/virtme-scripts/run-weston-tests.sh +++ b/.gitlab-ci/virtme-scripts/run-weston-tests.sh @@ -12,7 +12,7 @@ export LIBSEAT_BACKEND=seatd # devices are loaded is not predictable, so the DRM node that VKMS takes can # change across each boot. That's why we have this one-liner shell script to get # the appropriate node for VKMS. -export WESTON_TEST_SUITE_DRM_DEVICE=$(basename /sys/devices/platform/vkms/drm/card*) +export WESTON_TEST_SUITE_DRM_DEVICE=$(basename /sys/bus/faux/devices/vkms/drm/card*) # ninja test depends on meson, and meson itself looks for its modules on folder # $HOME/.local/lib/pythonX.Y/site-packages (the Python version may differ). @@ -27,8 +27,9 @@ export SEATD_LOGLEVEL=debug # Terrible hack, per comment in weston-test-runner.c's main(): find Mesa's # llvmpipe/lavapipe driver module location -export WESTON_CI_LEAK_DL_HANDLE=$(find /usr/local -name swrast_dri.so -print 2>/dev/null || true) -export WESTON_CI_LEAK_DL_HANDLE_LVP=$(find /usr/local -name libvulkan_lvp.so -print 2>/dev/null || true) +export WESTON_CI_LEAK_DL_HANDLES=$(find /usr/local -name swrast_dri.so -print 2>/dev/null || true): +export WESTON_CI_LEAK_DL_HANDLES=$WESTON_CI_LEAK_DL_HANDLES:$(find /usr/local -name libvulkan_lvp.so -print 2>/dev/null || true) +export WESTON_CI_LEAK_DL_HANDLES=$WESTON_CI_LEAK_DL_HANDLES:$(find /usr/local -name libgallium\*.so -print 2>/dev/null || true) # run the tests and save the exit status # we give ourselves a very generous timeout multiplier due to ASan overhead diff --git a/tests/weston-test-runner.c b/tests/weston-test-runner.c index 13c850f1b..6afda1f6e 100644 --- a/tests/weston-test-runner.c +++ b/tests/weston-test-runner.c @@ -669,8 +669,7 @@ main(int argc, char *argv[]) enum test_result_code ret; enum test_result_code result = RESULT_OK; const struct fixture_setup_array *fsa; - const char *leak_dl_handle; - const char *leak_dl_handle_lvp; + char *leak_dl_handles; int fi; int fi_end; @@ -682,17 +681,21 @@ main(int argc, char *argv[]) * Turns out if llvmpipe is always live, then the pointers are always * reachable, so LeakSanitizer just tells us about our own code rather * than LLVM's, so ... + * + * This hack works so well that it also solved the obscure leak reports + * for lavapipe and libgallium! */ - leak_dl_handle = getenv("WESTON_CI_LEAK_DL_HANDLE"); - if (leak_dl_handle) - (void) dlopen(leak_dl_handle, RTLD_LAZY | RTLD_GLOBAL | RTLD_NODELETE); + leak_dl_handles = getenv("WESTON_CI_LEAK_DL_HANDLES"); + if (leak_dl_handles) { + char* token; - /* ... and this hack works so well that it also solved the obscure leak - * reports for lavapipe, so we copied it! - */ - leak_dl_handle_lvp = getenv("WESTON_CI_LEAK_DL_HANDLE_LVP"); - if (leak_dl_handle_lvp) - (void) dlopen(leak_dl_handle_lvp, RTLD_LAZY | RTLD_GLOBAL | RTLD_NODELETE); + token = strtok(leak_dl_handles, ":"); + while (token) { + if (strlen(token) > 0) + (void) dlopen(token, RTLD_LAZY | RTLD_GLOBAL | RTLD_NODELETE); + token = strtok(NULL, ":"); + } + } harness = weston_test_harness_create(argc, argv);