feedback: Exclude codes from line coverage 48/304048/1 accepted/tizen_unified_riscv accepted/tizen/unified/20240110.154218 accepted/tizen/unified/riscv/20240111.042757
authorYunhee Seo <yuni.seo@samsung.com>
Tue, 9 Jan 2024 10:48:47 +0000 (19:48 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Tue, 9 Jan 2024 10:55:41 +0000 (19:55 +0900)
Code that is not covered by test code is excluded.
If the code is only for internal API, it is also omitted.
Also, sound-parser.c will be removed and merged into feedback-config.c later.
feedback-config function is excluded because currently it is not used anywhere.
As such, functions that will undergo major structural changes have also been excluded.

Change-Id: I39581b5ce29b5af015e73487fcd2b1854e7d16c2
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
src/devices.c
src/feedback-config.c
src/feedback.c
src/sound-parser.c
src/sound-theme-manager.c
src/sound.c

index f2daabd9a5c6ade6ff571a3d0407ce461592c472..ffacf4ac2c457201d8e1e572dee07ea048aaf699 100644 (file)
@@ -149,6 +149,7 @@ int devices_stop(void)
 }
 //LCOV_EXCL_STOP
 
+//LCOV_EXCL_START
 int devices_stop_by_type(feedback_type_e feedback_type)
 {
        GList *elem;
@@ -161,3 +162,4 @@ int devices_stop_by_type(feedback_type_e feedback_type)
 
        return -ENOTSUP;
 }
+//LCOV_EXCL_STOP
index fd99cda7505ed2e500c06cf7c13149177448c80d..53faa3d5a9131ebab1666be85a673d74a19cbaeb 100644 (file)
@@ -31,6 +31,7 @@
 
 static int load_config_index = 0;
 
+//LCOV_EXCL_START
 static int load_config(struct parse_result *result, void *user_data)
 {
        struct feedback_config_info *info = (struct feedback_config_info *)user_data;
@@ -114,3 +115,4 @@ void feedback_free_config(struct feedback_config_info *info)
        info->data = NULL;
        load_config_index = 0;
 }
+//LCOV_EXCL_STOP
index ef0a639ce72030b843f60a14740ca26c00eb5c7a..ea3c4b34dfe412217a547e7a70f1ed4b0940d823 100644 (file)
@@ -576,6 +576,7 @@ API int feedback_get_count_of_theme_internal(feedback_type_e feedback_type, unsi
 }
 //LCOV_EXCL_STOP
 
+//LCOV_EXCL_START
 API int feedback_get_theme_id_internal(feedback_type_e feedback_type, unsigned int *id_of_theme)
 {
        const struct device_ops *dev = NULL;
@@ -605,6 +606,7 @@ API int feedback_get_theme_id_internal(feedback_type_e feedback_type, unsigned i
 }
 //LCOV_EXCL_STOP
 
+//LCOV_EXCL_START
 API int feedback_set_theme_id_internal(feedback_type_e feedback_type, unsigned int id_of_theme)
 {
        const struct device_ops *dev = NULL;
@@ -637,6 +639,7 @@ API int feedback_set_theme_id_internal(feedback_type_e feedback_type, unsigned i
 }
 //LCOV_EXCL_STOP
 
+//LCOV_EXCL_START
 API int feedback_stop_type_internal(feedback_type_e feedback_type)
 {
        int err;
@@ -659,7 +662,9 @@ API int feedback_stop_type_internal(feedback_type_e feedback_type)
 
        return FEEDBACK_ERROR_NONE;
 }
+//LCOV_EXCL_STOP
 
+//LCOV_EXCL_START
 API int feedback_get_theme_ids_internal(feedback_type_e feedback_type, unsigned int *count_of_theme, unsigned int **theme_ids)
 {
        const struct device_ops *dev = NULL;
@@ -693,7 +698,9 @@ API int feedback_get_theme_ids_internal(feedback_type_e feedback_type, unsigned
 
        return FEEDBACK_ERROR_NONE;
 }
+//LCOV_EXCL_STOP
 
+//LCOV_EXCL_START
 API int feedback_put_theme_ids_internal(unsigned int **theme_ids)
 {
        if (!theme_ids || !*theme_ids)
@@ -704,7 +711,9 @@ API int feedback_put_theme_ids_internal(unsigned int **theme_ids)
 
        return FEEDBACK_ERROR_NONE;
 }
+//LCOV_EXCL_STOP
 
+//LCOV_EXCL_START
 API int feedback_play_type_with_flags_internal(feedback_type_e type, feedback_pattern_internal_e internal_pattern, feedback_flag_e flag)
 {
        const struct device_ops *dev;
@@ -759,3 +768,4 @@ API int feedback_play_type_with_flags_internal(feedback_type_e type, feedback_pa
 
        return FEEDBACK_ERROR_NONE;
 }
+//LCOV_EXCL_STOP
index cb41eb74b95b5b0e1e78af61e1ee4a8ea983ea7c..4c43a98f1ce6dc115dcf1f0f2d0bf89543d9f768 100644 (file)
@@ -40,6 +40,7 @@ struct sound_theme_info {
        char *conf_file_path;
 };
 
+//LCOV_EXCL_START
 static void destroy_hash_table(void *hash_table)
 {
        if (hash_table)
@@ -329,4 +330,5 @@ int sound_parser_get_priority_info(const char *file_path, void *priority_info)
                return -EPERM;
 
        return 0;
-}
\ No newline at end of file
+}
+//LCOV_EXCL_STOP
index 1d29bf0187f86c5609f15ac669f9b74a4386b31b..01b2d5a7d7241b2c7ae602801089127119ebb7a6 100644 (file)
@@ -35,6 +35,7 @@ struct sound_theme_element {
 static unsigned int default_sound_theme_id;
 static GList *g_sound_theme_list;
 
+//LCOV_EXCL_START
 static void cleanup_sound_pattern_data(gpointer data)
 {
        struct sound_pattern_data *sound_data = data;
@@ -190,4 +191,5 @@ void sound_thememan_exit(void)
        if (g_sound_theme_list)
                g_list_free_full(g_steal_pointer(&g_sound_theme_list), cleanup_sound_theme_element);
 }
+//LCOV_EXCL_STOP
 
index daf3369ebffdaca464b7d07476a4febabacd5e36..ed9c533fd0a3d167718c4347c6a2483907add08a 100644 (file)
@@ -76,6 +76,7 @@ static const char *get_data(feedback_pattern_e pattern)
        return sound_data->path;
 }
 
+//LCOV_EXCL_START
 static int get_sound_pattern_data(feedback_pattern_e pattern, const char **path, int *priority)
 {
        struct sound_pattern_data *sound_data = NULL;
@@ -101,6 +102,7 @@ static int get_sound_pattern_data(feedback_pattern_e pattern, const char **path,
 
        return 0;
 }
+//LCOV_EXCL_STOP
 
 inline int is_sound_mode(void)
 {
@@ -460,6 +462,7 @@ static int sound_get_count_of_theme(unsigned int *count_of_theme)
 }
 //LCOV_EXCL_STOP
 
+//LCOV_EXCL_START
 static int sound_get_theme_id(unsigned int *id_of_theme)
 {
        if (!id_of_theme)
@@ -471,6 +474,7 @@ static int sound_get_theme_id(unsigned int *id_of_theme)
 }
 //LCOV_EXCL_STOP
 
+//LCOV_EXCL_START
 static int sound_set_theme_id(unsigned int id_of_theme)
 {
        int ret = 0;
@@ -490,6 +494,7 @@ static int sound_set_theme_id(unsigned int id_of_theme)
 }
 //LCOV_EXCL_STOP
 
+//LCOV_EXCL_START
 static int sound_get_theme_ids(unsigned int *count_of_theme, unsigned int **theme_ids)
 {
        int ret = 0;
@@ -503,7 +508,9 @@ static int sound_get_theme_ids(unsigned int *count_of_theme, unsigned int **them
 
        return 0;
 }
+//LCOV_EXCL_STOP
 
+//LCOV_EXCL_START
 static int sound_play_with_priority(feedback_pattern_e pattern, bool always)
 {
        struct stat buf;
@@ -575,6 +582,7 @@ check_pattern:
        }
        return -EPERM;
 }
+//LCOV_EXCL_STOP
 
 static const struct device_ops sound_device_ops = {
        .type = FEEDBACK_TYPE_SOUND,