Add initial source codes for gtest
[platform/core/connectivity/stc-manager.git] / src / monitor / stc-exception.c
index 30579fc..a9e3523 100755 (executable)
@@ -54,13 +54,13 @@ stc_error_e table_exceptions_foreach(const stc_exceptions_info_cb exception_cb,
                if (process_name != NULL)
                        data.process_name = process_name;
                else
-                       data.process_name = "none";
+                       data.process_name = "none"; //LCOV_EXCL_LINE
 
                exe_type = strtok_r(NULL, "\n", &save_ptr);
                if (exe_type != NULL)
                        data.exe_type = exe_type;
                else
-                       data.exe_type = "none";
+                       data.exe_type = "none"; //LCOV_EXCL_LINE
 
                if (exception_cb(&data, user_data) == STC_CANCEL)
                        break;
@@ -80,7 +80,7 @@ static int __pkginfo_filter_list_cb(pkgmgrinfo_pkginfo_h handle, void *user_data
        if (ret == PMINFO_R_OK) {
                if (g_hash_table_insert(g_pkginfo_filter_hash,
                                g_strdup(pkgname), g_strdup(EXE_TYPE_APPLICATION)) != TRUE)
-                       STC_LOGE("Failed to insert hash table");
+                       STC_LOGE("Failed to insert hash table"); //LCOV_EXCL_LINE
        }
 
        return STC_CONTINUE;
@@ -104,7 +104,7 @@ static int __pkginfo_pkg_list_cb(pkgmgrinfo_pkginfo_h handle, void *user_data)
                data.exe_type = EXE_TYPE_APPLICATION;
 
                if (excn_cb(&data, NULL) == STC_CANCEL)
-                       STC_LOGE("Failed to insert hash table");
+                       STC_LOGE("Failed to insert hash table"); //LCOV_EXCL_LINE
        }
 
        return STC_CONTINUE;
@@ -130,24 +130,24 @@ stc_error_e pkginfo_exceptions_foreach(const stc_exceptions_info_cb exception_cb
                        PMINFO_PKGINFO_PROP_PACKAGE_PRIVILEGE,
                        INTERNET_PRIVILEGE);
        if (ret != PMINFO_R_OK) {
-               STC_LOGE("Failed to add pkginfo filter string");
-               err = STC_ERROR_FAIL;
-               goto out;
+               STC_LOGE("Failed to add pkginfo filter string"); //LCOV_EXCL_LINE
+               err = STC_ERROR_FAIL; //LCOV_EXCL_LINE
+               goto out; //LCOV_EXCL_LINE
        }
 
        ret = pkgmgrinfo_pkginfo_filter_foreach_pkginfo(handle,
                        __pkginfo_filter_list_cb, NULL);
        if (ret != PMINFO_R_OK) {
-               STC_LOGE("Failed to foreach pkginfo filter");
-               err = STC_ERROR_FAIL;
-               goto out;
+               STC_LOGE("Failed to foreach pkginfo filter"); //LCOV_EXCL_LINE
+               err = STC_ERROR_FAIL; //LCOV_EXCL_LINE
+               goto out; //LCOV_EXCL_LINE
        }
 
        ret = pkgmgrinfo_pkginfo_get_list(__pkginfo_pkg_list_cb, exception_cb);
        if (ret != PMINFO_R_OK) {
-               STC_LOGE("Failed to get pkginfo list");
-               err = STC_ERROR_FAIL;
-               goto out;
+               STC_LOGE("Failed to get pkginfo list"); //LCOV_EXCL_LINE
+               err = STC_ERROR_FAIL; //LCOV_EXCL_LINE
+               goto out; //LCOV_EXCL_LINE
        }
 
 out: