Commit graph

10964 commits

Author SHA1 Message Date
Pekka Paalanen
ebcec31e9f tests/ivi-layout-test-client: migrate to DECLARE_TEST_LIST API
Replace TEST() and TEST_P() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
5d18ad7fab tests/ivi-layout-internal-test: migrate to DECLARE_TEST_LIST API
Replace PLUGIN_TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
cc821a2b11 tests/iterate-debug-scopes-test: migrate to DECLARE_TEST_LIST API
Replace PLUGIN_TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
abfb03bd73 tests/internal-screenshot-test: migrate to DECLARE_TEST_LIST API
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
403532b4af tests/image-description-query-test: migrate to DECLARE_TEST_LIST API
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
ecd469b703 tests/idalloc-test: migrate to DECLARE_TEST_LIST API
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
21caf77681 tests/fifo-test: migrate to DECLARE_TEST_LIST API
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
40c3096337 tests/event-test: migrate to DECLARE_TEST_LIST API
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
937a3ec541 tests/drm-writeback-screenshot-test: migrate to DECLARE_TEST_LIST API
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
0a0255fb29 tests/drm-smoke-test: migrate to DECLARE_TEST_LIST API
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
bd6bffdf8b tests/drm-offload-test: migrate to DECLARE_TEST_LIST API
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
3ecfb1dc90 tests/drm-formats-test: migrate to DECLARE_TEST_LIST API
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
eb06e65071 tests/dmabuf-screenshot-test: migrate to DECLARE_TEST_LIST API
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
7570bfda10 tests/devices-test: migrate to DECLARE_TEST_LIST API
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
a328473b3f tests/custom-env-test: migrate to DECLARE_TEST_LIST API
Replace TEST() and TEST_P() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
ccea61699f tests/constraints-test: migrate to DECLARE_TEST_LIST API
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
1890c2a9f2 tests/config-parser-test: migrate to DECLARE_TEST_LIST API
Replace TEST() and TEST_P() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
c6ba812670 tests/commit-timing-test: migrate to DECLARE_TEST_LIST API
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
9ddbccf83b tests/color-representation-renderer-test: migrate to DECLARE_TEST_LIST API
Replace TEST() and TEST_P() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
2cf7cecd66 tests/color-representation-protocol-test: migrate to DECLARE_TEST_LIST API
Replace TEST() and TEST_P() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
dcf2bdffad tests/color-representation-drm-test: migrate to DECLARE_TEST_LIST API
Replace TEST_P() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
0c9fc5585a tests/color-output-parsing-test: migrate to DECLARE_TEST_LIST API
Replace TEST_P() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
e810728a59 tests/color-math-test: migrate to DECLARE_TEST_LIST API
Replace TEST() and TEST_P() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
a35a46acc7 tests/color-management-protocol-test: migrate to DECLARE_TEST_LIST API
Replace TEST() and TEST_P() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
9fadbf159b tests/color-lcms-optimizer-test: migrate to DECLARE_TEST_LIST API
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
cf102ae649 tests/color-icc-output-test: migrate to DECLARE_TEST_LIST API
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
47410163b0 tests/color-effects-test: migrate to DECLARE_TEST_LIST API
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
aaec5247ef tests/client-buffer-test: migrate to DECLARE_TEST_LIST API
Replace TEST_P() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
99fc36f210 tests/buffer-transforms-test: migrate to DECLARE_TEST_LIST API
Replace TEST_P() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
f4d7ff3c20 tests/bad-buffer-test: migrate to DECLARE_TEST_LIST API
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
ab00769756 tests/assert-test: migrate to DECLARE_TEST_LIST API
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
b5b6e4da3e tests/alpha-blending-test: migrate to DECLARE_TEST_LIST API
Replace TEST() macros with explicit static functions and
DECLARE_TEST_LIST() registration for better type safety and to
prepare for removing the custom ELF section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
d47ae7351a tests: new test listing macros
This is a step towards getting rid of the __start_test_section and
__stop_test_section usage. The old macros assumed that all individual
variables assigned to the test section would be packed there as if in an
array. Mostly this seemed to work, too, with some magical alignment
fixes in the past. It was not guaranteed to work.

With the new test listing macros, we collect an actual array. The
drawback is that we need to mention all the test entry points explicitly
and they look like normal functions in the code - which they now are.
Their argument typing is safe, and their arguments are explicitly
visible. We rely on the compiler to complain about unused functions if
any entry point is forgotten from the array.

The array is still put into the test section, because this seems to be
the only feasible way of letting the harness code support both the old
and new test listing macros at the same time. This allows converting
each test program individually.

TESTFN_ARG() needs an explicit cast on the function pointer type,
because the data argument pointer type will not match const void*.

As an example of using the new macros, linalg-test.c is converted.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
e34a2157d1 tests: use union instead of wrapper function
This simplifies our test declaration macros a little bit. The aim is to
modify struct weston_test_entry to be more suitable for a future where
__attribute__((section)) is no longer used. The test functions will be
plain functions and not something baked with macros, so wrappers have
to go.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 15:12:59 +03:00
Pekka Paalanen
39caecee61 tests/vertex-clip: add const
When I make the test harness more type-safe, this would fail to build.
Add the missing const.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 15:12:59 +03:00
Pekka Paalanen
d2565d4c25 tests/custom-env: add const
When I make the test harness more type-safe, this would fail to build.
Add the missing const.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 15:12:59 +03:00
Marius Vlad
6588352937 compositor: Annotate surface enter/leave events
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2026-05-27 13:28:51 -05:00
Detlev Casanova
4de2655f08 renderer-gl: Also set dmabuf.rb when creating render buffer
gl_fbo_image_init() allocates and returns a renderbuffer through its rb
argument.
If it is not set in the dmabuf.rb field, gl_fbo_fini() will not be able to
release it and DMA buffers can start leaking.

This is usually not an issue because the DMA buffers are released when
Weston closes, but in the case of the pipewire output, the buffers are
allocated when a pipewire client connects and freed when the client
disconnects.
In that situation, dangling DMA buffers can be observed because of the
unfreed render buffer (rb).

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
2026-05-26 14:43:57 -04:00
Pekka Paalanen
37860bace5 tests/color-management-protocol: add inert_get_preferred_image_description
Extend test coverage.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-26 15:12:33 +03:00
Pekka Paalanen
08af0811cb tests/color-management-protocol: add set_bad_rendering_intent
Extend test coverage.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-26 15:12:33 +03:00
Pekka Paalanen
22f6b4ecc7 tests/color-management-protocol: add set_inert_surface_image_description
Extend test coverage.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-26 15:12:33 +03:00
Pekka Paalanen
8e7e882b67 tests/color-management-protocol: add set_failed_image_description
Extend test coverage.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-26 15:12:33 +03:00
Pekka Paalanen
5776cbb063 tests/color-management-protocol: add soft-fail image description
We need to be able to test cases where a client tries to use a not-ready
image description. Turns out passing an fd for a directory fails just
the right way without triggering protocol errors.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-26 15:12:13 +03:00
Pekka Paalanen
1ffa089f7f tests/color-management-protocol: move parametric_cases
Move all the parametric_cases definitions just above the TEST_P() using
them, to be close to the code that needs them.

While the diff might look odd, this is really just moving the one big
block of code verbatim.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-26 15:05:14 +03:00
Pekka Paalanen
ad3fbd3823 tests/color-management-protocol: rename case array
There may or may not be more case arrays, so rename these to hint
towards which test is using this.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-26 15:05:14 +03:00
Pekka Paalanen
a41eac42ce tests/color-management-protocol: trigger error_surface_exists
Cover a new failure case, but also make sure the re-creation is still
accepted.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-26 15:05:14 +03:00
Pekka Paalanen
00e9842a1b tests: rename -parametric to color-management-protocol
This is the program's new scope.

Also drop unnecessary dependencies, these were consolidated when color
management protocol helpers moved into the harness.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-26 15:05:14 +03:00
Pekka Paalanen
e593d9142d tests: rename color-management to image-description-query
This is the program's new scope.

Also drop unnecessary dependencies, these were consolidated when color
management protocol helpers moved into the harness.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-26 15:05:14 +03:00
Pekka Paalanen
55337ac35a tests: move non-repeated test into parametric
color-management-test will turn into image-description-query test, which
runs with an array of fixtures setting up different output image
descriptions, and checks the preferred and output image
description information.

The param test will test everything else non-screenshots that does not
need to iterate over different output image descriptions.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-26 15:02:43 +03:00
liang zhou
0f3df6f168 libweston: add new API weston_compositor_bind_touch
Allow weston plugins to implement custom touch binding logic by using
this API.

Signed-off-by: liang zhou <liang.zhou@gehealthcare.com>
2026-05-26 09:01:37 +00:00