Apply lcov block and line for line coverage 89/178289/1
authorhyunuktak <hyunuk.tak@samsung.com>
Wed, 9 May 2018 07:15:58 +0000 (16:15 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Wed, 9 May 2018 07:16:03 +0000 (16:16 +0900)
Change-Id: I5df6018685191256d719ade7e0d5a145e3bee37f
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
packaging/capi-network-wifi-manager.spec
src/network_dbus.c
src/network_interface.c
src/network_signal.c
src/wifi_internal.c
src/wifi_manager.c

index 71bbb2cfd05904c24d2204c4f0a89d977b4d23ff..654d5c8596bf1e57d2b79f8d032c57cbb7bef721 100755 (executable)
@@ -40,6 +40,7 @@ Test Application for Wi-Fi Manager
 
 %build
 export CFLAGS+=' -Wno-unused-local-typedefs'
+#export CFLAGS+=' -Wno-unused-local-typedefs -fprofile-arcs -ftest-coverage'
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
 cmake -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
       -DLIB_INSTALL_DIR=%{_libdir} -DINCLUDE_INSTALL_DIR=%{_includedir} \
index d48d388ad3884253203c504b669eff82ecf2cdb9..5ebfb8f18a22f13306d14fe5c72e086f5354bcd1 100755 (executable)
@@ -912,7 +912,6 @@ int _net_dbus_set_bgscan_mode(net_wifi_background_scan_mode_e mode)
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
-//LCOV_EXCL_STOP
 
 int _net_dbus_set_ip_conflict_period(unsigned int initial_time)
 {
@@ -936,6 +935,7 @@ int _net_dbus_set_ip_conflict_period(unsigned int initial_time)
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
+//LCOV_EXCL_STOP
 
 int _net_dbus_get_technology_state(network_tech_state_info_s* tech_state)
 {
@@ -1111,8 +1111,8 @@ int _net_dbus_set_agent_passphrase_and_connect(
        net_err_e Error = NET_ERR_NONE;
 
        if (NULL == passphrase || strlen(passphrase) <= 0 || NULL == profilename) {
-               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
-               return NET_ERR_INVALID_PARAM;
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter"); //LCOV_EXCL_LINE
+               return NET_ERR_INVALID_PARAM; //LCOV_EXCL_LINE
        }
 
        Error = __net_dbus_set_agent_field_and_connect(
@@ -1367,6 +1367,7 @@ error:
        return Error;
 }
 
+//LCOV_EXCL_START
 int _net_dbus_get_preferred_ipv6_address(const char *profilename, char **address)
 {
        __NETWORK_FUNC_ENTER__;
@@ -1400,7 +1401,6 @@ int _net_dbus_get_preferred_ipv6_address(const char *profilename, char **address
        return Error;
 }
 
-//LCOV_EXCL_START
 int _net_dbus_set_profile_ipv4(net_profile_info_s* prof_info, char* profile_name)
 {
        __NETWORK_FUNC_ENTER__;
@@ -1831,7 +1831,6 @@ int _net_dbus_set_proxy(net_profile_info_s* prof_info, char* profile_name)
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
-//LCOV_EXCL_STOP
 
 int _net_dbus_load_wifi_driver(gboolean wifi_picker_test)
 {
@@ -1948,7 +1947,6 @@ int _net_dbus_specific_scan_request(const char *ssid)
        return Error;
 }
 
-//LCOV_EXCL_START
 int _net_dbus_bssid_scan_request(void)
 {
        __NETWORK_FUNC_ENTER__;
@@ -3217,8 +3215,6 @@ int _net_dbus_get_autoscanmode(unsigned int *autoscanmode)
        return Error;
 }
 
-//LCOV_EXCL_STOP
-
 static void __net_multi_scan_request_reply(GObject *source_object, GAsyncResult *res,
                gpointer user_data)
 {
@@ -3330,3 +3326,4 @@ int _net_dbus_multi_scan_request(GSList *multi_scan_list)
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
+//LCOV_EXCL_STOP
index 8b04e6bad1f29fe09505def9b8cd7ca266a1e584..036bfa0f826d4786bbacff6a6a2e86af173a018c 100755 (executable)
@@ -2277,15 +2277,15 @@ int net_wifi_get_scan_state(int *scanstate)
 
        if (NetworkInfo.ref_count < 1) {
                WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
        }
 
        if (NetworkInfo.wifi_state == WIFI_OFF) {
                if ((NetworkInfo.wifi_state = _net_get_wifi_state(&Error)) == WIFI_OFF) {
-                       WIFI_LOG(WIFI_ERROR, "Wi-Fi powered off!");
-                       __NETWORK_FUNC_EXIT__;
-                       return NET_ERR_INVALID_OPERATION;
+                       WIFI_LOG(WIFI_ERROR, "Wi-Fi powered off!"); //LCOV_EXCL_LINE
+                       __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+                       return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
                }
        }
 
@@ -2850,10 +2850,11 @@ gboolean net_check_ref_count(void)
        return FALSE; //LCOV_EXCL_LINE
 }
 
+//LCOV_EXCL_START
 void net_set_cs_tid(int tid)
 {
        if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
+               WIFI_LOG(WIFI_ERROR, "Application is not registered");
                return;
        }
 
@@ -2864,6 +2865,7 @@ void net_unset_cs_tid(int tid)
 {
        _net_unset_cs_tid(tid);
 }
+//LCOV_EXCL_STOP
 
 int net_open_connection(const char *profile_name)
 {
@@ -3201,7 +3203,7 @@ int net_config_set_field(const gchar *config_id, const gchar *key, const gchar *
 
        Error = _net_dbus_config_set_field(config_id, key, value);
        if (Error != NET_ERR_NONE)
-               WIFI_LOG(WIFI_ERROR,
+               WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                                "Failed to set field. Error [%s]",
                                _net_print_error(Error));
 
index 07986e18cbb00f60cbda0ca3dc30ff55dd13f44c..b4c3faf762ce4ed88253bf729af280149d3bf600 100755 (executable)
@@ -1486,7 +1486,6 @@ void _net_set_dpm_wifi_profile_state(int state)
 {
        net_dpm_wifi_profile_state = state;
 }
-//LCOV_EXCL_STOP
 
 void _net_set_cs_tid(int tid)
 {
@@ -1572,6 +1571,7 @@ void _net_unset_cs_tid(int tid)
        cs_tid_list = g_slist_remove(cs_tid_list, tid_info);
        g_free(tid_info);
 }
+//LCOV_EXCL_STOP
 
 int _net_deregister_signal(void)
 {
index 532dd99905ecd117146a80b8e1dd4778ff14305f..cda541b1b9bd58efa9f0f54d379227129e2ad8fb 100755 (executable)
@@ -313,21 +313,21 @@ static void __update_specific_iterator(GSList *bss_list)
 
        count = (int)g_slist_length(list);
        if (count == 0) {
-               WIFI_LOG(WIFI_INFO, "No hidden AP found");
-               return;
+               WIFI_LOG(WIFI_INFO, "No hidden AP found"); //LCOV_EXCL_LINE
+               return; //LCOV_EXCL_LINE
        }
 
        for (i = 0; i < count; ++i) {
                net_ssid_scan_bss_info_s *info = (net_ssid_scan_bss_info_s *)list->data;
                prof_info = g_try_malloc0(sizeof(net_profile_info_s));
                if (prof_info == NULL) {
-                       WIFI_LOG(WIFI_ERROR, "Failed to alloc profile");
-                       return;
+                       WIFI_LOG(WIFI_ERROR, "Failed to alloc profile"); //LCOV_EXCL_LINE
+                       return; //LCOV_EXCL_LINE
                }
                if (net_init_profile_info(prof_info) != NET_ERR_NONE) {
-                       WIFI_LOG(WIFI_ERROR, "Failed to init profile");
-                       g_free(prof_info);
-                       return;
+                       WIFI_LOG(WIFI_ERROR, "Failed to init profile"); //LCOV_EXCL_LINE
+                       g_free(prof_info); //LCOV_EXCL_LINE
+                       return; //LCOV_EXCL_LINE
                }
                g_strlcpy(prof_info->essid, info->ssid, NET_WLAN_ESSID_LEN);
                memcpy(prof_info->raw_ssid, info->raw_ssid, info->raw_ssid_len);
@@ -346,8 +346,8 @@ static void __update_bss_profile_iterator(GSList *bss_list)
 
        count = (int)g_slist_length(list);
        if (count == 0) {
-               WIFI_LOG(WIFI_INFO, "No AP found !!");
-               return;
+               WIFI_LOG(WIFI_INFO, "No AP found !!"); //LCOV_EXCL_LINE
+               return; //LCOV_EXCL_LINE
        }
 
        for (list = bss_list; list; list = list->next) {
@@ -355,14 +355,14 @@ static void __update_bss_profile_iterator(GSList *bss_list)
                net_bssid_scan_bss_info_s *ap = (net_bssid_scan_bss_info_s *)list->data;
                net_profile_info_s *profile = g_try_malloc0(sizeof(net_profile_info_s));
                if (profile == NULL) {
-                       WIFI_LOG(WIFI_ERROR, "Failed to alloc profile");
-                       return;
+                       WIFI_LOG(WIFI_ERROR, "Failed to alloc profile"); //LCOV_EXCL_LINE
+                       return; //LCOV_EXCL_LINE
                }
 
                if (net_init_profile_info(profile) != NET_ERR_NONE) {
-                       WIFI_LOG(WIFI_ERROR, "Failed to init profile");
-                       g_free(profile);
-                       return;
+                       WIFI_LOG(WIFI_ERROR, "Failed to init profile"); //LCOV_EXCL_LINE
+                       g_free(profile); //LCOV_EXCL_LINE
+                       return; //LCOV_EXCL_LINE
                }
 
                g_strlcpy(profile->essid, (char *)ap->ssid, NET_WLAN_ESSID_LEN+1);
@@ -379,6 +379,7 @@ static void __update_bss_profile_iterator(GSList *bss_list)
        }
 }
 
+//LCOV_EXCL_START
 static void __update_netlink_scan_profile_iterator(GSList *bss_list)
 {
        int count = 0;
@@ -456,6 +457,7 @@ static void __update_netlink_scan_profile_iterator(GSList *bss_list)
                                        (net_profile_info_s *)profile);
        }
 }
+//LCOV_EXCL_STOP
 
 static void __convert_profile_info_to_wifi_info(net_wifi_connection_info_s *wifi_info,
                                                                net_profile_info_s *ap_info)
@@ -476,10 +478,10 @@ static int __connect_with_wifi_info(net_profile_info_s *ap_info)
 
        rv = net_open_connection_with_wifi_info(&wifi_info);
        if (rv == NET_ERR_ACCESS_DENIED) {
-               WIFI_LOG(WIFI_ERROR, "Access denied");
-               return WIFI_MANAGER_ERROR_PERMISSION_DENIED;
+               WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
        } else if (rv != NET_ERR_NONE)
-               return WIFI_MANAGER_ERROR_OPERATION_FAILED;
+               return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
 
        return WIFI_MANAGER_ERROR_NONE;
 }
@@ -1217,12 +1219,12 @@ static void _wifi_evt_cb(net_event_info_s *event_cb, void *user_data)
                __bssid_scan_cb(event_cb);
                break;
        case NET_EVENT_WIFI_IP_CONFLICT_IND:
-               WIFI_LOG(WIFI_INFO, "Got ip conflict event IND\n");
-               __ip_conflict_cb(event_cb);
+               WIFI_LOG(WIFI_INFO, "Got ip conflict event IND\n"); //LCOV_EXCL_LINE
+               __ip_conflict_cb(event_cb); //LCOV_EXCL_LINE
                break;
        case NET_EVENT_WIFI_NETLINK_SCAN_IND:
-               WIFI_LOG(WIFI_INFO, "Got NETLINK scan done IND\n");
-               __netlink_scan_cb(event_cb);
+               WIFI_LOG(WIFI_INFO, "Got NETLINK scan done IND\n"); //LCOV_EXCL_LINE
+               __netlink_scan_cb(event_cb); //LCOV_EXCL_LINE
                break;
        case NET_EVENT_WIFI_SCAN_CHANGED:
                WIFI_LOG(WIFI_INFO, "Got Wi-Fi ScanChanged event\n");
@@ -1236,24 +1238,24 @@ static void _wifi_evt_cb(net_event_info_s *event_cb, void *user_data)
                __power_on_off_cb(event_cb, is_requested);
                break;
        case NET_EVENT_WIFI_TDLS_DISCOVERED_IND:
-               WIFI_LOG(WIFI_INFO, "Received TDLS Discover Ind");
-               __tdls_discovered_cb(event_cb);
+               WIFI_LOG(WIFI_INFO, "Received TDLS Discover Ind"); //LCOV_EXCL_LINE
+               __tdls_discovered_cb(event_cb); //LCOV_EXCL_LINE
                break;
        case NET_EVENT_WIFI_TDLS_CONNECTED_IND:
-               WIFI_LOG(WIFI_INFO, "Received TDLS Connected Ind");
-               __tdls_state_changed_cb(WIFI_MANAGER_TDLS_STATE_CONNECTED, event_cb);
+               WIFI_LOG(WIFI_INFO, "Received TDLS Connected Ind"); //LCOV_EXCL_LINE
+               __tdls_state_changed_cb(WIFI_MANAGER_TDLS_STATE_CONNECTED, event_cb); //LCOV_EXCL_LINE
                break;
        case NET_EVENT_WIFI_TDLS_DISCONNECTED_IND:
-               WIFI_LOG(WIFI_INFO, "Received TDLS Disconnected Ind");
-               __tdls_state_changed_cb(WIFI_MANAGER_TDLS_STATE_DISCONNECTED, event_cb);
+               WIFI_LOG(WIFI_INFO, "Received TDLS Disconnected Ind"); //LCOV_EXCL_LINE
+               __tdls_state_changed_cb(WIFI_MANAGER_TDLS_STATE_DISCONNECTED, event_cb); //LCOV_EXCL_LINE
                break;
        case NET_EVENT_WIFI_MULTI_SCAN_RSP:
-               WIFI_LOG(WIFI_INFO, "Got Wi-Fi multi scan RSP\n");
-               __multi_scan_cb(event_cb);
+               WIFI_LOG(WIFI_INFO, "Got Wi-Fi multi scan RSP\n"); //LCOV_EXCL_LINE
+               __multi_scan_cb(event_cb); //LCOV_EXCL_LINE
                break;
        case NET_EVENT_WIFI_MULTI_SCAN_IND:
-               WIFI_LOG(WIFI_INFO, "Got Wi-Fi multi scan IND\n");
-               __multi_scan_cb(event_cb);
+               WIFI_LOG(WIFI_INFO, "Got Wi-Fi multi scan IND\n"); //LCOV_EXCL_LINE
+               __multi_scan_cb(event_cb); //LCOV_EXCL_LINE
                break;
        default:
                break;
@@ -1420,6 +1422,7 @@ bool _wifi_deinit(void)
        return true;
 }
 
+//LCOV_EXCL_START
 void _wifi_set_cs_tid(int tid)
 {
        net_set_cs_tid(tid);
@@ -1429,6 +1432,7 @@ void _wifi_unset_cs_tid(int tid)
 {
        net_unset_cs_tid(tid);
 }
+//LCOV_EXCL_STOP
 
 int _wifi_activate(wifi_manager_h wifi, wifi_manager_activated_cb callback,
                gboolean wifi_picker_test, void *user_data)
@@ -1489,7 +1493,7 @@ int _wifi_ip_conflict_detect_enable_set(bool detect)
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
        } else if (rv == NET_ERR_INVALID_OPERATION) {
-               WIFI_LOG(WIFI_ERROR, "Mode was already set");
+               WIFI_LOG(WIFI_ERROR, "Mode was already set"); //LCOV_EXCL_LINE
        } else if (rv == NET_ERR_NONE) {
                return WIFI_MANAGER_ERROR_NONE;
        }
@@ -1820,19 +1824,20 @@ int _wifi_bssid_scan_request(wifi_manager_h wifi,
        rv = net_bssid_scan_wifi(activated);
 
        if (rv == NET_ERR_ACCESS_DENIED) {
-               WIFI_LOG(WIFI_ERROR, "Access denied");
-               return WIFI_MANAGER_ERROR_PERMISSION_DENIED;
+               WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
        } else if (rv == NET_ERR_INVALID_OPERATION) {
-               return WIFI_MANAGER_ERROR_INVALID_OPERATION;
+               return WIFI_MANAGER_ERROR_INVALID_OPERATION; //LCOV_EXCL_LINE
        } else if (rv == NET_ERR_NONE) {
                __set_bssid_scan_cb(wifi, callback, user_data);
                return WIFI_MANAGER_ERROR_NONE;
        }
 
-       WIFI_LOG(WIFI_ERROR, "Operation Failed");
-       return WIFI_MANAGER_ERROR_OPERATION_FAILED;
+       WIFI_LOG(WIFI_ERROR, "Operation Failed"); //LCOV_EXCL_LINE
+       return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
 }
 
+//LCOV_EXCL_START
 bool _wifi_check_netlink_scan_validity(wifi_manager_netlink_scan_h netlink_scan)
 {
        GSList *list = NULL;
@@ -1933,7 +1938,6 @@ int _wifi_netlink_scan_request(wifi_manager_h wifi, wifi_manager_netlink_scan_h
        return WIFI_MANAGER_ERROR_OPERATION_FAILED;
 }
 
-//LCOV_EXCL_START
 int _wifi_add_vsie(wifi_manager_h wifi,
                wifi_manager_vsie_frames_e frame_id, const char *vsie_str)
 {
@@ -2266,6 +2270,7 @@ int _wifi_foreach_found_bssid_ap(wifi_manager_found_ap_cb callback, void *user_d
        return WIFI_MANAGER_ERROR_NONE;
 }
 
+//LCOV_EXCL_START
 int _wifi_foreach_found_netlink_scan_ap(wifi_manager_found_ap_cb callback, void *user_data)
 {
        int rv;
@@ -2285,6 +2290,7 @@ int _wifi_foreach_found_netlink_scan_ap(wifi_manager_found_ap_cb callback, void
        __clear_profile_list(&bss_profile_iterator);
        return WIFI_MANAGER_ERROR_NONE;
 }
+//LCOV_EXCL_STOP
 
 int _wifi_open_profile(wifi_manager_h wifi, wifi_manager_ap_h ap_h,
                wifi_manager_connected_cb callback, void *user_data)
@@ -2668,8 +2674,8 @@ int _wifi_load_configurations(void)
                if (g_str_has_suffix(id, "ieee8021x") == TRUE) {
                        h->eap_config = g_new0(wifi_eap_config_s, 1);
                        if (h->eap_config == NULL) {
-                               g_free(h);
-                               break;
+                               g_free(h);//LCOV_EXCL_LINE
+                               break;//LCOV_EXCL_LINE
                        }
                        rv = __load_eap_configurations(id, &h->name,
                                &h->security_type, &h->proxy_address, &h->is_hidden, &h->eap_config, &h->last_error);
@@ -2679,6 +2685,7 @@ int _wifi_load_configurations(void)
                }
 
                if (rv != WIFI_MANAGER_ERROR_NONE) {
+                       //LCOV_EXCL_START
                        g_free(h->name);
                        g_free(h->passphrase);
                        g_free(h->proxy_address);
@@ -2692,6 +2699,7 @@ int _wifi_load_configurations(void)
                                g_free(h->eap_config);
                        }
                        g_free(h);
+                       //LCOV_EXCL_STOP
                        WIFI_LOG(WIFI_ERROR, "Fail to load configurations [%d]", rv); //LCOV_EXCL_LINE
                } else {
                        h->address_family = WIFI_MANAGER_ADDRESS_FAMILY_IPV4;
@@ -2895,18 +2903,18 @@ tizen_profile_t _get_tizen_profile()
                break;
        case 'w':
        case 'W':
-               profile = TIZEN_PROFILE_WEARABLE;
-               break;
+               profile = TIZEN_PROFILE_WEARABLE; //LCOV_EXCL_LINE
+               break; //LCOV_EXCL_LINE
        case 't':
        case 'T':
-               profile = TIZEN_PROFILE_TV;
-               break;
+               profile = TIZEN_PROFILE_TV; //LCOV_EXCL_LINE
+               break; //LCOV_EXCL_LINE
        case 'i':
        case 'I':
-               profile = TIZEN_PROFILE_IVI;
-               break;
+               profile = TIZEN_PROFILE_IVI; //LCOV_EXCL_LINE
+               break; //LCOV_EXCL_LINE
        default: // common or unknown ==> ALL ARE COMMON.
-               profile = TIZEN_PROFILE_COMMON;
+               profile = TIZEN_PROFILE_COMMON; //LCOV_EXCL_LINE
        }
        free(profileName);
 
@@ -3155,8 +3163,8 @@ int _wifi_specific_scan_create(wifi_manager_specific_scan_h *specific_scan)
        *specific_scan = g_try_malloc0(sizeof(int));
 
        if (*specific_scan == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Failed to create specific scan handle");
-               return WIFI_MANAGER_ERROR_OUT_OF_MEMORY;
+               WIFI_LOG(WIFI_ERROR, "Failed to create specific scan handle"); //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
        }
 
        WIFI_LOG(WIFI_INFO, "New specific scan handle[%p]", *specific_scan);
@@ -3170,8 +3178,8 @@ int _wifi_specific_scan_set_ssid(wifi_manager_specific_scan_h specific_scan,
        wifi_manager_multi_scan_ap_s *ap = (wifi_manager_multi_scan_ap_s*)g_try_malloc0(sizeof(wifi_manager_multi_scan_ap_s));
 
        if (!ap) {
-               WIFI_LOG(WIFI_ERROR, "Failed to allocate memory");
-               return WIFI_MANAGER_ERROR_OUT_OF_MEMORY;
+               WIFI_LOG(WIFI_ERROR, "Failed to allocate memory"); //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
        }
        g_strlcpy(ap->str, essid, NET_WLAN_ESSID_LEN);
        ap->flag = true;
@@ -3193,8 +3201,8 @@ int _wifi_specific_scan_set_freq(wifi_manager_specific_scan_h specific_scan,
        wifi_manager_multi_scan_ap_s *ap = (wifi_manager_multi_scan_ap_s*)g_try_malloc0(sizeof(wifi_manager_multi_scan_ap_s));
 
        if (!ap) {
-               WIFI_LOG(WIFI_ERROR, "Failed to allocate memory");
-               return WIFI_MANAGER_ERROR_OUT_OF_MEMORY;
+               WIFI_LOG(WIFI_ERROR, "Failed to allocate memory"); //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
        }
        g_strlcpy(ap->str, str, NET_WLAN_FREQ_LEN);
        ap->flag = false;
index c047d62dfdb4058936683a3a6ba88738b67c035a..bd87247defe7fbdacf57b53411b67392aaef0477 100755 (executable)
@@ -246,6 +246,7 @@ EXPORT_API int wifi_manager_deinitialize(wifi_manager_h wifi)
        return WIFI_MANAGER_ERROR_NONE;
 }
 
+//LCOV_EXCL_START
 EXPORT_API int wifi_manager_initialize_cs(int tid, wifi_manager_h *wifi)
 {
        __NETWORK_CAPI_FUNC_ENTER__;
@@ -273,6 +274,7 @@ EXPORT_API int wifi_manager_deinitialize_cs(int tid, wifi_manager_h wifi)
        __NETWORK_CAPI_FUNC_EXIT__;
        return rv;
 }
+//LCOV_EXCL_STOP
 
 EXPORT_API int wifi_manager_activate(wifi_manager_h wifi,
                wifi_manager_activated_cb callback, void *user_data)
@@ -382,37 +384,39 @@ EXPORT_API int wifi_manager_get_mac_address(wifi_manager_h wifi, char **mac_addr
        }
 
        if (_get_tizen_profile() == TIZEN_PROFILE_TV) {
+               //LCOV_EXCL_START
                FILE *fp = NULL;
                char buf[WIFI_MAC_ADDR_LENGTH + 1];
                if (0 == access(WIFI_MAC_ADDR_PATH, F_OK))
                        fp = fopen(WIFI_MAC_ADDR_PATH, "r");
 
                if (fp == NULL) {
-                       WIFI_LOG(WIFI_ERROR, "Failed to open file" //LCOV_EXCL_LINE
+                       WIFI_LOG(WIFI_ERROR, "Failed to open file"
                                        " %s\n", WIFI_MAC_ADDR_PATH);
-                       __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
-                       return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
+                       __NETWORK_CAPI_FUNC_EXIT__;
+                       return WIFI_MANAGER_ERROR_OPERATION_FAILED;
                }
 
                if (fgets(buf, sizeof(buf), fp) == NULL) {
                        WIFI_LOG(WIFI_ERROR, "Failed to get MAC"
-                                       " info from %s\n", WIFI_MAC_ADDR_PATH); //LCOV_EXCL_LINE
-                       fclose(fp); //LCOV_EXCL_LINE
-                       __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
-                       return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
+                                       " info from %s\n", WIFI_MAC_ADDR_PATH);
+                       fclose(fp);
+                       __NETWORK_CAPI_FUNC_EXIT__;
+                       return WIFI_MANAGER_ERROR_OPERATION_FAILED;
                }
 
                WIFI_LOG(WIFI_INFO, "%s : %s\n", WIFI_MAC_ADDR_PATH, buf);
 
                *mac_address = strndup(buf, WIFI_MAC_ADDR_LENGTH + 1);
                if (*mac_address == NULL) {
-                       WIFI_LOG(WIFI_ERROR, "strndup() failed"); //LCOV_EXCL_LINE
-                       fclose(fp); //LCOV_EXCL_LINE
-                       __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
-                       return WIFI_MANAGER_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
+                       WIFI_LOG(WIFI_ERROR, "strndup() failed");
+                       fclose(fp);
+                       __NETWORK_CAPI_FUNC_EXIT__;
+                       return WIFI_MANAGER_ERROR_OUT_OF_MEMORY;
                }
 
                fclose(fp);
+               //LCOV_EXCL_STOP
        } else {
                *mac_address = vconf_get_str(VCONFKEY_WIFI_BSSID_ADDRESS);
 
@@ -426,8 +430,8 @@ EXPORT_API int wifi_manager_get_mac_address(wifi_manager_h wifi, char **mac_addr
                if (strlen(*mac_address) == 0) {
                        WIFI_LOG(WIFI_ERROR, "Mac address is invalid" //LCOV_EXCL_LINE
                                " from %s", VCONFKEY_WIFI_BSSID_ADDRESS);
-                       g_free(*mac_address);
-                       *mac_address = NULL;
+                       g_free(*mac_address); //LCOV_EXCL_LINE
+                       *mac_address = NULL; //LCOV_EXCL_LINE
                        __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
                        return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
                }
@@ -495,7 +499,7 @@ EXPORT_API int wifi_manager_get_scan_state(wifi_manager_h wifi,
        if (rv != WIFI_MANAGER_ERROR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi scan state"); //LCOV_EXCL_LINE
                __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return rv;
+               return rv; //LCOV_EXCL_LINE
        }
 
        __NETWORK_CAPI_FUNC_EXIT__;
@@ -992,14 +996,15 @@ EXPORT_API int wifi_manager_ip_conflict_detect_is_enabled(wifi_manager_h wifi, b
        return _wifi_ip_conflict_detect_is_enabled(state);
 }
 
+//LCOV_EXCL_START
 EXPORT_API int wifi_manager_set_ip_conflict_period(wifi_manager_h wifi,
                unsigned int initial_time)
 {
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        if (!(__wifi_check_handle_validity(wifi))) {
-               WIFI_LOG(WIFI_ERROR, "Invalid parameter"); //LCOV_EXCL_LINE
-               return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
+               return WIFI_MANAGER_ERROR_INVALID_PARAMETER;
        }
 
        return _wifi_set_ip_conflict_period(initial_time);
@@ -1011,12 +1016,13 @@ EXPORT_API int wifi_manager_get_ip_conflict_period(wifi_manager_h wifi,
 {
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
        if (initial_time == NULL || !(__wifi_check_handle_validity(wifi))) {
-               WIFI_LOG(WIFI_ERROR, "Invalid parameter"); //LCOV_EXCL_LINE
-               return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
+               return WIFI_MANAGER_ERROR_INVALID_PARAMETER;
        }
 
        return _wifi_get_ip_conflict_period(initial_time);
 }
+//LCOV_EXCL_STOP
 
 EXPORT_API int wifi_manager_get_ip_conflict_state(wifi_manager_h wifi,
                wifi_manager_ip_conflict_state_e *state)
@@ -1138,7 +1144,7 @@ EXPORT_API int wifi_manager_cancel_wps(wifi_manager_h wifi)
        rv = _wifi_cancel_wps();
 
        if (rv != WIFI_MANAGER_ERROR_NONE)
-               WIFI_LOG(WIFI_ERROR, "[App<--TizenMW] Error!! WPS Cancel Request failed. rv[%d]\n", rv);
+               WIFI_LOG(WIFI_ERROR, "[App<--TizenMW] Error!! WPS Cancel Request failed. rv[%d]\n", rv); //LCOV_EXCL_LINE
 
        __NETWORK_CAPI_FUNC_EXIT__;
        return rv;
@@ -1373,6 +1379,7 @@ EXPORT_API int wifi_manager_bssid_scan(wifi_manager_h wifi,
        return _wifi_bssid_scan_request(wifi, callback, user_data);
 }
 
+//LCOV_EXCL_START
 EXPORT_API int wifi_manager_netlink_scan(wifi_manager_h wifi, wifi_manager_netlink_scan_h netlink_scan,
                                 wifi_manager_netlink_scan_finished_cb callback, void *user_data)
 {
@@ -1392,7 +1399,6 @@ EXPORT_API int wifi_manager_netlink_scan(wifi_manager_h wifi, wifi_manager_netli
        return _wifi_netlink_scan_request(wifi, netlink_scan, callback, user_data);
 }
 
-//LCOV_EXCL_START
 EXPORT_API int wifi_manager_add_vsie(wifi_manager_h wifi,
                         wifi_manager_vsie_frames_e frame_id, const char *vsie_str)
 {
@@ -1575,7 +1581,6 @@ EXPORT_API int wifi_manager_ap_get_auto_connect(wifi_manager_ap_h ap, bool *auto
        __NETWORK_CAPI_FUNC_EXIT__;
        return _wifi_get_ap_auto_connect(ap, autoconnect);
 }
-//LCOV_EXCL_STOP
 
 EXPORT_API int wifi_manager_netlink_scan_create(wifi_manager_h wifi,
                wifi_manager_netlink_scan_h *netlink_scan)
@@ -1671,6 +1676,7 @@ EXPORT_API int wifi_manager_netlink_scan_set_vsie(wifi_manager_netlink_scan_h ne
        __NETWORK_CAPI_FUNC_EXIT__;
        return WIFI_MANAGER_ERROR_NONE;
 }
+//LCOV_EXCL_STOP
 
 EXPORT_API int wifi_manager_specific_scan_create(wifi_manager_h wifi,
                wifi_manager_specific_scan_h *specific_scan)