From 1084f482590b663b440017c902664193979ac118 Mon Sep 17 00:00:00 2001 From: Peng Su Date: Thu, 22 Aug 2019 17:12:26 +0800 Subject: [PATCH] kernel: ignore z_fatal_halt() from code coverage The reason we decide to ignore it in code coverage: 1.No test case can cover the function for code coverage. 2.Even if we added a test for testing, it would be marked as "never be called by other code" because the function cause CPU halted and it can't return. Signed-off-by: Peng Su --- kernel/fatal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/fatal.c b/kernel/fatal.c index 4bdcd2d0962..4ed0a1b76ba 100644 --- a/kernel/fatal.c +++ b/kernel/fatal.c @@ -86,10 +86,13 @@ void z_fatal_print(const char *fmt, ...) } #endif /* CONFIG_LOG || CONFIG_PRINTK */ +/* LCOV_EXCL_START */ FUNC_NORETURN void k_fatal_halt(unsigned int reason) { z_arch_system_halt(reason); } +/* LCOV_EXCL_STOP */ + void z_fatal_error(unsigned int reason, const z_arch_esf_t *esf) {