Excluded some lines and block coverage 89/132889/1 submit/tizen/20170608.073827
authortaesub kim <taesub.kim@samsung.com>
Thu, 8 Jun 2017 07:14:31 +0000 (16:14 +0900)
committertaesub kim <taesub.kim@samsung.com>
Thu, 8 Jun 2017 07:14:44 +0000 (16:14 +0900)
Change-Id: I2ef8f876f9e53cbac3aa8fd07c268ba17d7bdf84
Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
src/network_dbus.c
src/network_interface.c
src/wifi_internal.c
src/wifi_manager.c
src/wifi_tdls.c

index d64d42b..b5e5a42 100755 (executable)
@@ -791,7 +791,7 @@ int _net_dbus_get_scan_state(int *scanstate)
                        CONNMAN_TECHNOLOGY_INTERFACE, method, NULL, &Error);
 
        if (message == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Failed to get scan state\n");
+               WIFI_LOG(WIFI_ERROR, "Failed to get scan state\n"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__;
                return Error;
        }
@@ -813,6 +813,7 @@ int _net_dbus_get_scan_state(int *scanstate)
        return Error;
 }
 
+//LCOV_EXCL_START
 int _net_dbus_set_bgscan_mode(net_wifi_background_scan_mode_e mode)
 {
        __NETWORK_FUNC_ENTER__;
@@ -837,6 +838,7 @@ int _net_dbus_set_bgscan_mode(net_wifi_background_scan_mode_e mode)
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
+//LCOV_EXCL_STOP
 
 int _net_dbus_get_technology_state(network_tech_state_info_s* tech_state)
 {
@@ -1029,6 +1031,7 @@ int _net_dbus_set_agent_passphrase_and_connect(
        return Error;
 }
 
+//LCOV_EXCL_START
 int _net_dbus_set_agent_fields_and_connect(const char *ssid,
                const char *passphrase, const char *profilename)
 {
@@ -1071,7 +1074,6 @@ int _net_dbus_set_agent_fields_and_connect(const char *ssid,
        return Error;
 }
 
-//LCOV_EXCL_START
 int _net_dbus_get_wps_pin(char **wps_pin)
 {
        __NETWORK_FUNC_ENTER__;
@@ -1268,6 +1270,7 @@ error:
        return Error;
 }
 
+//LCOV_EXCL_START
 int _net_dbus_set_profile_ipv4(net_profile_info_s* prof_info, char* profile_name)
 {
        __NETWORK_FUNC_ENTER__;
@@ -1325,7 +1328,6 @@ int _net_dbus_set_profile_ipv4(net_profile_info_s* prof_info, char* profile_name
 
        builder = g_variant_builder_new(G_VARIANT_TYPE("a{sv}"));
 
-       //LCOV_EXCL_START
        if (profile_net_info->IpConfigType == NET_IP_CONFIG_TYPE_DYNAMIC ||
            profile_net_info->IpConfigType == NET_IP_CONFIG_TYPE_AUTO_IP) {
 
@@ -1354,7 +1356,6 @@ int _net_dbus_set_profile_ipv4(net_profile_info_s* prof_info, char* profile_name
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
-       //LCOV_EXCL_STOP
 
        params = g_variant_new("(sv)",
                        prop_ipv4_configuration, g_variant_builder_end(builder));
@@ -1376,7 +1377,6 @@ int _net_dbus_set_profile_ipv4(net_profile_info_s* prof_info, char* profile_name
        return Error;
 }
 
-//LCOV_EXCL_START
 int _net_dbus_set_profile_ipv6(net_profile_info_s* prof_info, char* profile_name)
 {
        __NETWORK_FUNC_ENTER__;
index b9dad48..75d061a 100755 (executable)
@@ -30,6 +30,7 @@
 __thread network_info_s NetworkInfo = { 0, };
 extern __thread network_request_table_s request_table[NETWORK_REQUEST_TYPE_MAX];
 
+//LCOV_EXCL_START
 static int __net_check_get_privilege()
 {
        __NETWORK_FUNC_ENTER__;
@@ -69,6 +70,7 @@ static int __net_check_profile_privilege()
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
+//LCOV_EXCL_STOP
 
 static int __net_get_prefix_len(const char *netmask)
 {
@@ -1291,8 +1293,8 @@ int net_init_profile_info(net_profile_info_s *ProfInfo)
        net_dev_info_s *net_info = NULL;
 
        if (ProfInfo == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Invalid Parameter\n");
-               return NET_ERR_INVALID_PARAM;
+               WIFI_LOG(WIFI_ERROR, "Invalid Parameter\n"); //LCOV_EXCL_LINE
+               return NET_ERR_INVALID_PARAM; //LCOV_EXCL_LINE
        }
 
        memset(ProfInfo, 0, sizeof(net_profile_info_s));
@@ -1800,7 +1802,7 @@ int net_wifi_get_scan_state(int *scanstate)
        net_err_e Error = NET_ERR_NONE;
 
        if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
+               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_APP_NOT_REGISTERED;
        }
@@ -1814,19 +1816,19 @@ int net_wifi_get_scan_state(int *scanstate)
        }
 
        if (request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE) {
-               WIFI_LOG(WIFI_ERROR, "Request in progress");
-               *scanstate = 1;
+               WIFI_LOG(WIFI_ERROR, "Request in progress"); //LCOV_EXCL_LINE
+               *scanstate = 1; //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__;
-               return NET_ERR_NONE;
+               return NET_ERR_NONE; //LCOV_EXCL_LINE
        }
 
        Error = _net_dbus_get_scan_state(scanstate);
        if (Error != NET_ERR_NONE) {
-               WIFI_LOG(WIFI_ERROR, "Failed to get scan state. Error [%s]",
+               WIFI_LOG(WIFI_ERROR, "Failed to get scan state. Error [%s]", //LCOV_EXCL_LINE
                                _net_print_error(Error));
 
                __NETWORK_FUNC_EXIT__;
-               return Error;
+               return Error; //LCOV_EXCL_LINE
        }
 
        __NETWORK_FUNC_EXIT__;
@@ -1960,7 +1962,6 @@ int net_get_wifi_state(net_wifi_state_e *current_state)
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
-//LCOV_EXCL_STOP
 
 int net_check_get_privilege()
 {
@@ -1992,7 +1993,6 @@ int net_check_profile_privilege()
        return Error;
 }
 
-//LCOV_EXCL_START
 int net_wifi_enroll_wps_without_ssid(net_wifi_wps_info_s *wps_info)
 {
        __NETWORK_FUNC_ENTER__;
@@ -2337,7 +2337,7 @@ gboolean net_check_ref_count(void)
        if (NetworkInfo.ref_count > 0)
                return TRUE;
 
-       return FALSE;
+       return FALSE; //LCOV_EXCL_LINE
 }
 
 int net_open_connection(const char *profile_name)
@@ -2421,8 +2421,8 @@ int net_close_connection(const char *profile_name)
        }
 
        if (_net_dbus_is_pending_call_used() == TRUE) {
-               is_connecting = __net_is_connecting(profile_name);
-               if (is_connecting == FALSE) {
+               is_connecting = __net_is_connecting(profile_name); //LCOV_EXCL_LINE
+               if (is_connecting == FALSE) { //LCOV_EXCL_LINE
                        WIFI_LOG(WIFI_ERROR, "pending call in progress"); //LCOV_EXCL_LINE
 
                        __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
@@ -2448,7 +2448,7 @@ int net_close_connection(const char *profile_name)
        }
 
        if (is_connecting == TRUE)
-               __net_abort_open_connection(profile_name);
+               __net_abort_open_connection(profile_name); //LCOV_EXCL_LINE
 
        __NETWORK_FUNC_EXIT__;
        return NET_ERR_NONE;
@@ -2832,7 +2832,6 @@ int net_config_load_eap_configurations(const gchar *config_id,
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
-//LCOV_EXCL_STOP
 
 int net_wifi_set_autoscan(gboolean autoscan)
 {
@@ -3037,3 +3036,5 @@ int net_foreach_ipv6_address(GSList **ipv6_address_list)
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
+
+//LCOV_EXCL_STOP
index ff56b19..d73a767 100755 (executable)
@@ -687,7 +687,7 @@ static void __disconnected_cb(wifi_manager_error_e result)
                }
        }
 }
-//LCOV_EXCL_STOP
+
 static void __tdls_discovered_cb(net_event_info_s *event_cb)
 {
        GSList *list;
@@ -748,6 +748,7 @@ static void __tdls_state_changed_cb(wifi_manager_tdls_state_e state,
                }
        }
 }
+//LCOV_EXCL_STOP
 
 static void _wifi_evt_cb(net_event_info_s *event_cb, void *user_data)
 {
@@ -929,8 +930,8 @@ int _wifi_init(void)
 
        rv = net_register_client_ext((net_event_cb)_wifi_evt_cb, NULL);
        if (rv != NET_ERR_NONE && rv != NET_ERR_APP_ALREADY_REGISTERED) {
-               WIFI_LOG(WIFI_ERROR, "Failed to register client [%d]", rv);
-               return rv;
+               WIFI_LOG(WIFI_ERROR, "Failed to register client [%d]", rv); //LCOV_EXCL_LINE
+               return rv; //LCOV_EXCL_LINE
        }
 
        return NET_ERR_NONE;
@@ -943,7 +944,7 @@ int _wifi_create_handle(wifi_manager_h *wifi)
        if (*wifi != NULL)
                WIFI_LOG(WIFI_INFO, "New handle create[%p]", *wifi);
        else {
-               WIFI_LOG(WIFI_ERROR, "Failed to create wifi handle");
+               WIFI_LOG(WIFI_ERROR, "Failed to create wifi handle"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
        }
 
@@ -1389,8 +1390,8 @@ int _wifi_get_hidden_aps(wifi_manager_h wifi, const char *essid,
                break;
        case WLAN_SEC_MODE_IEEE8021X:
        default:
-               WIFI_LOG(WIFI_INFO, "Invalid security type");
-               return WIFI_MANAGER_ERROR_OPERATION_FAILED;
+               WIFI_LOG(WIFI_INFO, "Invalid security type"); //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
        }
 
        g_strlcpy(profile_info->essid, essid, NET_WLAN_ESSID_LEN+1);
@@ -1624,6 +1625,7 @@ int _wifi_forget_ap(wifi_manager_ap_h ap)
        return WIFI_MANAGER_ERROR_NONE;
 }
 
+//LCOV_EXCL_START
 void _wifi_rssi_level_changed_cb(keynode_t *node, void *user_data)
 {
        GSList *list;
@@ -1756,6 +1758,7 @@ int _wifi_cancel_wps(void)
 
        return WIFI_MANAGER_ERROR_NONE;
 }
+//LCOV_EXCL_STOP
 
 bool _wifi_check_config_validity(wifi_manager_config_h config_h)
 {
@@ -2021,7 +2024,6 @@ int _wifi_configuration_get_passphrase(const gchar *config_id, gchar **passphras
 
        return WIFI_MANAGER_ERROR_NONE;
 }
-//LCOV_EXCL_STOP
 
 int _wifi_check_get_privilege()
 {
@@ -2048,6 +2050,7 @@ int _wifi_check_profile_privilege()
 
        return WIFI_MANAGER_ERROR_NONE;
 }
+//LCOV_EXCL_STOP
 
 bool __check_feature_supported(const char *key, wifi_supported_feature_e feature)
 {
@@ -2126,6 +2129,7 @@ tizen_profile_t _get_tizen_profile()
        return profile;
 }
 
+//LCOV_EXCL_START
 int _wifi_set_autoscan(bool autoscan)
 {
        int rv = 0;
@@ -2187,3 +2191,4 @@ int _wifi_get_autoscanmode(wifi_manager_autoscan_mode_e *autoscanmode)
 
        return WIFI_MANAGER_ERROR_NONE;
 }
+//LCOV_EXCL_STOP
index e000ff2..0157e95 100755 (executable)
@@ -726,9 +726,9 @@ EXPORT_API int wifi_manager_connect_by_wps_pbc_without_ssid(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
-       if (callback == NULL) {
-               WIFI_LOG(WIFI_ERROR, "[App<--TizenMW] Wrong Parameter Passed\n");
-               return WIFI_MANAGER_ERROR_INVALID_PARAMETER;
+       if (callback == NULL) { //LCOV_EXCL_LINE
+               WIFI_LOG(WIFI_ERROR, "[App<--TizenMW] Wrong Parameter Passed\n"); //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
        return _wifi_connect_with_wps_pbc_without_ssid(wifi, callback, user_data);
@@ -747,9 +747,9 @@ EXPORT_API int wifi_manager_connect_by_wps_pin_without_ssid(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
-       if (callback == NULL) {
-               WIFI_LOG(WIFI_ERROR, "[App<--TizenMW] Wrong Parameter Passed\n");
-               return WIFI_MANAGER_ERROR_INVALID_PARAMETER;
+       if (callback == NULL) { //LCOV_EXCL_LINE
+               WIFI_LOG(WIFI_ERROR, "[App<--TizenMW] Wrong Parameter Passed\n"); //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
        if ((NULL == pin) || ((strlen(pin) != 4) &&
@@ -782,6 +782,7 @@ EXPORT_API int wifi_manager_cancel_wps(wifi_manager_h wifi)
        return rv;
 }
 
+//LCOV_EXCL_START
 EXPORT_API int wifi_manager_set_autoscan(wifi_manager_h wifi, bool autoscan)
 {
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
@@ -843,4 +844,5 @@ EXPORT_API int wifi_manager_get_autoscan_mode(wifi_manager_h wifi,
 
        return _wifi_get_autoscanmode(mode);
 }
+//LCOV_EXCL_STOP
 
index 89c928e..1b9a92c 100755 (executable)
@@ -21,6 +21,7 @@
  * wifi tunneled direct link setup
  */
 
+//LCOV_EXCL_START
 int _wifi_set_tdls_discovered_cb(wifi_manager_h wifi, void *callback, void *user_data)
 {
        wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)wifi;
@@ -42,7 +43,6 @@ static int __wifi_set_tdls_connection_state_changed_cb(wifi_manager_h wifi,
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-//LCOV_EXCL_START
 EXPORT_API int wifi_manager_tdls_set_discovered_cb(wifi_manager_h wifi,
                wifi_manager_tdls_discovered_cb callback, void *user_data)
 {