diff --git a/tests/color-management-parametric-test.c b/tests/color-management-parametric-test.c index a3a742a2b..a456e6af2 100644 --- a/tests/color-management-parametric-test.c +++ b/tests/color-management-parametric-test.c @@ -721,7 +721,8 @@ TEST_P(create_parametric_image_description, good_test_cases) image_desc_creator_param = NULL; while (image_desc->status == CM_IMAGE_DESC_NOT_CREATED) - test_assert_int_ge(wl_display_dispatch(client->wl_display), 0); + if (!test_assert_int_ge(wl_display_dispatch(client->wl_display), 0)) + return RESULT_FAIL; test_assert_enum(image_desc->status, CM_IMAGE_DESC_READY); image_description_destroy(image_desc); @@ -837,7 +838,8 @@ TEST_P(fail_to_create_parametric_image_description, bad_test_cases) } while (image_desc->status == CM_IMAGE_DESC_NOT_CREATED) - test_assert_int_ge(wl_display_dispatch(client->wl_display), 0); + if (!test_assert_int_ge(wl_display_dispatch(client->wl_display), 0)) + return RESULT_FAIL; /* This TEST() is for bad params, so we shouldn't be able to * successfully create an image description. */ diff --git a/tests/color-management-test.c b/tests/color-management-test.c index 5cd618dde..9369ec45a 100644 --- a/tests/color-management-test.c +++ b/tests/color-management-test.c @@ -784,7 +784,8 @@ wait_until_image_description_ready(struct client *client, struct image_description *image_descr) { while (image_descr->status == CM_IMAGE_DESC_NOT_CREATED) - test_assert_int_ge(wl_display_dispatch(client->wl_display), 0); + if (!test_assert_int_ge(wl_display_dispatch(client->wl_display), 0)) + break; test_assert_enum(image_descr->status, CM_IMAGE_DESC_READY); } diff --git a/tests/output-capture-protocol-test.c b/tests/output-capture-protocol-test.c index 26470232e..e2e32dd35 100644 --- a/tests/output-capture-protocol-test.c +++ b/tests/output-capture-protocol-test.c @@ -249,7 +249,8 @@ TEST(simple_shot) weston_capture_source_v1_capture(capt->source, buf->proxy); while (!capt->events.reply) - test_assert_int_ge(wl_display_dispatch(client->wl_display), 0); + if (!test_assert_int_ge(wl_display_dispatch(client->wl_display), 0)) + return RESULT_FAIL; test_assert_enum(capt->state, CAPTURE_TASK_COMPLETE); @@ -292,7 +293,8 @@ TEST(retry_on_wrong_format) weston_capture_source_v1_capture(capt->source, buf->proxy); while (!capt->events.reply) - test_assert_int_ge(wl_display_dispatch(client->wl_display), 0); + if (!test_assert_int_ge(wl_display_dispatch(client->wl_display), 0)) + return RESULT_FAIL; test_assert_enum(capt->state, CAPTURE_TASK_RETRY); @@ -331,7 +333,8 @@ TEST(retry_on_wrong_size) weston_capture_source_v1_capture(capt->source, buf->proxy); while (!capt->events.reply) - test_assert_int_ge(wl_display_dispatch(client->wl_display), 0); + if (!test_assert_int_ge(wl_display_dispatch(client->wl_display), 0)) + return RESULT_FAIL; test_assert_enum(capt->state, CAPTURE_TASK_RETRY); diff --git a/tests/presentation-test.c b/tests/presentation-test.c index 96d15c8cf..68e86d678 100644 --- a/tests/presentation-test.c +++ b/tests/presentation-test.c @@ -165,7 +165,8 @@ static void feedback_wait(struct feedback *fb) { while (fb->result == FB_PENDING) { - test_assert_int_ge(wl_display_dispatch(fb->client->wl_display), 0); + if (!test_assert_int_ge(wl_display_dispatch(fb->client->wl_display), 0)) + break; } }