summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeonah Moon <seonah1.moon@samsung.com>2020-04-23 16:00:33 +0900
committerSeonah Moon <seonah1.moon@samsung.com>2020-04-27 17:12:35 +0900
commitc08820018099a44f615a63269bb230a7d0b71e7e (patch)
tree48f9afe47d073673e5f236fc2edbb3d990c7b693
parent863e864935f33917f096cdf996bf813c9b9eacec (diff)
downloadwifi-aware-c08820018099a44f615a63269bb230a7d0b71e7e.tar.gz
wifi-aware-c08820018099a44f615a63269bb230a7d0b71e7e.tar.bz2
wifi-aware-c08820018099a44f615a63269bb230a7d0b71e7e.zip
Omit some codes from line coverage
Some codes related with peer, datapath and so on couldn't be checked by auto TCT. Change-Id: If83d468bf4e5720a3e48c1a168556cd617354132
-rw-r--r--src/wifi-aware-data-path.c4
-rw-r--r--src/wifi-aware-gdbus.c3
-rw-r--r--src/wifi-aware-peer.c2
-rw-r--r--src/wifi-aware-private.c8
4 files changed, 15 insertions, 2 deletions
diff --git a/src/wifi-aware-data-path.c b/src/wifi-aware-data-path.c
index 949f9aa..fe565e6 100644
--- a/src/wifi-aware-data-path.c
+++ b/src/wifi-aware-data-path.c
@@ -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
diff --git a/src/wifi-aware-gdbus.c b/src/wifi-aware-gdbus.c
index 194649c..353c4bd 100644
--- a/src/wifi-aware-gdbus.c
+++ b/src/wifi-aware-gdbus.c
@@ -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
diff --git a/src/wifi-aware-peer.c b/src/wifi-aware-peer.c
index ec318f5..a2c5ad6 100644
--- a/src/wifi-aware-peer.c
+++ b/src/wifi-aware-peer.c
@@ -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
diff --git a/src/wifi-aware-private.c b/src/wifi-aware-private.c
index 41071b4..af87a31 100644
--- a/src/wifi-aware-private.c
+++ b/src/wifi-aware-private.c
@@ -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