From 68ef86ac4f2443e3e4d82e9250c32180607bbc1c Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 22 Aug 2024 01:04:28 +0200 Subject: [PATCH 1/4] wayland: Don't ask dbus about settings we don't care about When running with default settings, we don't care what dbus thinks about non-default settings. --- gdk/wayland/gdkdisplay-wayland.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c index 98e9aecd3d..b678279b40 100644 --- a/gdk/wayland/gdkdisplay-wayland.c +++ b/gdk/wayland/gdkdisplay-wayland.c @@ -1944,7 +1944,8 @@ init_settings (GdkDisplay *display) GSettings *settings; int i; - if (gdk_should_use_portal ()) + if (gdk_should_use_portal () && + !(gdk_display_get_debug_flags (display) & GDK_DEBUG_DEFAULT_SETTINGS)) { GVariant *ret; GError *error = NULL; From 07b3e8785cce34865246da714ad64896db81b5c0 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 21 Aug 2024 19:24:10 +0200 Subject: [PATCH 2/4] CI: Limit maximum number of test processes to 32 There are spurious failures happening in CI runs and I blame those on too many processes running at the same time overloading either the compositor we're running against, or causing OOM situations or just genereally slowing things down and hitting timeout limits. The choice of 32 is rather arbitrary. I just picked a number that felt good. --- .gitlab-ci.yml | 1 + .gitlab-ci/run-tests.sh | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fee746d85c..1b647f4507 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,6 +26,7 @@ variables: BACKEND_FLAGS: "-Dx11-backend=true -Dwayland-backend=true -Dbroadway-backend=true" FEATURE_FLAGS: "-Dvulkan=enabled -Dcloudproviders=enabled -Dbuild-testsuite=true -Dintrospection=enabled" MESON_TEST_TIMEOUT_MULTIPLIER: 3 + MESON_TEST_MAX_PROCESSES: 32 FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora:v52" workflow: diff --git a/.gitlab-ci/run-tests.sh b/.gitlab-ci/run-tests.sh index 247443fe9e..0996e07bdd 100755 --- a/.gitlab-ci/run-tests.sh +++ b/.gitlab-ci/run-tests.sh @@ -8,6 +8,7 @@ builddir=$1 setup=$2 suite=$3 multiplier=${MESON_TEST_TIMEOUT_MULTIPLIER:-1} +n_processes=${MESON_TEST_MAX_PROCESSES:-1} # Ignore memory leaks lower in dependencies export LSAN_OPTIONS=suppressions=$srcdir/lsan.supp:print_suppressions=0:detect_leaks=0:allocator_may_return_null=1 @@ -18,6 +19,7 @@ case "${setup}" in meson test -C ${builddir} \ --quiet \ --timeout-multiplier "${multiplier}" \ + --num-processes "${n_processes}" \ --print-errorlogs \ --setup=${setup} \ --suite=${suite//,/ --suite=} \ @@ -42,6 +44,7 @@ case "${setup}" in meson test -C ${builddir} \ --quiet \ --timeout-multiplier "${multiplier}" \ + --num-processes "${n_processes}" \ --print-errorlogs \ --setup=${setup} \ --suite=${suite//,/ --suite=} \ @@ -65,6 +68,7 @@ case "${setup}" in meson test -C ${builddir} \ --quiet \ --timeout-multiplier "${multiplier}" \ + --num-processes "${n_processes}" \ --print-errorlogs \ --setup=${setup} \ --suite=${suite//,/ --suite=} \ From 2d9f28c0ff6ac88cbff68fc033a562de90fca582 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 21 Aug 2024 21:35:05 +0200 Subject: [PATCH 3/4] CI: Make asan a child of the default fedora build Effects of that: 1. Keep artifacts 2. Produce a test report 3. Caching for ccache --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1b647f4507..b1e4757d3d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -415,7 +415,7 @@ static-scan: # Run tests with the address sanitizer. We need to turn off introspection # and f16c, since they are incompatible with asan asan-build: - image: $FEDORA_IMAGE + extends: .build-fedora-default tags: [ asan ] stage: analysis needs: [] From 504ca9c0c8103bc8b0c2bd2819fec4270ffb6c06 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 22 Aug 2024 05:33:53 +0200 Subject: [PATCH 4/4] CI: run tests in a single dbus session Instead of every test spawning their own dbus, make the tests share the same server, just like they share their own compositor. This should speed up things a bit and avoid weird interactions when multiple dbus processes exist. --- .gitlab-ci/run-tests.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci/run-tests.sh b/.gitlab-ci/run-tests.sh index 0996e07bdd..8932d23473 100755 --- a/.gitlab-ci/run-tests.sh +++ b/.gitlab-ci/run-tests.sh @@ -15,7 +15,8 @@ export LSAN_OPTIONS=suppressions=$srcdir/lsan.supp:print_suppressions=0:detect_l case "${setup}" in x11*) - xvfb-run -a -s "-screen 0 1024x768x24 -noreset" \ + dbus-run-session -- \ + xvfb-run -a -s "-screen 0 1024x768x24 -noreset" \ meson test -C ${builddir} \ --quiet \ --timeout-multiplier "${multiplier}" \ @@ -41,7 +42,8 @@ case "${setup}" in compositor=$! export WAYLAND_DISPLAY=wayland-5 - meson test -C ${builddir} \ + dbus-run-session -- \ + meson test -C ${builddir} \ --quiet \ --timeout-multiplier "${multiplier}" \ --num-processes "${n_processes}" \ @@ -65,7 +67,8 @@ case "${setup}" in server=$! export BROADWAY_DISPLAY=:5 - meson test -C ${builddir} \ + dbus-run-session -- \ + meson test -C ${builddir} \ --quiet \ --timeout-multiplier "${multiplier}" \ --num-processes "${n_processes}" \