Commit graph

1072 commits

Author SHA1 Message Date
Leandro Ribeiro
772635aba7 shared: add weston_assert_enum_ne()
Add an assert macro to check that two enums are not equal. Also adds the
respective test_assert_enum_ne().

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2026-06-16 16:45:20 +03:00
Leandro Ribeiro
f013aa4125 shared: rename weston_assert_enum() to weston_assert_enum_eq()
In next commit we'll add weston_assert_enum_ne(), so let's rename the
existing weston_assert_enum() to weston_assert_enum_eq() to make the
names consistent.

This also renames the test asserts (test_assert_enum() to
test_assert_enum_eq()).

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2026-06-16 16:45:20 +03:00
Pekka Paalanen
67f8d9d6a6 tests/image-description-query: verify descriptions
Set up a few different image descriptions on the output, and ensure that
the protocol delivers them as output and surface-preferred image
descriptions correctly.

Expands test coverage. Found one existing bug fixed by
	"color: fix sending power TF exponent".

I was lazy, and did not bother checking the ICC file contents.

This prepares for testing the surface-preferred parametric image
description, but first it will need the compositor implementation.

The config file formatting should be useful for future color managed
screenshot tests.

There is no need to test all the feature and rendering intent
advertisements, that's done in color-management-protocol-test.c and
protocol errors should catch lack of support anyway.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-06-10 14:11:27 +00:00
Pekka Paalanen
e900431b8e tests: add Display-P3 ICC profile
It will be nice to have an arbitrary but proper ICC profile for testing
ICC profile loading.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-06-10 14:11:27 +00:00
Pekka Paalanen
e85ec39e4f tests: color parameters to color_util.h
These will be needed in more than one test program, probably three.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-06-10 14:11:27 +00:00
Pekka Paalanen
a5b3a4a4aa tests/harness: expose enum image_descr_info_event
Some tests will want to verify that some optional events were actually
received.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-06-10 14:11:27 +00:00
Pekka Paalanen
a13bd2c03f tests/harness: forbid image_descr_info_done twice
Catch if the compositor sends this twice.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-06-10 14:11:27 +00:00
Pekka Paalanen
943c39ba8e tests/harness: fix double-closing ICC fd
image_description_info_destroy() closes it, and we might want to inspect
the fd in a test. Do not close it on 'done' event.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-06-10 14:11:27 +00:00
Pekka Paalanen
770865205d tests/color-management-protocol: add unset_inert_surface_image_description
Extend test coverage.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-06-10 14:11:27 +00:00
Pekka Paalanen
f6fc4e8e5f tests/color-management-protocol: add unset_image_description
Extend test coverage.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-06-10 14:11:27 +00:00
Pekka Paalanen
24fbc9c8aa tests/color-management-protocol: add failed_image_description_get_info
Extend test coverage.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-06-10 14:11:27 +00:00
Pekka Paalanen
2f9cab2047 tests/color-management-protocol: add set_too_short_icc_fd
Extend test coverage.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-06-10 14:11:27 +00:00
Pekka Paalanen
0459808d6e tests/color-management-protocol: use no-op renderer
Never need to actually render here, so lets save the effort of
intializing GL.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-06-10 14:11:27 +00:00
Leandro Ribeiro
0a3324d0cd tests: add alpha modifier tests
This adds two new test files:

alpha-modifier-smoke-test.c: contains tests exercising the mechanics of
the protocol, expected errors for misbehaved clients, etc.

alpha-modifier-test.c: contains tests to ensure that the visual changes
from an alpha modifier surface are working as intended. It exercises all
renderers.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2026-06-08 16:59:34 +03:00
Leandro Ribeiro
c724914260 tests: move surface_commit_color() to test client helper
This function is duplicated all over the test files. This moves it to
weston-test-client-helper.c and removes the duplicated code.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2026-06-08 16:59:34 +03:00
Pekka Paalanen
4db67f1eac tests: drop the custom ELF section
With DECLARE_TEST_LIST(), there is no need for the custom ELF section.
We can use a plain variable to refer to the list of test functions.

This makes the test harness more reliable as we are no longer relying on
internal compiler behavior on laying out objects in sections. This is
also obvious to memory access checkers that the accesses are valid.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
807245bce6 tests: remove old test listing macros
After the conversion to DECLARE_TEST_LIST(), none of these are used.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
Pekka Paalanen
dffdcb1757 tests/xwayland-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
610a7f9aa7 tests/xdg-shell-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
ab605f59e7 tests/viewporter-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
a15c5ef3bb tests/viewporter-shot-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
1ee9479b29 tests/vertex-clip-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
972368356c tests/touch-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
63e17db7bf tests/timespec-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
2d76d44d25 tests/text-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
a103cb5548 tests/surface-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
1da7ba4ad5 tests/surface-global-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
ba7d8fc3ca tests/subsurface-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
f043493414 tests/subsurface-shot-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
ddcf00d32c tests/string-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
8e109c1208 tests/single-pixel-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
22b1a7003d tests/safe-signal-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
02f042b5c3 tests/safe-signal-output-removal-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
7b33e1fd11 tests/roles-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
3f93f3b55c tests/presentation-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
13bc882911 tests/pointer-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
2c134cfc8e tests/pointer-shot-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
b29e1232c3 tests/plugin-registry-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
c2298892f9 tests/paint-node-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
65b7469da8 tests/output-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
90d1a4887d tests/output-decorations-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
f6f4a780e6 tests/output-damage-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
9e5076bea2 tests/output-capture-protocol-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
40d6ca2f55 tests/matrix-transform-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
df11a7a938 tests/matrix-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
05ee5b741e tests/lua-shell-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
21645ceafb tests/linux-explicit-synchronization-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
0d4f42e3fa tests/lcms-util-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
192a396fe6 tests/kiosk-shell-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
8dcbc9d5b2 tests/keyboard-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