From: Inkyun Kil Date: Wed, 27 Sep 2017 05:21:58 +0000 (+0900) Subject: Exclude some lines from lcov X-Git-Tag: accepted/tizen/4.0/unified/20170929.080013~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35dc75027ebd4f3dec50c2c26fbdacbe5a50d14f;p=platform%2Fcore%2Fappfw%2Fmessage-port.git Exclude some lines from lcov Change-Id: Ice6a4bc985a6a4836a5fe5a23d54ac99a3a29c11 Signed-off-by: Inkyun Kil --- diff --git a/src/message_port_local.c b/src/message_port_local.c index 39b7ea6..cdc9c87 100755 --- a/src/message_port_local.c +++ b/src/message_port_local.c @@ -105,6 +105,7 @@ typedef struct delay_message { extern pthread_mutex_t mutex; +/* LCOV_EXCL_START */ static void __free_delay_message_info(delay_message_info_s *message) { if (message != NULL) { @@ -113,7 +114,9 @@ static void __free_delay_message_info(delay_message_info_s *message) FREE_AND_NULL(message); } } +/* LCOV_EXCL_STOP */ +/* LCOV_EXCL_START */ static void __free_list_delay_message_info(gpointer data) { delay_message_info_s *message = (delay_message_info_s *)data; @@ -121,7 +124,9 @@ static void __free_list_delay_message_info(gpointer data) if (message != NULL) __free_delay_message_info(message); } +/* LCOV_EXCL_STOP */ +/* LCOV_EXCL_START */ static void __clear_disconnect_socket(port_list_info_s *port_info) { GError *error = NULL; @@ -158,6 +163,7 @@ static void __clear_disconnect_socket(port_list_info_s *port_info) port_info->delayed_message_size = 0; port_info->send_sock_fd = 0; } +/* LCOV_EXCL_STOP */ /* LCOV_EXCL_START */ static void __free_port_info(gpointer data) @@ -469,6 +475,7 @@ out: return ret_val; } +/* LCOV_EXCL_START */ static int __send_delayed_message(int sockfd, delay_message_info_s *message) { unsigned int nb = 0; @@ -588,7 +595,9 @@ out: return ret; } +/* LCOV_EXCL_STOP */ +/* LCOV_EXCL_START */ static gboolean __process_delayed_message(gint fd, GIOCondition cond, gpointer data) { port_list_info_s *port_info = (port_list_info_s *)data; @@ -628,7 +637,9 @@ static gboolean __process_delayed_message(gint fd, GIOCondition cond, gpointer d return G_SOURCE_CONTINUE; } +/* LCOV_EXCL_STOP */ +/* LCOV_EXCL_START */ static int __insert_delayed_message(port_list_info_s *port_info, int sequence, bundle_raw *kb_data, @@ -702,6 +713,7 @@ out: return ret; } +/* LCOV_EXCL_STOP */ static int __message_port_send_async(port_list_info_s *port_info, bundle *kb, const char *local_port, bool local_trusted, bool is_bidirection) diff --git a/src/message_port_remote.c b/src/message_port_remote.c index 72b1df9..dc743f5 100755 --- a/src/message_port_remote.c +++ b/src/message_port_remote.c @@ -95,6 +95,7 @@ static void __callback_info_free(gpointer data) FREE_AND_NULL(callback_info); } +/* LCOV_EXCL_START */ static void __callback_info_free_by_info(message_port_callback_info_s *callback_info) { GList *callback_info_list = g_hash_table_lookup(__callback_info_hash, GUINT_TO_POINTER(callback_info->local_id)); @@ -111,6 +112,7 @@ static void __callback_info_free_by_info(message_port_callback_info_s *callback_ __callback_info_free(callback_info); g_list_free(find_list); } +/* LCOV_EXCL_STOP */ static void __hash_destroy_callback_info(gpointer data) { @@ -234,33 +236,41 @@ static message_port_pkt_s *__message_port_recv_raw(int fd) } if (read_string_from_socket(fd, (char **)&pkt->remote_port_name, &pkt->remote_port_name_len) != MESSAGE_PORT_ERROR_NONE) { +/* LCOV_EXCL_START */ LOGE("read socket fail: port_name"); free(pkt->remote_port_name); free(pkt); return NULL; +/* LCOV_EXCL_STOP */ } if (read_socket(fd, (char *)&pkt->is_bidirection, sizeof(pkt->is_bidirection), &nb) != MESSAGE_PORT_ERROR_NONE) { +/* LCOV_EXCL_START */ LOGE("read socket fail: is_bidirection"); free(pkt->remote_port_name); free(pkt); return NULL; +/* LCOV_EXCL_STOP */ } if (read_socket(fd, (char *)&pkt->is_trusted, sizeof(pkt->is_trusted), &nb) != MESSAGE_PORT_ERROR_NONE) { +/* LCOV_EXCL_START */ LOGE("read socket fail: is_trusted"); free(pkt->remote_port_name); free(pkt); return NULL; +/* LCOV_EXCL_STOP */ } if (read_string_from_socket(fd, (char **)&pkt->data, &pkt->data_len) != MESSAGE_PORT_ERROR_NONE) { +/* LCOV_EXCL_START */ LOGE("read socket fail: data"); if (pkt->data) free(pkt->data); free(pkt->remote_port_name); free(pkt); return NULL; +/* LCOV_EXCL_STOP */ } return pkt;