tests: check return value 24/171124/3
authorBoram Park <boram1288.park@samsung.com>
Mon, 26 Feb 2018 23:34:27 +0000 (08:34 +0900)
committerBoram Park <boram1288.park@samsung.com>
Tue, 27 Feb 2018 00:19:12 +0000 (09:19 +0900)
Change-Id: I8bfdfc486e9901ac810f28f760b9f56a2d14da32

tools/tdm_test_server.c

index db70668..bf5a8e2 100644 (file)
@@ -797,6 +797,7 @@ destroy(tdm_test_server *data)
        tdm_test_server_pp *p = NULL, *pp = NULL;
        tdm_test_server_capture *c = NULL, *cc = NULL;
        tdm_test_server_prop *w = NULL, *ww = NULL;
+       tdm_error ret;
        int i;
 
        LIST_FOR_EACH_ENTRY_SAFE(c, cc, &data->capture_list, link) {
@@ -815,7 +816,8 @@ destroy(tdm_test_server *data)
 
        LIST_FOR_EACH_ENTRY_SAFE(o, oo, &data->output_list, link) {
                LIST_FOR_EACH_ENTRY_SAFE(l, ll, &o->layer_list, link) {
-                       tdm_layer_unset_buffer(l->layer);
+                       ret = tdm_layer_unset_buffer(l->layer);
+                       TDM_WARNING_IF_FAIL(ret == TDM_ERROR_NONE);
                }
                tdm_layer_commit(l->layer, NULL, NULL);
        }
@@ -1042,7 +1044,8 @@ layer_show_buffer(tdm_test_server_layer *l, tbm_surface_h b)
        TDM_EXIT_IF_FAIL(tb != NULL);
 
        tb->in_use = 1;
-       tdm_buffer_add_release_handler(b, layer_cb_buffer_release, NULL);
+       ret = tdm_buffer_add_release_handler(b, layer_cb_buffer_release, NULL);
+       TDM_EXIT_IF_FAIL(ret == TDM_ERROR_NONE);
 
        if (data->do_vblank)
                ret = tdm_layer_commit(l->layer, layer_cb_commit, l);
@@ -1429,8 +1432,10 @@ run_test(tdm_test_server *data)
 
        printf("enter test loop\n");
 
-       while (1)
-               tdm_display_handle_events(data->display);
+       while (1) {
+               ret = tdm_display_handle_events(data->display);
+               TDM_EXIT_IF_FAIL(ret == TDM_ERROR_NONE);
+       }
 
        destroy(data);