Skip to content

Commit 125de99

Browse files
golowanowkartben
authored andcommitted
tests: logging: logging.thread: fix Ztest log corruption
Flush test log messages before waiting for the processing thread to avoid delayed log output messing with the Ztest's log output on the test complete. Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
1 parent fc2ea30 commit 125de99

File tree

1 file changed

+1
-0
lines changed
  • tests/subsys/logging/log_core_additional/src

1 file changed

+1
-0
lines changed

tests/subsys/logging/log_core_additional/src/log_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ static void log_setup(bool backend2_enable)
171171
static bool log_test_process(void)
172172
{
173173
if (IS_ENABLED(CONFIG_LOG_PROCESS_THREAD)) {
174+
log_flush();
174175
/* waiting for all logs have been handled */
175176
k_sem_take(&log_sem, K_FOREVER);
176177
return false;

0 commit comments

Comments
 (0)