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 <daniels@collabora.com>
This commit is contained in:
Daniel Stone 2026-03-30 21:58:20 +01:00 committed by Marius Vlad
parent d532ac0452
commit d67f204388

View file

@ -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[] = {