Add lcov comments for coverage measurement 82/74982/1
authorKichan Kwon <k_c.kwon@samsung.com>
Thu, 16 Jun 2016 08:00:25 +0000 (17:00 +0900)
committerKichan Kwon <k_c.kwon@samsung.com>
Thu, 16 Jun 2016 08:00:25 +0000 (17:00 +0900)
Change-Id: I870fece8561aaa1db0b02cbf830fbe3987849d98
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
src/libdlog/log.c
src/libdlog/loglimiter.c

index d62e456..a5ba4fd 100755 (executable)
@@ -138,6 +138,7 @@ static int dlog_should_log(log_id_t log_id, const char* tag, int prio)
                return DLOG_ERROR_NOT_PERMITTED;
 
        if (limiter) {
+               // LCOV_EXCL_START : disabled feature (limiter)
                should_log = __log_limiter_pass_log(tag, prio);
 
                if (!should_log) {
@@ -147,6 +148,7 @@ static int dlog_should_log(log_id_t log_id, const char* tag, int prio)
                                     "Your log has been blocked due to limit of log lines per minute.");
                        return DLOG_ERROR_NOT_PERMITTED;
                }
+               // LCOV_EXCL_STOP
        }
 
        return DLOG_ERROR_NONE;
index 627982c..a8a4942 100755 (executable)
@@ -84,12 +84,15 @@ static void rules_destroy(struct rule* rlist)
        }
 }
 
+// LCOV_EXCL_START : system error
 void __log_limiter_rules_purge(void)
 {
        rules_destroy(rules_table);
        rules_table = NULL;
 }
+// LCOV_EXCL_STOP
 
+// LCOV_EXCL_START : disabled feature (limiter)
 static int rule_compare(struct rule* r1, struct rule* r2)
 {
        if (r1->hash == r2->hash) {
@@ -113,6 +116,7 @@ static int rule_match(struct rule* r1, unsigned key, const char* s, int prio)
 
        return (r1->hash > key ? 1 : (-1));
 }
+// LCOV_EXCL_STOP
 
 /* Translate fancy priority notation into common denominator */
 static int util_prio_to_char(int prio)
@@ -170,6 +174,7 @@ finish:
        return hash;
 }
 
+// LCOV_EXCL_START : disabled feature (limiter)
 /* Create hashmap, it's internal interface. */
 static struct hashmap* hashmap_create(int size, hash_cmp_func_t cmp_func,
                                      hash_match_func_t match_func)
@@ -290,6 +295,7 @@ bailout:
 
        return (-1);
 }
+// LCOV_EXCL_STOP
 
 void __log_limiter_destroy(void)
 {
@@ -325,6 +331,7 @@ int __log_limiter_add_rule(const char* tag, int prio, int limit)
        return 0;
 }
 
+// LCOV_EXCL_START : disabled feature (limiter)
 
 /* Function implement logic needed to decide,
    whenever message is written to log or not.
@@ -399,3 +406,4 @@ int __log_limiter_pass_log(const char* tag, int prio)
        /* If everything failed, then pass message through */
        return 1;
 }
+// LCOV_EXCL_STOP