tests: Fix race condition in send overflow test
authorManuel Stoeckl <code@mstoeckl.com>
Wed, 25 Dec 2019 04:57:29 +0000 (23:57 -0500)
committerPekka Paalanen <pq@iki.fi>
Wed, 15 Jan 2020 13:18:56 +0000 (13:18 +0000)
commite449232f37256a7db3311399b311984271efa1e7
treea223d03007efa0255e0a46b94196799ebf5e6cad
parent555d3b8a9b5214a30774019a341f96759c75de02
tests: Fix race condition in send overflow test

This change ensures that the compositor process is not able to respond
to any of the noop requests sent by the client process, by using the
test compositor's `stop_display` mechanism to coordinate when the
compositor should stop processing messages.

(Before this change, it was possible that one of the calls of
wl_event_loop_dispatch in the compositor process could respond to all
the client's noop requests before returning.)

Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
tests/display-test.c
tests/test-compositor.c
tests/test-compositor.h