tests: do not call weston_surface::get_label()

Part of migration away from get_label().

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen 2026-02-27 14:37:15 +02:00 committed by Marius Vlad
parent 81c9bca764
commit d40af215a3
2 changed files with 3 additions and 9 deletions

View file

@ -73,17 +73,14 @@ static void
assert_surface_is_background(struct wet_testsuite_data *suite_data,
struct weston_surface *surface)
{
char lbl[128];
test_assert_ptr_null(surface->resource);
test_assert_ptr_not_null(surface->buffer_ref.buffer);
test_assert_enum(surface->buffer_ref.buffer->type, WESTON_BUFFER_SOLID);
test_assert_ptr_not_null(surface->output);
test_assert_s32_eq(surface->width, surface->output->width);
test_assert_s32_eq(surface->height, surface->output->height);
test_assert_ptr_not_null(surface->get_label);
test_assert_int_ne(surface->get_label(surface, lbl, sizeof(lbl)), 0);
test_assert_str_eq(lbl, "kiosk shell background surface");
test_assert_ptr_not_null(surface->label);
test_assert_str_eq(surface->label, "kiosk shell background surface");
}
TEST(two_surface_switching)

View file

@ -158,11 +158,8 @@ trigger_binding(struct weston_keyboard *keyboard, const struct timespec *time,
weston_surface_get_content_size(surface, &width, &height);
if (surface->get_label(surface, desc, sizeof(desc)) < 0)
snprintf(desc, sizeof(desc), "(unknown)");
weston_log("surface screenshot of %p: '%s', %dx%d\n",
surface, desc, width, height);
surface, surface->label, width, height);
sz = width * bytespp * height;
if (sz == 0) {