tests: proper weston_test_surface_create()
struct weston_test_surface in the test harness' compositor plugin had no tear down code, which lead to ASan report on alpha-blending test: Direct leak of 64 byte(s) in 2 object(s) allocated from: #0 0x7f8931f10330 in __interceptor_malloc (/lib/x86_64-linux-gnu/libasan.so.5+0xe9330) #1 0x7f892d934425 in move_surface ../../git/weston/tests/weston-test.c:181 #2 0x7f893159d8ed in ffi_call_unix64 (/lib/x86_64-linux-gnu/libffi.so.6+0x68ed) While at it, let's do this properly for once: - put the creation in a new function - hook up to the weston_surface destroy signal so this actually gets freed (fixes the leak) - check that we don't overwrite another surface role - check that committed_private actually is ours - set the surface label func so it gets properly listed in debugs and traces - use the proper surface role setup call, so no-one stomps on anyones toes if a test makes a mistake by using a wrong wl_surface Signed-off-by:Pekka Paalanen <pekka.paalanen@collabora.com>
parent
33b29bbb
No related branches found
No related tags found
Please register or sign in to comment