Add exclude section for impossible lines to be excuted in TCT 76/275076/2
authorInHong Han <inhong1.han@samsung.com>
Mon, 16 May 2022 09:16:47 +0000 (18:16 +0900)
committerInHong Han <inhong1.han@samsung.com>
Mon, 16 May 2022 11:09:06 +0000 (20:09 +0900)
Change-Id: I527b4191a9274f181cdb60e5c98f46f7a6ef1968

client/ma.c
client/ma_ap.c
client/ma_ap_client.c
client/ma_ap_dbus.c

index 4fe876df70724886cc84b6e36ae26a6c11061dab..ab7c6125991be43967e845967098db4b7d2dee2d 100644 (file)
@@ -66,7 +66,7 @@ static int __ma_get_feature_enabled()
 {
        if (0 == g_feature_enabled) {
                //LCOV_EXCL_START
-               MA_SLOGE("[ERROR] Multi-assistant feature NOT supported"); //LCOV_EXCL_LINE
+               MA_SLOGE("[ERROR] Multi-assistant feature NOT supported");
                return MA_ERROR_NOT_SUPPORTED;
                //LCOV_EXCL_STOP
        } else if (-1 == g_feature_enabled) {
@@ -75,19 +75,25 @@ static int __ma_get_feature_enabled()
                if (0 == system_info_get_platform_bool(MA_FEATURE_PATH, &ma_supported)) {
                        if (0 == system_info_get_platform_bool(MA_MIC_FEATURE_PATH, &mic_supported)) {
                                if (false == ma_supported || false == mic_supported) {
-                                       MA_SLOGE("[ERROR] Multi-assistant feature NOT supported"); //LCOV_EXCL_LINE
+                                       //LCOV_EXCL_START
+                                       MA_SLOGE("[ERROR] Multi-assistant feature NOT supported");
                                        g_feature_enabled = 0;
                                        return MA_ERROR_NOT_SUPPORTED;
+                                       //LCOV_EXCL_STOP
                                }
 
                                g_feature_enabled = 1;
                        } else {
-                               MA_SLOGE("[ERROR] Fail to get feature value"); //LCOV_EXCL_LINE
+                               //LCOV_EXCL_START
+                               MA_SLOGE("[ERROR] Fail to get feature value");
                                return MA_ERROR_NOT_SUPPORTED;
+                               //LCOV_EXCL_STOP
                        }
                } else {
-                       MA_SLOGE("[ERROR] Fail to get feature value"); //LCOV_EXCL_LINE
+                       //LCOV_EXCL_START
+                       MA_SLOGE("[ERROR] Fail to get feature value");
                        return MA_ERROR_NOT_SUPPORTED;
+                       //LCOV_EXCL_STOP
                }
        }
        return 0;
@@ -155,10 +161,12 @@ static int __ma_check_recorder_privilege()
                }
                snprintf(uid, 16, "%d", getuid());
                if (false == __check_privilege(uid, MA_RECORDER_PRIVILEGE)) {
-                       MA_SLOGE("[ERROR] Permission for recording is denied"); //LCOV_EXCL_LINE
+                       //LCOV_EXCL_START
+                       MA_SLOGE("[ERROR] Permission for recording is denied");
                        g_recorder_privilege_allowed = 0;
                        __check_privilege_deinitialize();
                        return MA_ERROR_PERMISSION_DENIED;
+                       //LCOV_EXCL_STOP
                }
                __check_privilege_deinitialize();
        }
@@ -183,10 +191,12 @@ static int __ma_check_volume_set_privilege()
                }
                snprintf(uid, 16, "%d", getuid());
                if (false == __check_privilege(uid, MA_VOLUME_SET_PRIVILEGE)) {
-                       MA_SLOGE("[ERROR] Permission for volume set is denied"); //LCOV_EXCL_LINE
+                       //LCOV_EXCL_START
+                       MA_SLOGE("[ERROR] Permission for volume set is denied");
                        g_volume_set_privilege_allowed = 0;
                        __check_privilege_deinitialize();
                        return MA_ERROR_PERMISSION_DENIED;
+                       //LCOV_EXCL_STOP
                }
                __check_privilege_deinitialize();
        }
@@ -427,6 +437,7 @@ static void delete_retry_connection_timer(void* data)
        }
 }
 
+//LCOV_EXCL_START
 static void add_retry_connection_timer(void* data)
 {
        delete_retry_connection_timer(NULL);
@@ -434,6 +445,7 @@ static void add_retry_connection_timer(void* data)
        g_retry_connection_timer = ecore_timer_add(1.5f, retry_connection, NULL);
        MA_SLOGI("Added timer for retry_connection : %p", g_retry_connection_timer); //LCOV_EXCL_LINE
 }
+//LCOV_EXCL_STOP
 
 static void __start_prepare_func()
 {
@@ -2115,6 +2127,7 @@ int ma_unset_audio_streaming_data_section_changed_cb(void)
        return MA_ERROR_NONE;
 }
 
+//LCOV_EXCL_START
 int ma_set_preprocessing_result_received_cb(ma_preprocessing_result_received_cb callback, void* user_data)
 {
        if (0 != __ma_get_feature_enabled()) {
@@ -2177,6 +2190,7 @@ int ma_set_assistant_language(const char* language)
        MA_SLOGD("[Manager] Set assistant language"); //LCOV_EXCL_LINE
        return ma_set_assistant_wakeup_language(language);
 }
+//LCOV_EXCL_STOP
 
 int ma_set_assistant_wakeup_language(const char* language)
 {
index 6c111509019b348d5b0669c60e993854de3a6e1f..7b3b9ae8b093ec125410ef540797134ae6e35776 100644 (file)
@@ -42,13 +42,12 @@ static cynara *p_cynara = NULL;
 
 static void __ma_ap_notify_error(void* data);
 
+//LCOV_EXCL_START
 static int __ma_ap_get_feature_enabled()
 {
        if (0 == g_feature_enabled) {
-               //LCOV_EXCL_START
                MAAP_SLOGE("[ERROR] Multi-assistant feature NOT supported");
                return MA_ERROR_NOT_SUPPORTED;
-               //LCOV_EXCL_STOP
        } else if (-1 == g_feature_enabled) {
                bool ma_supported = false;
                bool mic_supported = false;
@@ -124,10 +123,8 @@ static int __ma_ap_check_recorder_privilege()
        char uid[16];
 
        if (0 == g_recorder_privilege_allowed) {
-               //LCOV_EXCL_START
                MAAP_SLOGE("[ERROR] Permission for recording is denied");
                return MA_ERROR_PERMISSION_DENIED;
-               //LCOV_EXCL_STOP
        } else if (-1 == g_recorder_privilege_allowed) {
                if (false == __check_privilege_initialize()) {
                        MAAP_SLOGE("[ERROR] privilege initialize is failed"); //LCOV_EXCL_LINE
index f4dcf24091cf7b6db6d631e536d3597a5aad16f5..b8ff56756ddc16c001d43233ae329dbeb100ebd3 100644 (file)
@@ -46,6 +46,7 @@ typedef struct {
 
 static GSList* g_ap_client_list = NULL;
 
+//LCOV_EXCL_START
 static ma_ap_client_s* __ap_client_get(ma_h ma)
 {
        if (NULL == ma) {
@@ -346,7 +347,6 @@ int ma_ap_client_get_audio_streaming_cb(ma_h ma, ma_audio_streaming_cb* callback
 
        return MA_ERROR_NONE;
 }
-//LCOV_EXCL_STOP
 
 int ma_ap_client_set_audio_streaming_data_section_changed_cb(ma_h ma, ma_audio_streaming_data_section_changed_cb callback, void* user_data)
 {
@@ -361,7 +361,6 @@ int ma_ap_client_set_audio_streaming_data_section_changed_cb(ma_h ma, ma_audio_s
        return MA_ERROR_NONE;
 }
 
-//LCOV_EXCL_START
 int ma_ap_client_get_audio_streaming_data_section_changed_cb(ma_h ma, ma_audio_streaming_data_section_changed_cb* callback, void** user_data)
 {
        ma_ap_client_s* client = __ap_client_get(ma);
@@ -374,3 +373,4 @@ int ma_ap_client_get_audio_streaming_data_section_changed_cb(ma_h ma, ma_audio_s
 
        return MA_ERROR_NONE;
 }
+//LCOV_EXCL_STOP
index c25d62a035d2e356999ff729f2bdd4ef35bbd601..3d1d7bb7b6ce277c9800d20e9c2aa77cae5dd0be 100644 (file)
@@ -52,6 +52,7 @@ typedef struct {
 static const char *message_port = "ma_streaming_port";
 static int g_local_port_id = -1;
 
+//LCOV_EXCL_START
 static void message_port_cb(int local_port_id,
        const char *remote_app_id, const char *remote_port,
        bool trusted_remote_port, bundle *message, void *user_data)
@@ -170,4 +171,4 @@ int ma_ap_dbus_close_connection()
        g_streaming_requested = false;
        return streaming_ipc_deinitialize();
 }
-
+//LCOV_EXCL_STOP