mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-03-14 05:34:56 -04:00
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>
This commit is contained in:
parent
555d3b8a9b
commit
e449232f37
3 changed files with 32 additions and 13 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue