From a06a7867af97751cf9de0e348758fb39d8306502 Mon Sep 17 00:00:00 2001 From: Yuval Peress Date: Mon, 28 Nov 2022 23:36:18 -0700 Subject: zephyr: exclude non posix logic from panic_output The code that's non posix cannot be tested with current infrastructure. Remove it from the coverage reports. BRANCH=none BUG=none TEST=twister -C Change-Id: Ic4725334ac7dad893d35bb97bed1c9757dc2bd72 Signed-off-by: Yuval Peress Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4062993 Reviewed-by: Aaron Massey Commit-Queue: Aaron Massey Code-Coverage: Zoss --- common/panic_output.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/panic_output.c b/common/panic_output.c index a5bba9d184..55d551f548 100644 --- a/common/panic_output.c +++ b/common/panic_output.c @@ -175,8 +175,10 @@ uintptr_t get_panic_data_start(void) if (IS_ENABLED(CONFIG_BOARD_NATIVE_POSIX)) return (uintptr_t)pdata_ptr; + /* LCOV_EXCL_START - Can't cover non posix lines (yet) */ return ((uintptr_t)CONFIG_PANIC_DATA_BASE + CONFIG_PANIC_DATA_SIZE - pdata_ptr->struct_size); + /* LCOV_EXCL_STOP */ } static uint32_t get_panic_data_size(void) @@ -199,6 +201,7 @@ struct panic_data *get_panic_data_write(void) return pdata_ptr; } #else +/* LCOV_EXCL_START - Can't cover non posix lines (yet) */ struct panic_data *get_panic_data_write(void) { /* @@ -292,6 +295,7 @@ struct panic_data *get_panic_data_write(void) return pdata_ptr; } +/* LCOV_EXCL_STOP */ #endif /* CONFIG_BOARD_NATIVE_POSIX */ static void panic_init(void) -- cgit v1.2.1