tests/wayland: Print error messages for wl_display_dispatch()

Failing in `wait_for_effects_completed()` or `wait_for_view_verified()
indicates client- or compositor-bugs. As hitting those is quite likely
during test development, print error messages to simplify debugging.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2246>
This commit is contained in:
Robert Mader 2022-07-29 13:42:51 +02:00 committed by Marge Bot
parent 2cb7499735
commit 45ccf10e2a

View File

@ -401,7 +401,7 @@ wait_for_effects_completed (WaylandDisplay *display,
while (effects_complete_callback) while (effects_complete_callback)
{ {
if (wl_display_dispatch (display->display) == -1) if (wl_display_dispatch (display->display) == -1)
exit (EXIT_FAILURE); g_error ("%s: Failed to dispatch Wayland display", __func__);
} }
} }
@ -430,6 +430,6 @@ wait_for_view_verified (WaylandDisplay *display,
while (view_verification_callback) while (view_verification_callback)
{ {
if (wl_display_dispatch (display->display) == -1) if (wl_display_dispatch (display->display) == -1)
exit (EXIT_FAILURE); g_error ("%s: Failed to dispatch Wayland display", __func__);
} }
} }