From d67f204388fdd7d8eece6df825236c8577f4fc18 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Mon, 30 Mar 2026 21:58:20 +0100 Subject: [PATCH] tests: Don't free-run refresh in client-buffer test The client-buffer test was setting the desired output refresh rate to the highest possible, posting a new buffer to the screen, waiting for the frame callback, then requesting a screenshot be taken. This was not necessary (we already have a mode for tests which only want screenshots and not a free-running refresh), and also harmful in that it setting up a potential race. When gl-renderer gets asked to repaint with nothing to show, it tries to read back the GL fence status after the dmabuf has signalled. On drivers with the threaded context enabled, the GL fence would not be readable, even if the attached dmabuf was. The easy fix to this is to just not free-run refresh. Signed-off-by: Daniel Stone --- tests/client-buffer-test.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/client-buffer-test.c b/tests/client-buffer-test.c index 8fc93fd3e..4088c3d07 100644 --- a/tests/client-buffer-test.c +++ b/tests/client-buffer-test.c @@ -191,7 +191,7 @@ fixture_setup(struct weston_test_harness *harness, const struct setup_args *arg) setup.height = 264; setup.shell = SHELL_TEST_DESKTOP; setup.logging_scopes = arg->logging_scopes; - setup.refresh = HIGHEST_OUTPUT_REFRESH; + setup.refresh = 0; setup.test_quirks.gl_force_import_yuv_fallback = arg->gl_force_import_yuv_fallback; @@ -1546,16 +1546,13 @@ static void show_window_with_client_buffer(struct client *client, struct client_buffer *buf) { struct surface *surface = client->surface; - int done; weston_test_move_surface(client->test->weston_test, surface->wl_surface, 4, 4); wl_surface_attach(surface->wl_surface, buf->wl_buffer, 0, 0); wl_surface_damage(surface->wl_surface, 0, 0, buf->width, buf->height); - frame_callback_set(surface->wl_surface, &done); wl_surface_commit(surface->wl_surface); - frame_callback_wait(client, &done); } static const struct client_buffer_case client_buffer_cases[] = {