From 12334b3e7592a6af6cae2adf90a50c1cdedb1e5a Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Thu, 6 Nov 2025 15:58:55 +0200 Subject: [PATCH] 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 --- tests/weston-test-client-helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c index c0296c61a..66c41c4f2 100644 --- a/tests/weston-test-client-helper.c +++ b/tests/weston-test-client-helper.c @@ -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);