Commit graph

6 commits

Author SHA1 Message Date
Loïc Molinari 31a9a4831f tests: Only wait for frame callback when necessary
Some tests don't need to wait for the frame callback when a surface is
moved. This commit renames the move_client() helper function to
move_client_frame_sync() so that tests which need synchronisation must
explicitely request it. This allows to get 4 more tests using
repaint only on capture and to speed up runtime.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2024-02-22 14:26:32 +00:00
Loïc Molinari 343adb2acd tests: Speed up runtime using immediate repaint on capture
The test suite is throttled by the headless backend repaint
timer. This commit uses the headless refresh rate option to speed up
runtime by using the immediate repaint-only-on-capture mode by
default. Tests which don't support that mode yet override the refresh
value to use the highest rate possible.

Fixes #682

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2024-02-22 14:26:32 +00:00
Marius Vlad 1e16a5eb2d tests: Add the ability the specify the output name
In preparation of having multiple outputs available we should be able to
specify by its name. We just use the default one if none was set-up at all.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2023-01-25 17:55:39 +00:00
Philipp Zabel e3b64b6e76 tests: use enum weston_renderer_type
Now that enum weston_renderer_type is public, there is no need for a
local enum renderer_type in the tests.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
2023-01-18 14:16:41 +01:00
Pekka Paalanen ee1c1778bf tests: fix leak in surface_commit_color() in pointer-shot
Found by ASan, several leaks like:

Direct leak of 48 byte(s) in 2 object(s) allocated from:
    #0 0x7f35fdc9c518 in calloc (/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
    #1 0x55a77d6a4c6a in zalloc ../../git/weston/include/libweston/zalloc.h:38
    #2 0x55a77d6a748e in create_shm_buffer ../../git/weston/tests/weston-test-client-helper.c:459
    #3 0x55a77d6a78cd in create_shm_buffer_a8r8g8b8 ../../git/weston/tests/weston-test-client-helper.c:499
    #4 0x55a77d6a4145 in surface_commit_color ../../git/weston/tests/pointer-shot-test.c:89
    #5 0x55a77d6a4542 in pointer_cursor_retains_committed_buffer_after_reenter ../../git/weston/tests/pointer-shot-test.c:135
    #6 0x55a77d6a4207 in wrappointer_cursor_retains_committed_buffer_after_reenter ../../git/weston/tests/pointer-shot-test.c:98
    #7 0x55a77d6b15c2 in run_test ../../git/weston/tests/weston-test-runner.c:162
    #8 0x55a77d6b1c63 in run_case ../../git/weston/tests/weston-test-runner.c:277
    #9 0x55a77d6b1a09 in for_each_test_case ../../git/weston/tests/weston-test-runner.c:235
    #10 0x55a77d6b1eeb in testsuite_run ../../git/weston/tests/weston-test-runner.c:311
    #11 0x7f35f9510b6b in client_thread_routine ../../git/weston/tests/weston-test.c:479
    #12 0x7f35fd7a4fa2 in start_thread /build/glibc-vjB4T1/glibc-2.28/nptl/pthread_create.c:486
    #13 0x7f35fd8c64ce in clone (/lib/x86_64-linux-gnu/libc.so.6+0xf94ce)

Now this test has no more leaks.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-06-16 14:41:08 +00:00
Alexandros Frantzis 6ee80ecc9d tests: Add shot test for pointer cursor behavior
Add a regression test to verify that the cursor image is correctly
updated when setting a cursor surface with an already committed buffer
from a previous pointer entry, without recommitting a cursor buffer for
the current entry.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
2021-06-10 17:20:30 +03:00