tests: break out on client_capture_output() error

If the Wayland connection died, this code path ended up in an endless
loop, because test-asserts do not abort. Break out to fix this. The
test-assert records the failure, so not need to do more.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen 2025-11-06 15:58:55 +02:00
parent 65554abd88
commit 12334b3e75

View file

@ -2013,7 +2013,8 @@ client_capture_output(struct client *client,
weston_capture_source_v1_capture(capt.source, buf->proxy);
while (!capt.complete)
test_assert_int_ge(wl_display_dispatch(client->wl_display), 0);
if (!test_assert_int_ge(wl_display_dispatch(client->wl_display), 0))
break;
weston_capture_source_v1_destroy(capt.source);
weston_capture_v1_destroy(capt.factory);