haltest: add line coverage excluding comments 95/246095/1
authorJunkyeong Kim <jk0430.kim@samsung.com>
Fri, 23 Oct 2020 10:17:45 +0000 (19:17 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Fri, 23 Oct 2020 10:17:48 +0000 (19:17 +0900)
exclude virtual output related codes. (default off on mobile)
exclude output commit reated codes. (vendor driven hwc is default)
exclude hwc commit vblank related codes. (default off)

Change-Id: I50c6f8625b63d192c464080f47a1eb791f984064
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/tdm_display.c
src/tdm_hwc.c
src/tdm_output.c
src/tdm_server.c

index e6c6df8..6603603 100644 (file)
@@ -371,6 +371,7 @@ tdm_display_call_thread_cb_output_create(tdm_private_display *private_display, t
        return TDM_ERROR_NONE;
 }
 
+/* LCOV_EXCL_START */
 INTERN void
 tdm_display_thread_cb_output_create(tdm_private_display *private_display, void *object, tdm_thread_cb_base *cb_base, void *user_data)
 {
@@ -466,6 +467,7 @@ tdm_display_remove_output_create_handler(tdm_display *dpy,
 
        _pthread_mutex_unlock(&private_display->lock);
 }
+/* LCOV_EXCL_STOP */
 
 EXTERN tdm_error
 tdm_display_get_capabilities(tdm_display *dpy,
@@ -1016,6 +1018,7 @@ tdm_module_check_abi(tdm_private_module *private_module, int abimaj, int abimin)
        return 1;
 }
 
+/* LCOV_EXCL_START */
 INTERN tdm_voutput *
 tdm_display_voutput_create(tdm_display *dpy, const char *name, tdm_error *error)
 {
@@ -1138,3 +1141,4 @@ tdm_display_voutput_create(tdm_display *dpy, const char *name, tdm_error *error)
 
        return private_voutput;
 }
+/* LCOV_EXCL_STOP */
index a0109bf..ccf85ce 100644 (file)
@@ -194,6 +194,7 @@ _tdm_hwc_cb_commit(tdm_hwc *hwc_backend, unsigned int sequence,
        TDM_WARNING_IF_FAIL(ret == TDM_ERROR_NONE);
 }
 
+/* LCOV_EXCL_START */
 static void
 _tdm_hwc_got_wait_vblank(unsigned int sequence,
                                                 unsigned int tv_sec, unsigned int tv_usec, void *user_data)
@@ -284,6 +285,7 @@ _tdm_hwc_vblank(tdm_private_hwc *private_hwc, tdm_private_hwc_commit_handler *hw
 done:
        return ret;
 }
+/* LCOV_EXCL_STOP */
 
 INTERN tdm_error
 tdm_hwc_init(tdm_private_display *private_display)
@@ -793,6 +795,7 @@ tdm_hwc_commit(tdm_hwc *hwc, int sync, tdm_hwc_commit_handler func, void *user_d
        TDM_GOTO_IF_FAIL(ret == TDM_ERROR_NONE, commit_failed);
 
        if (hwc_use_vblank) {
+               /* LCOV_EXCL_START */
                ret = _tdm_hwc_vblank(private_hwc, hwc_commit_handler);
                if (ret == TDM_ERROR_NONE) {
                        if (tdm_debug_module & TDM_DEBUG_COMMIT)
@@ -800,6 +803,7 @@ tdm_hwc_commit(tdm_hwc *hwc, int sync, tdm_hwc_commit_handler func, void *user_d
                                        private_hwc->index, hwc_commit_handler, func, user_data);
                } else
                        goto commit_failed;
+               /* LCOV_EXCL_STOP */
        } else {
                if (tdm_debug_module & TDM_DEBUG_COMMIT)
                        TDM_INFO("hwc(%d) backend commit: handle(%p) func(%p) user_data(%p)",
index 9dc60a9..c7cf2c6 100644 (file)
@@ -159,6 +159,7 @@ tdm_output_call_thread_cb_destroy(tdm_private_output *private_output)
        return TDM_ERROR_NONE;
 }
 
+/* LCOV_EXCL_START */
 INTERN void
 tdm_output_thread_cb_destroy(tdm_private_display *private_display, void *object, tdm_thread_cb_base *cb_base, void *user_data)
 {
@@ -254,6 +255,7 @@ tdm_output_remove_destroy_handler(tdm_output *output,
 
        _pthread_mutex_unlock(&private_display->lock);
 }
+/* LCOV_EXCL_STOP */
 
 EXTERN tdm_module *
 tdm_output_get_backend_module(tdm_output *output, tdm_error *error)
@@ -401,6 +403,7 @@ _tdm_output_call_thread_cb_dpms(tdm_private_output *private_output, tdm_output_d
        return TDM_ERROR_NONE;
 }
 
+/* LCOV_EXCL_START */
 INTERN void
 tdm_output_cb_status(tdm_output *output_backend, tdm_output_conn_status status, void *user_data)
 {
@@ -438,6 +441,7 @@ tdm_output_cb_dpms(tdm_output *output_backend, tdm_output_dpms dpms, void *user_
        ret = _tdm_output_call_thread_cb_dpms(private_output, dpms);
        TDM_WARNING_IF_FAIL(ret == TDM_ERROR_NONE);
 }
+/* LCOV_EXCL_STOP */
 
 EXTERN tdm_error
 tdm_output_add_change_handler(tdm_output *output,
@@ -501,6 +505,7 @@ tdm_output_add_change_handler(tdm_output *output,
        return ret;
 }
 
+/* LCOV_EXCL_START */
 EXTERN tdm_error
 tdm_output_add_mode_change_request_handler(tdm_output *output,
                                                                                   tdm_output_mode_change_request_handler func,
@@ -579,6 +584,7 @@ tdm_output_remove_mode_change_request_handler(tdm_output *output,
 
        return TDM_ERROR_INVALID_PARAMETER;
 }
+/* LCOV_EXCL_STOP */
 
 EXTERN void
 tdm_output_remove_change_handler(tdm_output *output,
@@ -1000,6 +1006,7 @@ _tdm_output_cb_vblank(tdm_output *output_backend, unsigned int sequence,
        TDM_WARNING_IF_FAIL(ret == TDM_ERROR_NONE);
 }
 
+/* LCOV_EXCL_START */
 static void
 _tdm_output_thread_cb_commit(tdm_private_display *private_display, void *object, tdm_thread_cb_base *cb_base, void *user_data)
 {
@@ -1075,7 +1082,9 @@ _tdm_output_cb_commit(tdm_output *output_backend, unsigned int sequence,
        ret = tdm_thread_cb_call(private_output, &output_commit.base, 1);
        TDM_WARNING_IF_FAIL(ret == TDM_ERROR_NONE);
 }
+/* LCOV_EXCL_STOP */
 
+/* LCOV_EXCL_START */
 static void
 _tdm_voutput_thread_cb_commit(tdm_private_display *private_display, void *object, tdm_thread_cb_base *cb_base, void *user_data)
 {
@@ -1156,6 +1165,7 @@ _tdm_voutput_cb_commit(tdm_voutput *voutput_backend, unsigned int sequence,
        ret = tdm_thread_cb_call(private_voutput, &voutput_commit.base, 1);
        TDM_WARNING_IF_FAIL(ret == TDM_ERROR_NONE);
 }
+/* LCOV_EXCL_STOP */
 
 /* add_front: To distinguish between the user vblank handlers and the layer
  *            commit vblank handlers. The layer commit handlers will be called
@@ -1334,6 +1344,7 @@ tdm_output_remove_vblank_handler_internal(tdm_output *output, tdm_output_vblank_
        }
 }
 
+/* LCOV_EXCL_START */
 INTERN void
 tdm_output_remove_commit_handler_internal(tdm_output *output, tdm_output_commit_handler func, void *user_data)
 {
@@ -1352,6 +1363,7 @@ tdm_output_remove_commit_handler_internal(tdm_output *output, tdm_output_commit_
                }
        }
 }
+/* LCOV_EXCL_STOP */
 
 EXTERN tdm_error
 tdm_output_remove_vblank_handler(tdm_output *output, tdm_output_vblank_handler func, void *user_data)
@@ -1367,6 +1379,7 @@ tdm_output_remove_vblank_handler(tdm_output *output, tdm_output_vblank_handler f
        return ret;
 }
 
+/* LCOV_EXCL_START */
 EXTERN tdm_error
 tdm_output_remove_commit_handler(tdm_output *output, tdm_output_commit_handler func, void *user_data)
 {
@@ -1380,7 +1393,9 @@ tdm_output_remove_commit_handler(tdm_output *output, tdm_output_commit_handler f
 
        return ret;
 }
+/* LCOV_EXCL_STOP */
 
+/* LCOV_EXCL_START */
 INTERN void
 tdm_output_request_mode_set(tdm_output *output, unsigned int index)
 {
@@ -1448,11 +1463,9 @@ tdm_output_set_voutput_commit(tdm_voutput *voutput)
 
        voutput_commit_handler = calloc(1, sizeof(tdm_private_voutput_commit_handler));
        if (!voutput_commit_handler) {
-               /* LCOV_EXCL_START */
                TDM_ERR("failed: alloc memory");
                _pthread_mutex_unlock(&private_display->lock);
                return TDM_ERROR_OUT_OF_MEMORY;
-               /* LCOV_EXCL_STOP */
        }
 
        ret = tdm_thread_cb_add(private_output->private_voutput, TDM_THREAD_CB_VOUTPUT_COMMIT, voutput_commit_handler, _tdm_voutput_thread_cb_commit, NULL);
@@ -1528,6 +1541,7 @@ tdm_output_unset_voutput_commit(tdm_voutput *voutput)
 
        return TDM_ERROR_NONE;
 }
+/* LCOV_EXCL_STOP */
 
 /* LCOV_EXCL_START */
 INTERN tdm_error
@@ -2166,6 +2180,7 @@ tdm_output_choose_commit_per_vblank_mode(tdm_private_output *private_output, int
        return TDM_ERROR_NONE;
 }
 
+/* LCOV_EXCL_START */
 INTERN tdm_error
 tdm_voutput_destroy(tdm_voutput *voutput)
 {
@@ -2319,7 +2334,6 @@ tdm_voutput_disconnect(tdm_voutput *voutput)
        return ret;
 }
 
-/* LCOV_EXCL_START */
 INTERN tdm_error
 tdm_voutput_set_commit_func(tdm_voutput *voutput, tdm_voutput_commit_handler func)
 {
index a54e482..7e8fb20 100644 (file)
@@ -821,6 +821,7 @@ _tdm_server_cb_create_output(struct wl_client *client, struct wl_resource *resou
        }
 }
 
+/* LCOV_EXCL_START */
 static void _tdm_voutput_cb_destroy(struct wl_client *client, struct wl_resource *resource)
 {
        wl_resource_destroy(resource);
@@ -1173,25 +1174,17 @@ _tdm_output_get_voutput_buffer(tdm_server_voutput_info *voutput_info, tbm_surfac
        tbm_surface_internal_ref(buffer);
        voutput_buffer = calloc(1, sizeof *voutput_buffer);
        if (!voutput_buffer) {
-               /* LCOV_EXCL_START */
-
                TDM_ERR("fail calloc");
                tbm_surface_internal_unref(buffer);
                return NULL;
-
-               /* LCOV_EXCL_STOP */
        }
 
        voutput_buffer->wl_buffer = _tdm_voutput_export_buffer(voutput_info, buffer);
        if (!voutput_buffer->wl_buffer) {
-               /* LCOV_EXCL_START */
-
                TDM_ERR("fail export buffer");
                free(voutput_buffer);
                tbm_surface_internal_unref(buffer);
                return NULL;
-
-               /* LCOV_EXCL_STOP */
        }
 
        voutput_buffer->buffer = buffer;
@@ -1371,6 +1364,7 @@ _tdm_server_cb_create_virtual_output(struct wl_client *client, struct wl_resourc
 
        wl_tdm_voutput_send_ack_message(voutput_resource, WL_TDM_VOUTPUT_MESSAGE_ADDED);
 }
+/* LCOV_EXCL_STOP */
 
 /* LCOV_EXCL_START */
 static void