From f6ec066c4d6493d56d0d349ba4209edf9604b62d Mon Sep 17 00:00:00 2001 From: Wootak Jung Date: Mon, 23 May 2016 16:15:43 +0900 Subject: [PATCH] Add coverage comment Change-Id: Icd872deae1ba57e355125db5a73869d91efc3d3f --- packaging/libtapi.spec | 2 +- src/tapi_common.c | 4 ++++ src/tapi_network.c | 2 ++ src/tapi_oem.c | 2 ++ src/tapi_sap.c | 2 ++ src/tapi_sat.c | 14 ++++++++++++++ src/tapi_sim.c | 13 +++++++++++++ 7 files changed, 38 insertions(+), 1 deletion(-) diff --git a/packaging/libtapi.spec b/packaging/libtapi.spec index 6cc3196..0616e97 100644 --- a/packaging/libtapi.spec +++ b/packaging/libtapi.spec @@ -1,6 +1,6 @@ %define major 0 %define minor 8 -%define patchlevel 2 +%define patchlevel 3 Name: libtapi Version: %{major}.%{minor}.%{patchlevel} diff --git a/src/tapi_common.c b/src/tapi_common.c index e285a1e..4486bfd 100644 --- a/src/tapi_common.c +++ b/src/tapi_common.c @@ -51,6 +51,7 @@ typedef struct { void *user_data; } TelReadyStateCallback_t; +/* LCOV_EXCL_START */ static void _process_sms_event(const gchar *sig, GVariant *param, TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data) { @@ -1277,6 +1278,7 @@ static void on_signal_callback(GDBusConnection *conn, g_free(noti_id); } +/* LCOV_EXCL_STOP */ EXPORT_API char **tel_get_cp_name_list(void) { @@ -1671,6 +1673,7 @@ EXPORT_API int tel_deregister_noti_event(TapiHandle *handle, return TAPI_API_SUCCESS; } +/* LCOV_EXCL_START */ static gpointer _copy_ready_cb_item(gconstpointer src, gpointer data) { TelReadyStateCallback_t *orig_data = (TelReadyStateCallback_t *)src; @@ -1719,6 +1722,7 @@ static void on_changed_ready_state(keynode_t *key, void *user_data) g_slist_free_full(copied_list_head, g_free); } +/* LCOV_EXCL_STOP */ EXPORT_API int tel_register_ready_state_cb(tapi_state_cb callback, void *user_data) { diff --git a/src/tapi_network.c b/src/tapi_network.c index e2a69d4..99febb8 100644 --- a/src/tapi_network.c +++ b/src/tapi_network.c @@ -155,6 +155,7 @@ 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) { @@ -351,6 +352,7 @@ static void on_signal_bs_longitude(TapiHandle *handle, GVariant *param, g_variant_get(param, "(i)", &bs_longitude); TAPI_INVOKE_NOTI_CALLBACK(&bs_longitude); } +/* LCOV_EXCL_STOP */ static struct signal_map signals[] = { { "RegistrationStatus", on_signal_registration_status }, diff --git a/src/tapi_oem.c b/src/tapi_oem.c index 317bb3b..35b0ae4 100644 --- a/src/tapi_oem.c +++ b/src/tapi_oem.c @@ -53,6 +53,7 @@ struct oem_resp_data { data->oem_id = oem_id; \ } while (0) +/* LCOV_EXCL_START */ static void on_response_oem_data_async(GObject *source_object, GAsyncResult *res, gpointer user_data) { @@ -205,3 +206,4 @@ EXPORT_API int tel_send_oem_data_async(TapiHandle *handle, int oem_id, return TAPI_API_SUCCESS; } +/* LCOV_EXCL_STOP */ diff --git a/src/tapi_sap.c b/src/tapi_sap.c index 399eaae..47d15c0 100644 --- a/src/tapi_sap.c +++ b/src/tapi_sap.c @@ -31,6 +31,7 @@ #include "tapi_log.h" #include "ITapiSap.h" +/* LCOV_EXCL_START */ static void on_response_sap_connect(GObject *source_object, GAsyncResult *res, gpointer user_data) { GError *error = NULL; @@ -454,3 +455,4 @@ EXPORT_API int tel_req_sap_cardreader_status(TapiHandle *handle, tapi_response_c return TAPI_API_SUCCESS; } +/* LCOV_EXCL_STOP */ diff --git a/src/tapi_sat.c b/src/tapi_sat.c index 0115bc2..9c55033 100644 --- a/src/tapi_sat.c +++ b/src/tapi_sat.c @@ -32,6 +32,7 @@ extern TelSatEventDownloadType_t g_event_list[TAPI_SAT_EVENT_LIST_MAX_COUNT]; +/* LCOV_EXCL_START */ static GVariant *_tapi_sat_gen_app_exec_result_data(TelSatAppsRetInfo_t *result_info) { GVariant *result = NULL; @@ -287,6 +288,7 @@ static void on_response_download_event_envelop(GObject *source_object, GAsyncRes g_variant_unref(dbus_result); g_free(evt_cb_data); } +/* LCOV_EXCL_STOP */ /** * @@ -312,6 +314,7 @@ 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; @@ -326,6 +329,7 @@ EXPORT_API int tel_select_sat_menu(TapiHandle *handle, const TelSatMenuSelection g_variant_unref(inparam); return TAPI_API_SUCCESS; + /* LCOV_EXCL_STOP */ } /** @@ -354,6 +358,7 @@ 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 || g_event_list[g_index] == pEventData->eventDownloadType) { @@ -385,6 +390,7 @@ EXPORT_API int tel_download_sat_event(TapiHandle *handle, const TelSatEventDownl g_variant_unref(inparam); return TAPI_API_SUCCESS; + /* LCOV_EXCL_STOP */ } /** @@ -414,6 +420,7 @@ 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; @@ -479,6 +486,7 @@ 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 */ } /** @@ -506,6 +514,7 @@ 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); @@ -533,6 +542,7 @@ EXPORT_API int tel_send_sat_ui_display_status(TapiHandle *handle, int commandId, dbg("result (%d)", result); return result; + /* LCOV_EXCL_STOP */ } /** @@ -567,6 +577,7 @@ 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; @@ -606,6 +617,7 @@ EXPORT_API int tel_send_sat_ui_user_confirm(TapiHandle *handle, TelSatUiUserConf dbg("result (%d)", result); return result; + /* LCOV_EXCL_STOP */ } /** @@ -633,6 +645,7 @@ 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); @@ -664,4 +677,5 @@ EXPORT_API int tel_send_sat_app_exec_result(TapiHandle *handle, TelSatAppsRetInf dbg("result (%d)", result); return result; + /* LCOV_EXCL_STOP */ } diff --git a/src/tapi_sim.c b/src/tapi_sim.c index 0dcb5ae..de9b3d6 100644 --- a/src/tapi_sim.c +++ b/src/tapi_sim.c @@ -1033,6 +1033,7 @@ 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) { @@ -1173,6 +1174,7 @@ 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) @@ -1979,6 +1981,7 @@ EXPORT_API int tel_req_sim_authentication(TapiHandle *handle, return TAPI_API_SUCCESS; } + EXPORT_API int tel_verifiy_sim_pins(TapiHandle *handle, const TelSimSecPw_t *pin_data, tapi_response_cb callback, void *user_data) { @@ -1996,6 +1999,7 @@ 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); @@ -2026,6 +2030,7 @@ 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, @@ -2040,6 +2045,7 @@ 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); @@ -2086,6 +2092,7 @@ 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, @@ -2100,6 +2107,7 @@ 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); @@ -2148,6 +2156,7 @@ 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, @@ -2161,6 +2170,7 @@ 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); @@ -2191,6 +2201,7 @@ 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, @@ -2204,6 +2215,7 @@ 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); @@ -2234,6 +2246,7 @@ 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, -- 2.7.4