[PATCH v5 4/6] test: log functions with CONFIG_LOG=n

sjg at google.com sjg at google.com
Tue Mar 3 03:46:00 CET 2020


If CONFIG_LOG=n, we still expect output for log_err(), log_warning(),
log_notice(), log_info() and in case of DEBUG=1 also for log_debug().

Provide unit tests verifying this.

The tests depend on:

	CONFIG_CONSOLE_RECORD=y
	CONFIG_LOG=n
	CONFIG_UT_LOG=y

It may be necessary to increase the value of CONFIG_SYS_MALLOC_F_LEN to
accommodate CONFIG_CONSOLE_RECORD=y.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
Reviewed-by: Simon Glass <sjg at chromium.org>
---
v5:
	no change
v4:
	no change
---
 MAINTAINERS           |   2 +-
 include/test/log.h    |  16 +++++
 include/test/suites.h |   1 +
 test/Kconfig          |   9 +++
 test/Makefile         |   2 +-
 test/cmd_ut.c         |   6 ++
 test/log/Makefile     |  10 ++++
 test/log/nolog_test.c | 135 ++++++++++++++++++++++++++++++++++++++++++
 test/log/test-main.c  |  20 +++++++
 9 files changed, 199 insertions(+), 2 deletions(-)
 create mode 100644 include/test/log.h
 create mode 100644 test/log/nolog_test.c
 create mode 100644 test/log/test-main.c

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list