From 2a7288e70e971d0cdb8ac839f5c3219e4941172d Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Fri, 10 Apr 2026 11:58:20 +0300 Subject: [PATCH] tests/buffer-transforms: reduce split cases The point of buffer_transform_split is to ensure that committing only transform and scale changes gets reflected on screen, without explicit damage. There is no need to go through the big set of parameter combinations, it only needs to test that changing each triggers the damage. Test setting only scale and only transform separately, so that one cannot mask bugs with the other. This brings the screenshot count for buffer_transform_split from 12 down to 2, which is good for CI running time. Signed-off-by: Pekka Paalanen --- tests/buffer-transforms-test.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/buffer-transforms-test.c b/tests/buffer-transforms-test.c index b9cb468bd..7c1569855 100644 --- a/tests/buffer-transforms-test.c +++ b/tests/buffer-transforms-test.c @@ -161,7 +161,12 @@ TEST_P(buffer_transform, my_buffer_args) return RESULT_OK; } -TEST_P(buffer_transform_split, my_buffer_args) +static const struct buffer_args my_split_args[] = { + { 1, TRANSFORM(90) }, + { 2, TRANSFORM(NORMAL) }, +}; + +TEST_P(buffer_transform_split, my_split_args) { const struct buffer_args *bargs = data; const struct setup_args *oargs; @@ -197,9 +202,14 @@ TEST_P(buffer_transform_split, my_buffer_args) * Commit scale and transform separately. Otherwise identical to the * 'buffer_transform' test so the same validation images can be used. */ - wl_surface_set_buffer_scale(client->surface->wl_surface, bargs->scale); - wl_surface_set_buffer_transform(client->surface->wl_surface, - bargs->transform); + if (bargs->scale != 1) + wl_surface_set_buffer_scale(client->surface->wl_surface, bargs->scale); + + if (bargs->transform != WL_OUTPUT_TRANSFORM_NORMAL) { + wl_surface_set_buffer_transform(client->surface->wl_surface, + bargs->transform); + } + wl_surface_commit(client->surface->wl_surface); match = verify_screen_content(client, refname, 0, NULL, 0, NULL,