diff options
| author | Manuel Stoeckl <code@mstoeckl.com> | 2019-12-24 23:57:29 -0500 |
|---|---|---|
| committer | Pekka Paalanen <pq@iki.fi> | 2020-01-15 13:18:56 +0000 |
| commit | e449232f37256a7db3311399b311984271efa1e7 (patch) | |
| tree | a223d03007efa0255e0a46b94196799ebf5e6cad /tests/test-compositor.c | |
| parent | Revert "build: check wayland-scanner version" (diff) | |
| download | wayland-e449232f37256a7db3311399b311984271efa1e7.tar wayland-e449232f37256a7db3311399b311984271efa1e7.tar.gz wayland-e449232f37256a7db3311399b311984271efa1e7.tar.bz2 wayland-e449232f37256a7db3311399b311984271efa1e7.tar.lz wayland-e449232f37256a7db3311399b311984271efa1e7.tar.xz wayland-e449232f37256a7db3311399b311984271efa1e7.tar.zst wayland-e449232f37256a7db3311399b311984271efa1e7.zip | |
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>
Diffstat (limited to 'tests/test-compositor.c')
| -rw-r--r-- | tests/test-compositor.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test-compositor.c b/tests/test-compositor.c index bd2b015..468ee56 100644 --- a/tests/test-compositor.c +++ b/tests/test-compositor.c @@ -366,7 +366,7 @@ display_run(struct display *d) } void -display_resume(struct display *d) +display_post_resume_events(struct display *d) { struct wfr *wfr, *next; @@ -380,7 +380,12 @@ display_resume(struct display *d) assert(wl_list_empty(&d->waiting_for_resume)); d->wfr_num = 0; +} +void +display_resume(struct display *d) +{ + display_post_resume_events(d); wl_display_run(d->wl_display); } |
