Commit Graph

5 Commits

Author SHA1 Message Date
Pekka Paalanen b0eb059818 tests: fix refname leaks
Reported by ASan.

Direct leak of 1468 byte(s) in 48 object(s) allocated from:
    #0 0x7f20d7ae0330 in __interceptor_malloc (/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
    #1 0x7f20d76894b7 in _IO_vasprintf /build/glibc-vjB4T1/glibc-2.28/libio/vasprintf.c:73
    #2 0x7f20d7a66827 in __interceptor_vasprintf (/lib/x86_64-linux-gnu/libasan.so.5+0x6f827)
    #3 0x7f20d7a66f76 in asprintf (/lib/x86_64-linux-gnu/libasan.so.5+0x6ff76)
    #4 0x5598e3fbcdfc in buffer_transform ../../git/weston/tests/buffer-transforms-test.c:122
    #5 0x5598e3fc9add in run_test ../../git/weston/tests/weston-test-runner.c:162
    #6 0x5598e3fca17e in run_case ../../git/weston/tests/weston-test-runner.c:277
    #7 0x5598e3fc9f24 in for_each_test_case ../../git/weston/tests/weston-test-runner.c:235
    #8 0x5598e3fca406 in testsuite_run ../../git/weston/tests/weston-test-runner.c:311
    #9 0x7f20d3523b6b in client_thread_routine ../../git/weston/tests/weston-test.c:479
    #10 0x7f20d75e8fa2 in start_thread /build/glibc-vjB4T1/glibc-2.28/nptl/pthread_create.c:486
    #11 0x7f20d770a4ce in clone (/lib/x86_64-linux-gnu/libc.so.6+0xf94ce)

Direct leak of 978 byte(s) in 42 object(s) allocated from:
    #0 0x7f26fed07330 in __interceptor_malloc (/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
    #1 0x7f26fe8b04b7 in _IO_vasprintf /build/glibc-vjB4T1/glibc-2.28/libio/vasprintf.c:73
    #2 0x7f26fec8d827 in __interceptor_vasprintf (/lib/x86_64-linux-gnu/libasan.so.5+0x6f827)
    #3 0x7f26fec8df76 in asprintf (/lib/x86_64-linux-gnu/libasan.so.5+0x6ff76)
    #4 0x55989ba8c2bc in output_damage ../../git/weston/tests/output-damage-test.c:201
    #5 0x55989ba8c0cb in wrapoutput_damage ../../git/weston/tests/output-damage-test.c:176
    #6 0x55989ba99131 in run_test ../../git/weston/tests/weston-test-runner.c:162
    #7 0x55989ba997d2 in run_case ../../git/weston/tests/weston-test-runner.c:277
    #8 0x55989ba99578 in for_each_test_case ../../git/weston/tests/weston-test-runner.c:235
    #9 0x55989ba99a5a in testsuite_run ../../git/weston/tests/weston-test-runner.c:311
    #10 0x7f26fa57ab6b in client_thread_routine ../../git/weston/tests/weston-test.c:479
    #11 0x7f26fe80ffa2 in start_thread /build/glibc-vjB4T1/glibc-2.28/nptl/pthread_create.c:486
    #12 0x7f26fe9314ce in clone (/lib/x86_64-linux-gnu/libc.so.6+0xf94ce)

Direct leak of 1696 byte(s) in 56 object(s) allocated from:
    #0 0x7f077107f330 in __interceptor_malloc (/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
    #1 0x7f0770c284b7 in _IO_vasprintf /build/glibc-vjB4T1/glibc-2.28/libio/vasprintf.c:73
    #2 0x7f0771005827 in __interceptor_vasprintf (/lib/x86_64-linux-gnu/libasan.so.5+0x6f827)
    #3 0x7f0771005f76 in asprintf (/lib/x86_64-linux-gnu/libasan.so.5+0x6ff76)
    #4 0x563e6ae36dfc in output_transform ../../git/weston/tests/output-transforms-test.c:122
    #5 0x563e6ae43add in run_test ../../git/weston/tests/weston-test-runner.c:162
    #6 0x563e6ae4417e in run_case ../../git/weston/tests/weston-test-runner.c:277
    #7 0x563e6ae43f24 in for_each_test_case ../../git/weston/tests/weston-test-runner.c:235
    #8 0x563e6ae44406 in testsuite_run ../../git/weston/tests/weston-test-runner.c:311
    #9 0x7f076ca26b6b in client_thread_routine ../../git/weston/tests/weston-test.c:479
    #10 0x7f0770b87fa2 in start_thread /build/glibc-vjB4T1/glibc-2.28/nptl/pthread_create.c:486
    #11 0x7f0770ca94ce in clone (/lib/x86_64-linux-gnu/libc.so.6+0xf94ce)

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-06-15 07:43:00 +00:00
Pekka Paalanen d2cfbff186 gl-renderer: use shadow framebuffer automatically
This creates the FP16 shadow framebuffer automatically if the color
transformation from blending space to output space is not identity and
the backend does not claim to implement it on the renderer's behalf.

That makes the weston_output_set_renderer_shadow_buffer() API and
use-renderer-shadow weston.ini option obsolete.

To still cater for the one test that needs to enable the shadow
framebuffer in spite of not needing it for color correct blending, the
quirk it uses now also forces the shadow.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-06-14 16:04:43 +03:00
Pekka Paalanen f1fb48ed28 tests: let output damage skip without color ops
If the compositor does not have the shadow buffer capability (implied by
the color ops capability bit), then trying to run the shadow buffer test
is useless, it would just fail. Let it skip instead.

Fixes: b1e56143c5

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-03-12 16:14:28 +02:00
Pekka Paalanen b1e56143c5 tests: extend output-damage to GL shadow framebuffer
Extend the existing output-damage test to test
blit_shadow_to_output() specifically. This function had problems
originally, so make sure they can't reappear.

The added quirk is explained in the test.

An additional check of the quirk in gl_renderer_output_create() ensures
that the shadow framebuffer is really used. The test could false-pass if
the shadow is not used.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-02-25 13:27:33 +02:00
Pekka Paalanen fbd4160474 tests: add output damage test
This test ensures that client submitted damage goes to the screen
correctly, regardless of output scale or transform.

The added quirk is explained in the test that uses it.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-02-25 12:54:17 +02:00