summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYunhee Seo <yuni.seo@samsung.com>2024-01-09 19:48:47 +0900
committerYunhee Seo <yuni.seo@samsung.com>2024-01-09 19:55:41 +0900
commitdd5fb038da12cdbfc8d7d75701ddc4654d323223 (patch)
tree55391ba17cfb5f80cf34cd9be3fbae2502745f7d
parent2b524b10a718e8b55c33bfc4d64e8cefa7734699 (diff)
downloadlibsvi-accepted/tizen_unified_riscv.tar.gz
libsvi-accepted/tizen_unified_riscv.tar.bz2
libsvi-accepted/tizen_unified_riscv.zip
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>
-rw-r--r--src/devices.c2
-rw-r--r--src/feedback-config.c2
-rw-r--r--src/feedback.c10
-rw-r--r--src/sound-parser.c4
-rw-r--r--src/sound-theme-manager.c2
-rw-r--r--src/sound.c8
6 files changed, 27 insertions, 1 deletions
diff --git a/src/devices.c b/src/devices.c
index f2daabd..ffacf4a 100644
--- a/src/devices.c
+++ b/src/devices.c
@@ -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
diff --git a/src/feedback-config.c b/src/feedback-config.c
index fd99cda..53faa3d 100644
--- a/src/feedback-config.c
+++ b/src/feedback-config.c
@@ -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
diff --git a/src/feedback.c b/src/feedback.c
index ef0a639..ea3c4b3 100644
--- a/src/feedback.c
+++ b/src/feedback.c
@@ -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
diff --git a/src/sound-parser.c b/src/sound-parser.c
index cb41eb7..4c43a98 100644
--- a/src/sound-parser.c
+++ b/src/sound-parser.c
@@ -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
diff --git a/src/sound-theme-manager.c b/src/sound-theme-manager.c
index 1d29bf0..01b2d5a 100644
--- a/src/sound-theme-manager.c
+++ b/src/sound-theme-manager.c
@@ -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
diff --git a/src/sound.c b/src/sound.c
index daf3369..ed9c533 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -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,