From: DoHyun Pyun Date: Tue, 6 Apr 2021 01:16:09 +0000 (+0900) Subject: Add the coverage exception for internal functions X-Git-Tag: submit/tizen/20210714.235408~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64f4e93d28a5fc1d1c792c49b10f188ec58bf47a;p=platform%2Fcore%2Ftelephony%2Flibtapi.git Add the coverage exception for internal functions Change-Id: I56b4f8d00f346e28da31419fbe7ea2d23b9761e6 Signed-off-by: DoHyun Pyun --- diff --git a/src/tapi_call.c b/src/tapi_call.c index de30128..520dc29 100644 --- a/src/tapi_call.c +++ b/src/tapi_call.c @@ -31,6 +31,7 @@ #include "ITapiCall.h" #include "tapi_private.h" +/* LCOV_EXCL_START */ static void on_response_call_dial(GObject *source_object, GAsyncResult *res, gpointer user_data) { GError *error = 0; @@ -830,6 +831,7 @@ EXPORT_API int tel_get_call_status(TapiHandle *handle, int callHandle, TelCallSt return TAPI_API_SUCCESS; } +/* LCOV_EXCL_STOP */ EXPORT_API int tel_get_call_status_all(TapiHandle *handle, TelCallStatusCallback cb, void *user_data) { @@ -855,6 +857,7 @@ EXPORT_API int tel_get_call_status_all(TapiHandle *handle, TelCallStatusCallback g_variant_get(gv, "(aa{sv})", &iter); while (g_variant_iter_next(iter, "a{sv}", &iter_row)) { + /* LCOV_EXCL_START */ while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) { if (!g_strcmp0(key, "call_id")) data.CallHandle = g_variant_get_int32(value); @@ -871,6 +874,8 @@ EXPORT_API int tel_get_call_status_all(TapiHandle *handle, TelCallStatusCallback else if (!g_strcmp0(key, "is_volte_call")) data.bVolteCall = (int)g_variant_get_boolean(value); } + /* LCOV_EXCL_STOP */ + g_variant_iter_free(iter_row); cb(&data, user_data); @@ -894,6 +899,7 @@ EXPORT_API int tel_get_call_status_all(TapiHandle *handle, TelCallStatusCallback return TAPI_API_SUCCESS; } +/* LCOV_EXCL_START */ EXPORT_API int tel_get_call_privacy_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data) { struct tapi_resp_data *evt_cb_data = 0; @@ -1078,6 +1084,7 @@ EXPORT_API int tel_set_call_preferred_voice_subscription(TapiHandle *handle, Tel return TAPI_API_SUCCESS; } +/* LCOV_EXCL_STOP */ EXPORT_API int tel_get_call_preferred_voice_subscription(TapiHandle *handle, TelCallPreferredVoiceSubs_t *preferred_subscription) { diff --git a/src/tapi_common.c b/src/tapi_common.c index 62e91a6..cc54c79 100644 --- a/src/tapi_common.c +++ b/src/tapi_common.c @@ -1715,6 +1715,7 @@ EXPORT_API TapiHandle *tel_init(const char *cp_name) if (cp_name) { handle->cp_name = g_strdup(cp_name); } else { + /* LCOV_EXCL_START */ char **list = NULL; int i = 0; @@ -1743,6 +1744,7 @@ EXPORT_API TapiHandle *tel_init(const char *cp_name) g_free(list[i++]); g_free(list); + /* LCOV_EXCL_STOP */ } handle->evt_list = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); @@ -1754,6 +1756,7 @@ EXPORT_API TapiHandle *tel_init(const char *cp_name) return handle; } +/* LCOV_EXCL_START */ static gboolean _unregister_noti(gpointer key, gpointer value, gpointer user_data) { struct tapi_evt_cb *evt_cb_data = value; @@ -1763,6 +1766,7 @@ static gboolean _unregister_noti(gpointer key, gpointer value, gpointer user_dat return TRUE; } +/* LCOV_EXCL_STOP */ EXPORT_API int tel_deinit(TapiHandle *handle) { diff --git a/src/tapi_modem.c b/src/tapi_modem.c index 347ec6c..f487f94 100644 --- a/src/tapi_modem.c +++ b/src/tapi_modem.c @@ -33,6 +33,7 @@ #include "tapi_log.h" #include "tapi_private.h" +/* LCOV_EXCL_START */ static void on_response_default_set(GObject *source_object, GAsyncResult *res, gpointer user_data) { GError *error = NULL; @@ -529,6 +530,7 @@ OUT: return data; } +/* LCOV_EXCL_STOP */ EXPORT_API int tel_check_modem_power_status(TapiHandle *handle, int *result) { @@ -551,6 +553,8 @@ EXPORT_API int tel_check_modem_power_status(TapiHandle *handle, int *result) return ret; } + +/* LCOV_EXCL_START */ EXPORT_API int tel_get_device_info(TapiHandle *handle, tapi_response_cb callback, void *user_data) { struct tapi_resp_data *evt_cb_data = NULL; @@ -569,3 +573,4 @@ EXPORT_API int tel_get_device_info(TapiHandle *handle, tapi_response_cb callback return TAPI_API_SUCCESS; } +/* LCOV_EXCL_STOP */ diff --git a/src/tapi_network.c b/src/tapi_network.c index 6cf3b17..419b81c 100644 --- a/src/tapi_network.c +++ b/src/tapi_network.c @@ -31,6 +31,7 @@ #include "ITapiNetwork.h" #include "tapi_private.h" +/* LCOV_EXCL_START */ static int _convert_systemtype_to_act(int type) { switch (type) { @@ -156,7 +157,6 @@ static int _convert_act_to_systemtype(int act) return TAPI_NETWORK_SYSTEM_NO_SRV; } -/* LCOV_EXCL_START */ static void on_signal_registration_status(TapiHandle *handle, GVariant *param, char *noti_id, struct tapi_evt_cb *evt_cb_data) { @@ -381,7 +381,6 @@ static void on_signal_epdg_status(TapiHandle *handle, GVariant *param, TAPI_INVOKE_NOTI_CALLBACK(¬i); } -/* LCOV_EXCL_STOP */ static struct signal_map signals[] = { { "RegistrationStatus", on_signal_registration_status }, @@ -1293,6 +1292,7 @@ EXPORT_API int tel_get_network_roaming_preference(TapiHandle *handle, tapi_respo return TAPI_API_SUCCESS; } +/* LCOV_EXCL_STOP */ EXPORT_API int tel_get_network_default_data_subscription(TapiHandle *handle, TelNetworkDefaultDataSubs_t *default_subscription) { @@ -1335,6 +1335,7 @@ EXPORT_API int tel_get_network_default_data_subscription(TapiHandle *handle, Tel return ret; } +/* LCOV_EXCL_START */ EXPORT_API int tel_set_network_default_subscription(TapiHandle *handle, tapi_response_cb callback, void *user_data) { struct tapi_resp_data *evt_cb_data = NULL; @@ -1356,6 +1357,7 @@ EXPORT_API int tel_set_network_default_subscription(TapiHandle *handle, tapi_res return TAPI_API_SUCCESS; } +/* LCOV_EXCL_STOP */ EXPORT_API int tel_get_network_default_subscription(TapiHandle *handle, TelNetworkDefaultSubs_t *default_subscription) { diff --git a/src/tapi_phonebook.c b/src/tapi_phonebook.c index dcb77b8..050fca0 100644 --- a/src/tapi_phonebook.c +++ b/src/tapi_phonebook.c @@ -32,6 +32,7 @@ #include "ITapiPhonebook.h" #include "tapi_private.h" +/* LCOV_EXCL_START */ static void move_str(char *dest, unsigned int len, gchar *src) { if (!dest || !src) @@ -544,3 +545,4 @@ EXPORT_API int tel_delete_sim_pb_record(TapiHandle *handle, TelSimPbType_t pb_ty return TAPI_API_SUCCESS; } +/* LCOV_EXCL_STOP */ diff --git a/src/tapi_sat.c b/src/tapi_sat.c index 2648d66..971d5e4 100644 --- a/src/tapi_sat.c +++ b/src/tapi_sat.c @@ -302,7 +302,6 @@ static void on_response_download_event_envelop(GObject *source_object, GAsyncRes g_variant_unref(dbus_result); g_free(evt_cb_data); } -/* LCOV_EXCL_STOP */ /** * @@ -329,7 +328,6 @@ EXPORT_API int tel_select_sat_menu(TapiHandle *handle, const TelSatMenuSelection TAPI_RET_ERR_NUM_IF_FAIL(handle->dbus_connection, TAPI_API_INVALID_PTR); TAPI_RET_ERR_NUM_IF_FAIL(pMenuSelect, TAPI_API_INVALID_PTR); - /* LCOV_EXCL_START */ TAPI_MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data); item_id = pMenuSelect->itemIdentifier; @@ -342,7 +340,6 @@ EXPORT_API int tel_select_sat_menu(TapiHandle *handle, const TelSatMenuSelection handle->ca, on_response_menu_selection_envelop, evt_cb_data); return TAPI_API_SUCCESS; - /* LCOV_EXCL_STOP */ } /** @@ -372,7 +369,6 @@ EXPORT_API int tel_download_sat_event(TapiHandle *handle, const TelSatEventDownl TAPI_RET_ERR_NUM_IF_FAIL(handle->dbus_connection, TAPI_API_INVALID_PTR); TAPI_RET_ERR_NUM_IF_FAIL(pEventData, TAPI_API_INVALID_PTR); - /* LCOV_EXCL_START */ for (g_index = 0; g_event_list[g_index] > 0; g_index++) { if (pEventData->eventDownloadType == TAPI_EVENT_SAT_DW_TYPE_BROWSER_TERMINATION || pEventData->eventDownloadType == TAPI_EVENT_SAT_DW_TYPE_DATA_AVAILABLE @@ -404,7 +400,6 @@ EXPORT_API int tel_download_sat_event(TapiHandle *handle, const TelSatEventDownl handle->ca, on_response_download_event_envelop, evt_cb_data); return TAPI_API_SUCCESS; - /* LCOV_EXCL_STOP */ } /** @@ -435,7 +430,6 @@ EXPORT_API int tel_get_sat_main_menu_info(TapiHandle *handle, TelSatSetupMenuInf TAPI_RET_ERR_NUM_IF_FAIL(handle->dbus_connection, TAPI_API_INVALID_PTR); TAPI_RET_ERR_NUM_IF_FAIL(pMainMenu, TAPI_API_INVALID_PTR); - /* LCOV_EXCL_START */ memset(pMainMenu, 0, sizeof(TelSatSetupMenuInfo_t)); error = NULL; @@ -493,7 +487,6 @@ EXPORT_API int tel_get_sat_main_menu_info(TapiHandle *handle, TelSatSetupMenuInf dbg("menu updated (%d)", pMainMenu->bIsUpdatedSatMainMenu); return TAPI_API_SUCCESS; - /* LCOV_EXCL_STOP */ } /** @@ -522,7 +515,6 @@ EXPORT_API int tel_send_sat_ui_display_status(TapiHandle *handle, int commandId, TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR); TAPI_RET_ERR_NUM_IF_FAIL(handle->dbus_connection, TAPI_API_INVALID_PTR); - /* LCOV_EXCL_START */ command_id = commandId; display_status = ((status == TAPI_SAT_DISPLAY_SUCCESS) ? TRUE : FALSE); dbg("command id(%d) display status(%d)", command_id, display_status); @@ -552,7 +544,6 @@ EXPORT_API int tel_send_sat_ui_display_status(TapiHandle *handle, int commandId, dbg("result (%d)", result); return result; - /* LCOV_EXCL_STOP */ } /** @@ -588,7 +579,6 @@ EXPORT_API int tel_send_sat_ui_user_confirm(TapiHandle *handle, TelSatUiUserConf TAPI_RET_ERR_NUM_IF_FAIL(handle->dbus_connection, TAPI_API_INVALID_PTR); TAPI_RET_ERR_NUM_IF_FAIL(pUserConfirmData, TAPI_API_INVALID_PTR); - /* LCOV_EXCL_START */ command_id = pUserConfirmData->commandId; command_type = pUserConfirmData->commandType; key_type = pUserConfirmData->keyType; @@ -630,7 +620,6 @@ EXPORT_API int tel_send_sat_ui_user_confirm(TapiHandle *handle, TelSatUiUserConf dbg("result (%d)", result); return result; - /* LCOV_EXCL_STOP */ } /** @@ -659,7 +648,6 @@ EXPORT_API int tel_send_sat_app_exec_result(TapiHandle *handle, TelSatAppsRetInf TAPI_RET_ERR_NUM_IF_FAIL(handle->dbus_connection, TAPI_API_INVALID_PTR); TAPI_RET_ERR_NUM_IF_FAIL(pAppRetInfo, TAPI_API_INVALID_PTR); - /* LCOV_EXCL_START */ command_id = pAppRetInfo->commandId; command_type = pAppRetInfo->commandType; app_exec_result = _tapi_sat_gen_app_exec_result_data(pAppRetInfo); @@ -693,5 +681,5 @@ EXPORT_API int tel_send_sat_app_exec_result(TapiHandle *handle, TelSatAppsRetInf dbg("result (%d)", result); return result; - /* LCOV_EXCL_STOP */ } +/* LCOV_EXCL_STOP */ diff --git a/src/tapi_sim.c b/src/tapi_sim.c index 3b1b42e..bfb53ff 100644 --- a/src/tapi_sim.c +++ b/src/tapi_sim.c @@ -76,6 +76,7 @@ return; \ } while (0) +/* LCOV_EXCL_START */ static TapiResult_t __check_err_msg(gchar *err_msg) { TapiResult_t ret = TAPI_API_OPERATION_FAILED; @@ -1070,7 +1071,6 @@ static void on_response_req_sim_authentication(GObject *source_object, GAsyncRes g_variant_unref(dbus_result); } -/* LCOV_EXCL_START */ static void on_response_verify_sim_pins(GObject *source_object, GAsyncResult *res, gpointer user_data) { @@ -1211,7 +1211,6 @@ static void on_response_enable_sim_facility(GObject *source_object, GAsyncResult g_free(evt_cb_data); g_variant_unref(dbus_result); } -/* LCOV_EXCL_STOP */ static void on_response_get_sim_facility(GObject *source_object, GAsyncResult *res, gpointer user_data) @@ -1431,6 +1430,7 @@ static void on_response_get_sim_isim_service_table(GObject *source_object, g_free(evt_cb_data); g_variant_unref(dbus_result); } +/* LCOV_EXCL_STOP */ EXPORT_API int tel_get_sim_init_info(TapiHandle *handle, TelSimCardStatus_t *sim_status, int *card_changed) @@ -1465,6 +1465,7 @@ EXPORT_API int tel_get_sim_init_info(TapiHandle *handle, return TAPI_API_SUCCESS; } +/* LCOV_EXCL_START */ EXPORT_API int tel_get_sim_type(TapiHandle *handle, TelSimCardType_t *card_type) { GError *gerr = NULL; @@ -1488,6 +1489,7 @@ EXPORT_API int tel_get_sim_type(TapiHandle *handle, TelSimCardType_t *card_type) } return TAPI_API_SUCCESS; } +/* LCOV_EXCL_STOP */ EXPORT_API int tel_get_sim_imsi(TapiHandle *handle, TelSimImsiInfo_t *imsi) { @@ -1533,6 +1535,7 @@ EXPORT_API int tel_get_sim_imsi(TapiHandle *handle, TelSimImsiInfo_t *imsi) return TAPI_API_SUCCESS; } +/* LCOV_EXCL_START */ EXPORT_API int tel_get_sim_ecc(TapiHandle *handle, TelSimEccList_t *ecc) { GError *gerr = NULL; @@ -2075,7 +2078,6 @@ EXPORT_API int tel_verify_sim_pins(TapiHandle *handle, const TelSimSecPw_t *pin_ TAPI_RET_ERR_NUM_IF_FAIL(pin_data, TAPI_API_INVALID_PTR); TAPI_RET_ERR_NUM_IF_FAIL(pin_data->pw, TAPI_API_INVALID_PTR); - /* LCOV_EXCL_START */ TAPI_SIM_CHECK_TAPI_STATE(); msg("pin type[%d]", pin_data->type); @@ -2106,7 +2108,6 @@ EXPORT_API int tel_verify_sim_pins(TapiHandle *handle, const TelSimSecPw_t *pin_ free(gpw); return TAPI_API_SUCCESS; - /* LCOV_EXCL_STOP */ } EXPORT_API int tel_verify_sim_puks(TapiHandle *handle, const TelSimSecPw_t *puk_data, @@ -2122,7 +2123,6 @@ EXPORT_API int tel_verify_sim_puks(TapiHandle *handle, const TelSimSecPw_t *puk_ TAPI_RET_ERR_NUM_IF_FAIL((puk_data != NULL && new_pin_data != NULL), TAPI_API_INVALID_PTR); TAPI_RET_ERR_NUM_IF_FAIL((puk_data->pw != NULL && new_pin_data->pw != NULL), TAPI_API_INVALID_PTR); - /* LCOV_EXCL_START */ TAPI_SIM_CHECK_TAPI_STATE(); msg("puk type[%d] pin type[%d]", puk_data->type, new_pin_data->type); @@ -2169,7 +2169,6 @@ EXPORT_API int tel_verify_sim_puks(TapiHandle *handle, const TelSimSecPw_t *puk_ free(gpuk); return TAPI_API_SUCCESS; - /* LCOV_EXCL_STOP */ } EXPORT_API int tel_change_sim_pins(TapiHandle *handle, const TelSimSecPw_t *old_pin, @@ -2185,7 +2184,6 @@ EXPORT_API int tel_change_sim_pins(TapiHandle *handle, const TelSimSecPw_t *old_ TAPI_RET_ERR_NUM_IF_FAIL((old_pin != NULL && new_pin != NULL), TAPI_API_INVALID_PTR); TAPI_RET_ERR_NUM_IF_FAIL((old_pin->pw != NULL && new_pin->pw != NULL), TAPI_API_INVALID_PTR); - /* LCOV_EXCL_START */ TAPI_SIM_CHECK_TAPI_STATE(); msg("old_pin type[%d], new_pin type[%d]", old_pin->type, new_pin->type); @@ -2234,7 +2232,6 @@ EXPORT_API int tel_change_sim_pins(TapiHandle *handle, const TelSimSecPw_t *old_ free(gpin_n); return TAPI_API_SUCCESS; - /* LCOV_EXCL_STOP */ } EXPORT_API int tel_disable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t *pw, @@ -2249,7 +2246,6 @@ EXPORT_API int tel_disable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t * TAPI_RET_ERR_NUM_IF_FAIL(pw, TAPI_API_INVALID_PTR); TAPI_RET_ERR_NUM_IF_FAIL(pw->pw, TAPI_API_INVALID_PTR); - /* LCOV_EXCL_START */ TAPI_SIM_CHECK_TAPI_STATE(); dbg("facility type[%d]", pw->lock_type); @@ -2280,7 +2276,6 @@ EXPORT_API int tel_disable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t * free(gpw); return TAPI_API_SUCCESS; - /* LCOV_EXCL_STOP */ } EXPORT_API int tel_enable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t *pw, @@ -2295,7 +2290,6 @@ EXPORT_API int tel_enable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t *p TAPI_RET_ERR_NUM_IF_FAIL(pw, TAPI_API_INVALID_PTR); TAPI_RET_ERR_NUM_IF_FAIL(pw->pw, TAPI_API_INVALID_PTR); - /* LCOV_EXCL_START */ TAPI_SIM_CHECK_TAPI_STATE(); msg("facility type[%d]", pw->lock_type); @@ -2326,7 +2320,6 @@ EXPORT_API int tel_enable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t *p free(gpw); return TAPI_API_SUCCESS; - /* LCOV_EXCL_STOP */ } EXPORT_API int tel_get_sim_facility(TapiHandle *handle, TelSimLockType_t type, @@ -2534,6 +2527,7 @@ EXPORT_API int tel_get_sim_pcscf(TapiHandle *handle, tapi_response_cb callback, return TAPI_API_SUCCESS; } +/* LCOV_EXCL_STOP */ EXPORT_API int tel_get_sim_application_list(TapiHandle *handle, unsigned char *app_list) { @@ -2560,6 +2554,7 @@ EXPORT_API int tel_get_sim_application_list(TapiHandle *handle, unsigned char *a return TAPI_API_SUCCESS; } +/* LCOV_EXCL_START */ EXPORT_API int tel_get_sim_isim_service_table(TapiHandle *handle, tapi_response_cb callback, void *user_data) { @@ -2580,3 +2575,5 @@ EXPORT_API int tel_get_sim_isim_service_table(TapiHandle *handle, return TAPI_API_SUCCESS; } +/* LCOV_EXCL_STOP */ + diff --git a/src/tapi_sms.c b/src/tapi_sms.c index 012008a..c4c9cdc 100644 --- a/src/tapi_sms.c +++ b/src/tapi_sms.c @@ -31,6 +31,7 @@ #include "ITapiNetText.h" #include "tapi_private.h" +/* LCOV_EXCL_START */ static void on_response_default(GObject *source_object, GAsyncResult *res, gpointer user_data) { GError *error = NULL; @@ -986,3 +987,4 @@ EXPORT_API int tel_check_sms_device_status(struct tapi_handle *handle, int *pRea return TAPI_API_SUCCESS; } +/* LCOV_EXCL_STOP */ diff --git a/src/tapi_ss.c b/src/tapi_ss.c index 9cb37ec..f7f5ab6 100644 --- a/src/tapi_ss.c +++ b/src/tapi_ss.c @@ -32,6 +32,7 @@ #include "ITapiSs.h" #include "tapi_private.h" +/* LCOV_EXCL_START */ static void on_response_get_ss_barring_status(GObject *source_object, GAsyncResult *res, gpointer user_data) { GError *error = 0; @@ -643,3 +644,4 @@ EXPORT_API int tel_send_ss_ussd_request(TapiHandle *handle, const TelSsUssdMsgIn return TAPI_API_SUCCESS; } +/* LCOV_EXCL_STOP */