weston/tests
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
..
harness tests: new test listing macros 2026-05-28 16:29:56 +03:00
reference tests: add tests to ensure GL dma-buf screenshot correctness 2026-04-02 14:34:19 +00:00
visualization tests/alpha-blending: replace compare_float() with rgb_diff_stat 2022-06-30 09:08:32 +00:00
alpha-blending-test.c gl-renderer, tests: use both blending implementations 2026-04-08 21:55:45 +00:00
assert-test.c shared: add wl_list asserts 2026-05-13 10:21:33 +03:00
bad-buffer-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
buffer-transforms-test.c tests/buffer-transforms: reduce split cases 2026-04-10 12:03:43 +03:00
client-buffer-test.c tests: Don't free-run refresh in client-buffer test 2026-04-01 08:01:44 +03:00
color-effects-test.c tests: add tests for grayscale color effect 2026-03-04 13:12:07 -03:00
color-icc-output-test.c tests: Add helper to create solid-filled buffer 2025-10-16 11:36:33 +03:00
color-lcms-optimizer-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
color-management-protocol-test.c tests/color-management-protocol: add inert_get_preferred_image_description 2026-05-26 15:12:33 +03:00
color-math-test.c color: add Bradford matrix computation 2025-07-28 13:14:01 +03:00
color-output-parsing-test.c tests: add color-output-parsing 2025-10-09 16:17:57 +00:00
color-representation-common.c tests: color-representation: Use writeback screenshots for DRM tests 2026-03-24 15:25:30 +01:00
color-representation-common.h tests: color-representation: Use writeback screenshots for DRM tests 2026-03-24 15:25:30 +01:00
color-representation-drm-test.c tests: color-representation: Use writeback screenshots for DRM tests 2026-03-24 15:25:30 +01:00
color-representation-protocol-test.c tests: Add color-representation protocol test 2025-12-19 17:08:39 +01:00
color-representation-renderer-test.c tests: color-representation: Use writeback screenshots for DRM tests 2026-03-24 15:25:30 +01:00
commit-timing-test.c compositor: Support the commit-timing protocol 2025-12-16 10:58:01 -06:00
config-parser-test.c shared: implement weston_parse_space_separated_list() 2025-10-07 17:23:35 +03:00
constraints-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
custom-env-test.c tests/custom-env: add const 2026-05-28 15:12:59 +03:00
devices-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
dmabuf-screenshot-test.c tests: add tests to ensure GL dma-buf screenshot correctness 2026-04-02 14:34:19 +00:00
drm-formats-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
drm-offload-test.c drm-backend: Implement offloading of solid-color backgrounds 2026-03-26 17:20:11 +01:00
drm-smoke-test.c tests: Add helper to create solid-filled buffer 2025-10-16 11:36:33 +03:00
drm-writeback-screenshot-test.c tests: Fix screenshot assert 2025-10-16 11:36:33 +03:00
event-test.c tests: Add helper to create solid-filled buffer 2025-10-16 11:36:33 +03:00
fifo-test.c tests/fifo: fix false-positive uninitialized width 2025-12-16 15:19:02 +00:00
idalloc-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
image-description-query-test.c tests: rename color-management to image-description-query 2026-05-26 15:05:14 +03:00
input-timestamps-helper.c tests: Address compilation warns/error on arm32 (format) 2025-12-02 18:27:12 +02:00
input-timestamps-helper.h tests: Introduce input timestamps helper 2018-02-20 10:20:29 +02:00
internal-screenshot-test.c tests: Support decoration capture for screenshots 2025-10-16 11:36:33 +03:00
iterate-debug-scopes-test.c tests: fix "%s" argument is null warnings 2026-01-22 15:56:56 +02:00
ivi-layout-internal-test.c tests: Set optimal refresh rate for tests 2025-10-16 11:36:33 +03:00
ivi-layout-test-client.c tests: Add helper to create solid-filled buffer 2025-10-16 11:36:33 +03:00
ivi-layout-test-plugin.c tests: fix RUNNER_TEST UBSan error 2026-01-22 16:51:31 +02:00
ivi-shell-app-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
ivi-test.h ivi-shell: implement surface_on_many_layer test 2016-06-29 11:32:23 +03:00
keyboard-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
kiosk-shell-test.c drm,renderers: Remove some unnecessary indirection 2026-04-09 08:58:15 -05:00
lcms-util-test.c tests: drop EOTF from TRANSFER_FN_SRGB_EOTF 2025-06-03 15:47:20 +03:00
linalg-test.c tests: new test listing macros 2026-05-28 16:29:56 +03:00
linux-explicit-synchronization-test.c tests: Add helper to create solid-filled buffer 2025-10-16 11:36:33 +03:00
lua-shell-test.c lua-shell: Add lua-shell 2025-06-04 15:47:06 +03:00
matrix-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
matrix-transform-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
meson.build tests: rename -parametric to color-management-protocol 2026-05-26 15:05:14 +03:00
output-capture-protocol-test.c tests: Skip udmabuf tests before initializing client 2026-04-16 21:17:10 -05:00
output-damage-test.c tests/output-damage: doc renderer testing 2026-04-10 11:51:05 +03:00
output-decorations-test.c tests: Support decoration capture for screenshots 2025-10-16 11:36:33 +03:00
output-transforms-test.c tests: Support decoration capture for screenshots 2025-10-16 11:36:33 +03:00
paint-node-test.c tests/paint-node: fix false-positive uninitialized variable 2025-12-16 15:19:02 +00:00
plugin-registry-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
pointer-shot-test.c tests: Add helper to create solid-filled buffer 2025-10-16 11:36:33 +03:00
pointer-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
presentation-test.c tests: Refactor get_presentation 2025-12-04 12:38:17 -06:00
roles-test.c tests: Refactor get_subcompositor 2025-12-04 12:38:17 -06:00
safe-signal-output-removal-test.c shell-utils: Add labels for curtain created surfaces 2026-03-04 07:28:49 +00:00
safe-signal-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
setbacklight.c tests: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-15 13:04:19 -07:00
single-pixel-buffer-test.c tests: Add a semi-transparent single pixel buffer test 2025-10-21 13:53:34 -05:00
string-test.c tests/string: fix false-positive uninitialized val 2025-12-16 15:19:02 +00:00
subsurface-shot-test.c tests: Refactor get_subcompositor 2025-12-04 12:38:17 -06:00
subsurface-test.c tests: Refactor get_subcompositor 2025-12-04 12:38:17 -06:00
surface-global-test.c libweston: give weston_surfaces a simple name 2026-02-19 16:21:19 +02:00
surface-screenshot-test.c tests: fix desc[] left-over 2026-03-12 17:47:47 +02:00
surface-test.c libweston: give weston_surfaces a simple name 2026-02-19 16:21:19 +02:00
text-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
timespec-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
touch-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
vertex-clip-test.c tests/vertex-clip: add const 2026-05-28 15:12:59 +03:00
viewporter-shot-test.c tests: Add helper to create solid-filled buffer 2025-10-16 11:36:33 +03:00
viewporter-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
xdg-shell-test.c tests: add xdg-shell defunct surfaces test 2026-02-23 09:15:31 +00:00
xwayland-test.c tests: Set optimal refresh rate for tests 2025-10-16 11:36:33 +03:00