tests: logging: log_core_additional: Add panic handler for test backend
Backend implemented in the test did not implemented panic function and test crashed when log_panic was used. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
0c830822ae
commit
07e0a5f08a
1 changed files with 6 additions and 0 deletions
|
@ -160,6 +160,11 @@ static void sync_hexdump(const struct log_backend *const backend,
|
|||
cb->sync++;
|
||||
}
|
||||
|
||||
static void panic(const struct log_backend *const backend)
|
||||
{
|
||||
ARG_UNUSED(backend);
|
||||
}
|
||||
|
||||
const struct log_backend_api log_backend_test_api = {
|
||||
.process = IS_ENABLED(CONFIG_LOG2) ? process : NULL,
|
||||
.put = IS_ENABLED(CONFIG_LOG1_DEFERRED) ? put : NULL,
|
||||
|
@ -167,6 +172,7 @@ const struct log_backend_api log_backend_test_api = {
|
|||
sync_string : NULL,
|
||||
.put_sync_hexdump = IS_ENABLED(CONFIG_LOG1_IMMEDIATE) ?
|
||||
sync_hexdump : NULL,
|
||||
.panic = panic,
|
||||
};
|
||||
|
||||
LOG_BACKEND_DEFINE(backend1, log_backend_test_api, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue