lcov: added excluding line 72/188072/1 accepted/tizen/unified/20180904.062847 submit/tizen/20180831.105137 submit/tizen/20180903.063948 submit/tizen/20180903.103359
authorsanghyeok.oh <sanghyeok.oh@samsung.com>
Fri, 31 Aug 2018 04:32:21 +0000 (13:32 +0900)
committersanghyeok.oh <sanghyeok.oh@samsung.com>
Fri, 31 Aug 2018 04:33:42 +0000 (13:33 +0900)
Change-Id: If6e9d5f47c784c436d6376f1e03412e0372f32e7
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
src/libdlog/log.c
src/libdlog/log_filters.c
src/libdlog/loglimiter.c

index b888b54..9badc63 100644 (file)
@@ -81,7 +81,7 @@ static void __configure_limiter(struct log_config *config)
        limiter = __log_limiter_create(config);
 
        if (!limiter)
-               __dynamic_filters_destroy();
+               __dynamic_filters_destroy();// LCOV_EXCL_LINE
 }
 
 static int __configure_backend(struct log_config *config)
index 5653cc7..e173a63 100644 (file)
@@ -41,16 +41,16 @@ static void __setup_runtime_watch(char const *path)
 
        inotify_fd = inotify_init1(IN_NONBLOCK | IN_CLOEXEC);
        if (inotify_fd == -1) {
-               syslog_critical_failure("DLog: inotify_init failed (%d)", errno);
-               return;
+               syslog_critical_failure("DLog: inotify_init failed (%d)", errno);// LCOV_EXCL_LINE
+               return;// LCOV_EXCL_LINE
        }
 
        inotify_wd = inotify_add_watch(inotify_fd, path, IN_CREATE | IN_CLOSE_WRITE | IN_MOVE | IN_DELETE);
        if (inotify_wd == -1) {
-               syslog_critical_failure("DLog: inotify_add_watch failed (%d)", errno);
-               close(inotify_fd);
-               inotify_fd = -1;
-               return;
+               syslog_critical_failure("DLog: inotify_add_watch failed (%d)", errno);// LCOV_EXCL_LINE
+               close(inotify_fd);// LCOV_EXCL_LINE
+               inotify_fd = -1;// LCOV_EXCL_LINE
+               return;// LCOV_EXCL_LINE
        }
 }
 
@@ -63,7 +63,7 @@ static void __update_filters()
        if (!r)
                __log_limiter_update(&config);
        else
-               syslog_critical_failure("DLog: keeping current runtime filters, can't read from \"%s\" (%d)", inotify_path, -r);
+               syslog_critical_failure("DLog: keeping current runtime filters, can't read from \"%s\" (%d)", inotify_path, -r);// LCOV_EXCL_LINE
 
        log_config_free(&config);
 }
@@ -79,9 +79,9 @@ void __dynamic_filters_create(struct log_config *config)
                return;
 
        if (asprintf(&inotify_path, "%s/%s", extra_filters_path, DYNAMIC_FILTERS_FILENAME) < 0) {
-               inotify_path = NULL;
-               syslog_critical_failure("DLog: out of memory");
-               return;
+               inotify_path = NULL;// LCOV_EXCL_LINE
+               syslog_critical_failure("DLog: out of memory");// LCOV_EXCL_LINE
+               return;// LCOV_EXCL_LINE
        }
 
        /* missing filters config file at startup
index 14e64f5..a2e3741 100644 (file)
@@ -143,7 +143,7 @@ static int util_prio_to_char(int prio)
                }
        }
 
-       return '?';
+       return '?';// LCOV_EXCL_LINE
 }
 
 /* The key is built from TAG and priority by DJB algorithm (Dan Bernstein).
@@ -446,10 +446,10 @@ int __log_limiter_create(struct log_config *config)
 
        const int r = __log_limiter_initialize(original_rules_table); // LCOV_EXCL_LINE
        if (r)
-               rules_destroy(&original_rules_table);
+               rules_destroy(&original_rules_table);// LCOV_EXCL_LINE
        return !r;
 }
-
+// LCOV_EXCL_START
 void __log_limiter_update(struct log_config *config)
 {
        assert(config);
@@ -517,3 +517,4 @@ int __log_limiter_dump_rule(struct rule **r, char *buf, const size_t size)
        *r = ruleptr->prev;
        return 0;
 }
+// LCOV_EXCL_END