From: Lee Hyuk Date: Thu, 12 Jan 2017 01:35:26 +0000 (+0900) Subject: Add the line coverage exception X-Git-Tag: submit/tizen_3.0.m2/20170112.014513^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=363d78274f11285a01372172c25896f7eda803d0;p=platform%2Fcore%2Fapi%2Fbluetooth.git Add the line coverage exception Change-Id: I9a7a6fe8461fd57b76fea6e896376e9264a56a44 Signed-off-by: Lee Hyuk --- diff --git a/src/bluetooth-adapter.c b/src/bluetooth-adapter.c index 49dae00..999fbba 100644 --- a/src/bluetooth-adapter.c +++ b/src/bluetooth-adapter.c @@ -160,14 +160,14 @@ int bt_adapter_get_address(char **address) error_code = _bt_get_error_code(bluetooth_get_local_address(&loc_address)); if (error_code != BT_ERROR_NONE) { /* LCOV_EXCL_LINE */ - BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), + BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), /* LCOV_EXCL_LINE */ error_code); /* LCOV_EXCL_LINE */ return error_code; /* LCOV_EXCL_LINE */ } error_code = _bt_convert_address_to_string(address, &loc_address); if (error_code != BT_ERROR_NONE) { /* LCOV_EXCL_LINE */ - BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), + BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), /* LCOV_EXCL_LINE */ error_code); /* LCOV_EXCL_LINE */ return error_code; /* LCOV_EXCL_LINE */ } @@ -441,14 +441,14 @@ int bt_adapter_get_name(char **name) ret = _bt_get_error_code(bluetooth_get_local_name(&loc_name)); if (ret != BT_ERROR_NONE) { /* LCOV_EXCL_LINE */ - BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), + BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), /* LCOV_EXCL_LINE */ ret); /* LCOV_EXCL_LINE */ return ret; /* LCOV_EXCL_LINE */ } *name = strdup(loc_name.name); if (*name == NULL) { - BT_ERR("OUT_OF_MEMORY(0x%08x)", + BT_ERR("OUT_OF_MEMORY(0x%08x)", /* LCOV_EXCL_LINE */ BT_ERROR_OUT_OF_MEMORY); /* LCOV_EXCL_LINE */ return BT_ERROR_OUT_OF_MEMORY; } @@ -470,7 +470,7 @@ int bt_adapter_set_name(const char *name) ret = _bt_get_error_code(bluetooth_set_local_name(&loc_name)); if (ret != BT_ERROR_NONE) { /* LCOV_EXCL_LINE */ - BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), + BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), /* LCOV_EXCL_LINE */ ret); /* LCOV_EXCL_LINE */ } /* LCOV_EXCL_LINE */ @@ -617,14 +617,14 @@ int bt_adapter_foreach_bonded_device(bt_adapter_bonded_device_cb foreach_cb, dev_list = g_ptr_array_new(); if (dev_list == NULL) { - BT_ERR("OUT_OF_MEMORY(0x%08x)", + BT_ERR("OUT_OF_MEMORY(0x%08x)", /* LCOV_EXCL_LINE */ BT_ERROR_OUT_OF_MEMORY); /* LCOV_EXCL_LINE */ return BT_ERROR_OUT_OF_MEMORY; } ret = _bt_get_error_code(bluetooth_get_bonded_device_list(&dev_list)); if (ret != BT_ERROR_NONE) { - BT_ERR("%s(0x%08x) : Failed to get bonded device list", + BT_ERR("%s(0x%08x) : Failed to get bonded device list", /* LCOV_EXCL_LINE */ _bt_convert_error_to_string(ret), ret); /* LCOV_EXCL_LINE */ return ret; } @@ -635,7 +635,7 @@ int bt_adapter_foreach_bonded_device(bt_adapter_bonded_device_cb foreach_cb, ret = _bt_get_bt_device_info_s(&dev_info, (bluetooth_device_info_t *)ptr); if (ret != BT_ERROR_NONE) { - BT_ERR("%s(0x%08x) : Failed to get device info", + BT_ERR("%s(0x%08x) : Failed to get device info", /* LCOV_EXCL_LINE */ _bt_convert_error_to_string(ret), ret); /* LCOV_EXCL_LINE */ break; @@ -647,7 +647,7 @@ int bt_adapter_foreach_bonded_device(bt_adapter_bonded_device_cb foreach_cb, } _bt_free_bt_device_info_s(dev_info); /* LCOV_EXCL_LINE */ } else { - BT_ERR("OPERATION_FAILED(0x%08x)", + BT_ERR("OPERATION_FAILED(0x%08x)", /* LCOV_EXCL_LINE */ BT_ERROR_OPERATION_FAILED); /* LCOV_EXCL_LINE */ ret = BT_ERROR_OPERATION_FAILED; break; @@ -736,6 +736,7 @@ int bt_adapter_is_service_used(const char *service_uuid, bool *used) return ret; } +/* LCOV_EXCL_START */ int bt_adapter_foreach_profile_connected_devices(const char *profile_uuid, bt_adapter_profile_connected_devices_cb callback, void *user_data) { @@ -797,7 +798,7 @@ int bt_adapter_foreach_profile_connected_devices(const char *profile_uuid, g_ptr_array_free(addr_list, TRUE); return ret; -} +} /* LCOV_EXCL_STOP */ int bt_adapter_set_state_changed_cb(bt_adapter_state_changed_cb callback, void *user_data) @@ -1518,7 +1519,6 @@ int bt_adapter_le_set_scan_mode(bt_adapter_le_scan_mode_e scan_mode) } /* LCOV_EXCL_LINE */ return ret; } -/* LCOV_EXCL_STOP */ int bt_adapter_le_set_customized_scan_mode(float scan_interval, float scan_window) { @@ -1536,7 +1536,7 @@ int bt_adapter_le_set_customized_scan_mode(float scan_interval, float scan_windo BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); return ret; -} +} /* LCOV_EXCL_STOP */ int bt_adapter_le_create_advertiser(bt_advertiser_h *advertiser) { diff --git a/src/bluetooth-audio.c b/src/bluetooth-audio.c index 64b640d..5115a73 100644 --- a/src/bluetooth-audio.c +++ b/src/bluetooth-audio.c @@ -599,7 +599,6 @@ int bt_ag_notify_call_list(bt_call_list_h list) return error; } -/* LCOV_EXCL_STOP */ int bt_ag_notify_vendor_cmd(const char *command) { @@ -615,7 +614,7 @@ int bt_ag_notify_vendor_cmd(const char *command) if (error != BT_ERROR_NONE) BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error), error); return error; -} +} /* LCOV_EXCL_STOP */ int bt_ag_notify_voice_recognition_state(bool state) { diff --git a/src/bluetooth-avrcp.c b/src/bluetooth-avrcp.c index 9da615c..6a73b44 100644 --- a/src/bluetooth-avrcp.c +++ b/src/bluetooth-avrcp.c @@ -59,15 +59,17 @@ int __bt_check_avrcp_target_init_status(void) return BT_ERROR_NOT_INITIALIZED; \ } +/* LCOV_EXCL_START */ int __bt_check_avrcp_control_init_status(void) { - if (is_avrcp_control_initialized != true) { + if (is_avrcp_control_initialized != true) { /* LCOV_EXCL_LINE */ BT_ERR("NOT_INITIALIZED(0x%08x)", BT_ERROR_NOT_INITIALIZED); /* LCOV_EXCL_LINE */ return BT_ERROR_NOT_INITIALIZED; /* LCOV_EXCL_LINE */ } return BT_ERROR_NONE; } +/* LCOV_EXCL_STOP */ /*The below API is just to conver the error from Audio API's to CAPI error codes, * this is temporary change and changes to proper error code will be done in @@ -108,6 +110,7 @@ int bt_avrcp_target_initialize(bt_avrcp_target_connection_state_changed_cb callb return BT_ERROR_NONE; } +/* LCOV_EXCL_START */ int bt_avrcp_target_connect(const char *remote_address) { int error; @@ -144,7 +147,7 @@ int bt_avrcp_target_disconnect(const char *remote_address) BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error), error); return error; -} +} /* LCOV_EXCL_STOP */ int bt_avrcp_target_deinitialize(void) { diff --git a/src/bluetooth-common.c b/src/bluetooth-common.c index bfb7327..a1c3047 100644 --- a/src/bluetooth-common.c +++ b/src/bluetooth-common.c @@ -2229,7 +2229,6 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us } break; } -/* LCOV_EXCL_STOP */ case BLUETOOTH_EVENT_GATT_CLIENT_SERVICE_CHANGED: { bt_gatt_service_change_t *service_change = (bt_gatt_service_change_t *)(param->param_data); @@ -2305,6 +2304,7 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us } break; } +/* LCOV_EXCL_STOP */ case BLUETOOTH_EVENT_ADVERTISING_STARTED: BT_INFO("BLUETOOTH_EVENT_ADVERTISING_STARTED"); adv_handle = (int *)(param->param_data); @@ -2882,7 +2882,7 @@ static void __bt_free_bt_adapter_device_discovery_info_s(bt_adapter_device_disco free(discovery_info); discovery_info = NULL; } -/* LCOV_EXCL_STOP */ + static int __bt_get_bt_adapter_le_device_scan_info_s( bt_adapter_le_device_scan_result_info_s **scan_info, bluetooth_le_device_info_t *source_info) @@ -2936,7 +2936,7 @@ static void __bt_free_bt_adapter_le_device_scan_info_s(bt_adapter_le_device_scan free(scan_info); scan_info = NULL; -} +} /* LCOV_EXCL_STOP */ /* LCOV_EXCL_START */ #if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI) diff --git a/src/bluetooth-device.c b/src/bluetooth-device.c index 08999ec..94fc700 100644 --- a/src/bluetooth-device.c +++ b/src/bluetooth-device.c @@ -388,13 +388,14 @@ int bt_device_unset_connection_state_changed_cb(void) return BT_ERROR_NONE; } +/* LCOV_EXCL_START */ int bt_device_unset_rssi_alert_cb(void) { BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON); BT_CHECK_INIT_STATUS(); _bt_unset_cb(BT_EVENT_RSSI_ALERT_EVENT); return BT_ERROR_NONE; -} +} /* LCOV_EXCL_STOP */ int bt_device_unset_att_mtu_changed_cb(void) { @@ -404,6 +405,7 @@ int bt_device_unset_att_mtu_changed_cb(void) return BT_ERROR_NONE; } +/* LCOV_EXCL_START */ int bt_device_enable_rssi_monitor(const char *remote_address, bt_device_connection_link_type_e link_type, int low_threshold, int in_range_threshold, @@ -481,7 +483,6 @@ int bt_device_get_rssi_strength(const char *remote_address, } -/* LCOV_EXCL_START */ int bt_device_le_conn_update(const char *device_address, const bt_le_conn_update_s *parameters) { diff --git a/src/bluetooth-gatt.c b/src/bluetooth-gatt.c index f790f01..4be75ef 100644 --- a/src/bluetooth-gatt.c +++ b/src/bluetooth-gatt.c @@ -969,6 +969,7 @@ static void __bt_gatt_destroy_service(bt_gatt_h gatt_handle) __bt_gatt_free_service(gatt_handle); } +/* LCOV_EXCL_START */ static int __convert_int_to_signed_bits(int i, int size) { if (i < 0) @@ -1067,6 +1068,7 @@ static int __get_data_type_int_size(bt_data_type_int_e format) return 0; } } +/* LCOV_EXCL_STOP */ int bt_gatt_destroy(bt_gatt_h gatt_handle) { diff --git a/src/bluetooth-proximity.c b/src/bluetooth-proximity.c index dffcbf1..8e88796 100644 --- a/src/bluetooth-proximity.c +++ b/src/bluetooth-proximity.c @@ -138,7 +138,7 @@ int bt_proximity_reporter_destroy(bt_proximity_reporter_h reporter) return error_code; } - +/* LCOV_EXCL_START */ int _bt_check_proximity_is_initialized(bool *is_initialized) { BT_CHECK_GATT_PXP_SUPPORT(); @@ -152,7 +152,7 @@ int _bt_check_proximity_is_initialized(bool *is_initialized) return BT_ERROR_NONE; } - +/* LCOV_EXCL_STOP */ static bt_proximity_monitor_s *_bt_proximity_minotr_find(const char *remote_address) { GSList *l; @@ -165,7 +165,7 @@ static bt_proximity_monitor_s *_bt_proximity_minotr_find(const char *remote_addr } return NULL; } - +/* LCOV_EXCL_START */ int _bt_proximity_connection_set_state_changed(int result, const char *remote_address, bool connected) { int service_type = 0; @@ -202,7 +202,7 @@ int _bt_proximity_connection_set_state_changed(int result, const char *remote_ad } return error_code; } - +/* LCOV_EXCL_STOP */ int bt_proximity_monitor_create(const char *remote_address, bt_proximity_monitor_h *monitor) { int error_code = BT_ERROR_NONE; @@ -296,7 +296,7 @@ int bt_proximity_monitor_connect(bt_proximity_monitor_h monitor) BT_CHECK_GATT_PXP_SUPPORT(); BT_CHECK_INIT_STATUS(); BT_CHECK_INPUT_PARAMETER(monitor_s); - +/* LCOV_EXCL_START */ if (_bt_proximity_minotr_find(monitor_s->remote_address) == NULL) return BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED; @@ -307,7 +307,7 @@ int bt_proximity_monitor_connect(bt_proximity_monitor_h monitor) return error_code; } - +/* LCOV_EXCL_STOP */ int bt_proximity_monitor_disconnect(bt_proximity_monitor_h monitor) { int error_code; @@ -316,7 +316,7 @@ int bt_proximity_monitor_disconnect(bt_proximity_monitor_h monitor) BT_CHECK_GATT_PXP_SUPPORT(); BT_CHECK_INIT_STATUS(); BT_CHECK_INPUT_PARAMETER(monitor_s); - +/* LCOV_EXCL_START */ if (_bt_proximity_minotr_find(monitor_s->remote_address) == NULL) return BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED; @@ -327,7 +327,7 @@ int bt_proximity_monitor_disconnect(bt_proximity_monitor_h monitor) return error_code; } - +/* LCOV_EXCL_STOP */ int bt_proximity_monitor_set_connection_state_changed_cb(bt_proximity_monitor_h monitor, bt_proximity_monitor_connection_state_changed_cb callback, void *user_data) { @@ -437,14 +437,14 @@ int bt_proximity_monitor_set_linkloss_alert(bt_proximity_monitor_h monitor, int BT_CHECK_GATT_PXP_SUPPORT(); BT_CHECK_INIT_STATUS(); BT_CHECK_INPUT_PARAMETER(monitor); /* LCOV_EXCL_LINE */ - +/* LCOV_EXCL_START */ if (_bt_proximity_minotr_find(monitor_s->remote_address) == NULL) return BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED; if (!(pxp_monitor_supported_services & BT_PROXIMITY_LINKLOSS_ALERT)) return BT_ERROR_NOT_SUPPORTED; - _bt_convert_address_to_hex(&addr_hex, monitor_s->remote_address); /* LCOV_EXCL_LINE */ + _bt_convert_address_to_hex(&addr_hex, monitor_s->remote_address); error_code = _bt_get_error_code(bluetooth_proximity_monitor_set_property(&addr_hex, BT_PROXIMITY_LINKLOSS_ALERT, value)); @@ -453,7 +453,7 @@ int bt_proximity_monitor_set_linkloss_alert(bt_proximity_monitor_h monitor, int return error_code; } - +/* LCOV_EXCL_STOP */ int bt_proximity_monitor_set_immediate_alert(bt_proximity_monitor_h monitor, int value) { int error_code = BT_ERROR_NONE; @@ -463,14 +463,14 @@ int bt_proximity_monitor_set_immediate_alert(bt_proximity_monitor_h monitor, int BT_CHECK_GATT_PXP_SUPPORT(); BT_CHECK_INIT_STATUS(); BT_CHECK_INPUT_PARAMETER(monitor); /* LCOV_EXCL_LINE */ - +/* LCOV_EXCL_START */ if (_bt_proximity_minotr_find(monitor_s->remote_address) == NULL) return BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED; if (!(pxp_monitor_supported_services & BT_PROXIMITY_IMMEDIATE_ALERT)) return BT_ERROR_NOT_SUPPORTED; - _bt_convert_address_to_hex(&addr_hex, monitor_s->remote_address); /* LCOV_EXCL_LINE */ + _bt_convert_address_to_hex(&addr_hex, monitor_s->remote_address); error_code = _bt_get_error_code(bluetooth_proximity_monitor_set_property(&addr_hex, BT_PROXIMITY_IMMEDIATE_ALERT, value)); @@ -479,7 +479,7 @@ int bt_proximity_monitor_set_immediate_alert(bt_proximity_monitor_h monitor, int return error_code; } - +/* LCOV_EXCL_STOP */ int bt_proximity_monitor_get_linkloss_alert(bt_proximity_monitor_h monitor, int *value) { int error_code = BT_ERROR_NONE;