Omit some codes from line coverage 39/231639/2
authorSeonah Moon <seonah1.moon@samsung.com>
Thu, 23 Apr 2020 07:00:33 +0000 (16:00 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Mon, 27 Apr 2020 08:12:35 +0000 (17:12 +0900)
Some codes related with peer, datapath and so on couldn't be checked by
auto TCT.

Change-Id: If83d468bf4e5720a3e48c1a168556cd617354132

src/wifi-aware-data-path.c
src/wifi-aware-gdbus.c
src/wifi-aware-peer.c
src/wifi-aware-private.c

index 949f9aa..fe565e6 100644 (file)
@@ -69,6 +69,7 @@ static bool __is_valid_wifi_aware_security_type(wifi_aware_security_type_e secur
                && security_type <= WIFI_AWARE_SECURITY_TYPE_PMK;
 }
 
+//LCOV_EXCL_START
 static uint32_t __data_path_get_ndp_id(wifi_aware_data_path_h data_path)
 {
        wifi_aware_data_path_s *ndp = (wifi_aware_data_path_s *)data_path;
@@ -470,8 +471,9 @@ int _wifi_aware_data_path_unset_terminated_cb(wifi_aware_data_path_h data_path)
                wifi_aware_gdbus_deregister_signal(DATA_PATH_TERMINATED_SIGNAL);
 
        ndp->terminated_signal_id = 0;
-               
+
        __WIFI_AWARE_FUNC_ENTER__;
 
        return ret;
 }
+//LCOV_EXCL_STOP
index 194649c..353c4bd 100644 (file)
@@ -674,6 +674,7 @@ int wifi_aware_gdbus_update_subscribe(wifi_aware_session_h session,
        return ret;
 }
 
+//LCOV_EXCL_START
 int wifi_aware_gdbus_followup(wifi_aware_session_h session,
                int client_id, uint16_t pub_sub_id, unsigned int peer_id,
                const unsigned char *message, size_t len,
@@ -817,4 +818,4 @@ int wifi_aware_gdbus_ndp_close(wifi_aware_data_path_h data_path,
        __WIFI_AWARE_FUNC_EXIT__;
        return ret;
 }
-
+//LCOV_EXCL_STOP
index ec318f5..a2c5ad6 100644 (file)
@@ -28,6 +28,7 @@ typedef struct {
        unsigned char mac[WIFI_AWARE_MAC_ADDRESS_LEN];
 } wifi_aware_peer_s;
 
+//LCOV_EXCL_START
 int _wifi_aware_peer_create(wifi_aware_peer_h *peer, unsigned int peer_id)
 {
        wifi_aware_peer_s *peer_handle = (wifi_aware_peer_s *)g_try_malloc0(sizeof(wifi_aware_peer_s));
@@ -108,3 +109,4 @@ void _wifi_aware_peer_set_mac(wifi_aware_peer_h  peer, unsigned char *mac)
        wifi_aware_peer_s *handle = (wifi_aware_peer_s *)peer;
        memcpy(handle->mac, mac, WIFI_AWARE_MAC_ADDRESS_LEN);
 }
+//LCOV_EXCL_STOP
index 41071b4..af87a31 100644 (file)
@@ -281,6 +281,7 @@ static void __wifi_aware_publish_invoke_callback(wifi_aware_session_h session,
        }
 }
 
+//LCOV_EXCL_START
 static void __wifi_aware_discovered_cb(wifi_aware_session_h session, wifi_aware_peer_h peer,
                const unsigned char *specific_info, size_t specific_info_len, int distance)
 {
@@ -313,6 +314,7 @@ static void __wifi_aware_session_terminated_cb(wifi_aware_session_h session, int
        if (handle->terminated_cb)
                handle->terminated_cb(session, reason, handle->terminated_cb_data);
 }
+//LCOV_EXCL_STOP
 
 static wifi_aware_error_e __get_dbus_result(GObject *src, GAsyncResult *res, uint16_t *id)
 {
@@ -609,6 +611,7 @@ static void __parsing_session_terminated_event(GVariant *parameters, uint16_t *p
        g_variant_get(parameters, "(qi)", pub_sub_id, reason);
 }
 
+//LCOV_EXCL_START
 static void __session_terminated_cb(GDBusConnection *connection,
                    const gchar *sender, const gchar *object_path,
                     const gchar *interface, const gchar *signal,
@@ -630,6 +633,7 @@ static void __session_terminated_cb(GDBusConnection *connection,
        __session_set_pub_sub_id(session, 0);
        __wifi_aware_session_terminated_cb(session, (wifi_aware_termination_reason_e)reason);
 }
+//LCOV_EXCL_STOP
 
 void _wifi_aware_session_set_terminated_cb(wifi_aware_session_h session,
                wifi_aware_session_terminated_cb callback, void *user_data)
@@ -1011,6 +1015,7 @@ static bool __unpack_byte_array(unsigned char *array, GVariant *var, uint16_t le
        return true;
 }
 
+//LCOV_EXCL_START
 static bool __parsing_service_discovered_event(GVariant *parameters,
                uint16_t *sub_id, unsigned int *peer_id, unsigned char *peer_mac,
                unsigned char *specific_info, size_t *specific_info_len, int *distance)
@@ -1160,6 +1165,7 @@ static void __message_received_cb(GDBusConnection *connection,
        _wifi_aware_peer_set_mac(peer, peer_mac);
        __wifi_aware_received_cb(session, peer, message, message_len);
 }
+//LCOV_EXCL_STOP
 
 int _wifi_aware_set_service_discovered_cb(wifi_aware_session_h session,
                wifi_aware_service_discovered_cb callback, void *user_data)
@@ -1243,6 +1249,7 @@ void __destroy_message_data(wifi_aware_message_s *message)
        g_free(message);
 }
 
+//LCOV_EXCL_START
 static void __wifi_aware_followup_invoke_callback(wifi_aware_message_s *message, wifi_aware_error_e error)
 {
        if (message && message->callback) {
@@ -1307,3 +1314,4 @@ int _wifi_aware_send_message(wifi_aware_session_h session,
                        __send_message_reply,
                        message_data);
 }
+//LCOV_EXCL_STOP