tests: test if thread can block on error
tests: test if thread can block on error

wl_display_read_events() can make a thread wait until some other thread
ends reading. Normally it wakes up all threads after the reading is
done. But there's a place when it does not get to waking up the threads
- when an error occurs. This test reveals bug that can block programs.

If a thread is waiting in wl_display_read_events() and another thread
calls wl_display_read_events and the reading fails,
then the sleeping thread is not woken up. This is because
display_handle_error is using old pthread_cond instead of new
display->reader_cond, that was added along with wl_display_read_events().

Reviewed-by: Pekka Paalanen <0f6ae7001e34c37b02fb2c1c2573ddf8f442136a@collabora.co.uk>

bitfactor/wayland,tulcod/wayland,tulcod/wayland,abooij/wayland,mchalupa/wayland,bitfactor/wayland,eyolfson/wayland,bitfactor/wayland,sir-murray/wayland,eyolfson/wayland,mchalupa/wayland,abooij/wayland,eyolfson/wayland,tulcod/wayland,sir-murray/wayland,abooij/wayland,sir-murray/wayland,mchalupa/wayland