kernel: mmu: exclude some funcs from coverage
page_frame_dump() and z_page_frames_dump() are used for
debug print, so there is no need to cover those funcs.
__weak function is also excluded, every test overrides it.
Signed-off-by: Lixin Guo <lixinx.guo@intel.com>
diff --git a/kernel/mmu.c b/kernel/mmu.c
index e7c090f..558bff9 100644
--- a/kernel/mmu.c
+++ b/kernel/mmu.c
@@ -72,6 +72,7 @@
#define COLOR(x) do { } while (0)
#endif
+/* LCOV_EXCL_START */
static void page_frame_dump(struct z_page_frame *pf)
{
if (z_page_frame_is_reserved(pf)) {
@@ -120,6 +121,7 @@
printk("\n");
}
}
+/* LCOV_EXCL_STOP */
#define VIRT_FOREACH(_base, _size, _pos) \
for (_pos = _base; \
@@ -417,6 +419,7 @@
pf->addr = addr;
}
+/* LCOV_EXCL_START */
/* Go through page frames to find the physical address mapped
* by a virtual address.
*
@@ -445,6 +448,8 @@
return ret;
}
+/* LCOV_EXCL_STOP */
+
__weak FUNC_ALIAS(virt_to_page_frame, arch_page_phys_get, int);
#ifdef CONFIG_DEMAND_PAGING