Skip to content

build: Fix gtk4 tests on s390x architecture

There are a number of gtk4 tests (build-time, and again at autopkgtest time) that are failing on s390x only when run in the combination of an updated mesa package (25.0.7-0ubuntu0.24.04.1) in Noble.

The problem seems to be in the GtkWidgetPaintable widget, which isn't triggering the "invalidate-contents" signal. This signal should be triggered every time the canvas has been repainted, and it is used in the tests to know when it is safe to capture the rendered picture and compare it with the expected results.

Setting GSK_RENDERER=cairo uses pure software rendering, and makes this work again, so this patch adds a new build option that, when enabled, forces CAIRO renderer if no renderer has been manually selected, and adds that option when building for the s390x architecture.

s390x is not a desktop platform, there are no desktop images for it, and gtk4 is not seeded in that architecture. While it would be best to fully understand what is making these tests fail, it's best to use this workaround for now in that architecture only, so that users in other architectures can benefit from the mesa and gtk4 updates.

This bug affects not only GTK4 build, but also Gnome Control Center build.

Fix LP #2122598

Edited by Sergio Costas

Merge request reports

Loading